generated-configure.sh revision 1778:21efe3b23a5a
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
826VERSION_IS_GA
827VERSION_SHORT
828VERSION_STRING
829VERSION_NUMBER_FOUR_POSITIONS
830VERSION_NUMBER
831VERSION_OPT
832VERSION_BUILD
833VERSION_PRE
834VERSION_PATCH
835VERSION_SECURITY
836VERSION_MINOR
837VERSION_MAJOR
838MACOSX_BUNDLE_ID_BASE
839MACOSX_BUNDLE_NAME_BASE
840COMPANY_NAME
841JDK_RC_PLATFORM_NAME
842PRODUCT_SUFFIX
843PRODUCT_NAME
844LAUNCHER_NAME
845COPYRIGHT_YEAR
846COMPRESS_JARS
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853BDEPS_FTP
854BDEPS_UNZIP
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860SETFILE
861CODESIGN
862XATTR
863DSYMUTIL
864IS_GNU_TIME
865PATCH
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877MAKE
878CHECK_TOOLSDIR_MAKE
879CHECK_TOOLSDIR_GMAKE
880CHECK_MAKE
881CHECK_GMAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952CPIO
953DF
954READLINK
955CYGPATH
956SED
957FGREP
958EGREP
959GREP
960AWK
961XARGS
962WHICH
963WC
964UNIQ
965UNAME
966TR
967TOUCH
968TEE
969TAR
970TAIL
971SORT
972SH
973RM
974PRINTF
975NAWK
976MV
977MKTEMP
978MKDIR
979LS
980LN
981HEAD
982FIND
983FILE
984EXPR
985ECHO
986DIRNAME
987DIFF
988DATE
989CUT
990CP
991COMM
992CMP
993CHMOD
994CAT
995BASH
996BASENAME
997DATE_WHEN_CONFIGURED
998ORIGINAL_PATH
999CONFIGURE_COMMAND_LINE
1000target_alias
1001host_alias
1002build_alias
1003LIBS
1004ECHO_T
1005ECHO_N
1006ECHO_C
1007DEFS
1008mandir
1009localedir
1010libdir
1011psdir
1012pdfdir
1013dvidir
1014htmldir
1015infodir
1016docdir
1017oldincludedir
1018includedir
1019localstatedir
1020sharedstatedir
1021sysconfdir
1022datadir
1023datarootdir
1024libexecdir
1025sbindir
1026bindir
1027program_transform_name
1028prefix
1029exec_prefix
1030PACKAGE_URL
1031PACKAGE_BUGREPORT
1032PACKAGE_STRING
1033PACKAGE_VERSION
1034PACKAGE_TARNAME
1035PACKAGE_NAME
1036PATH_SEPARATOR
1037SHELL'
1038ac_subst_files=''
1039ac_user_opts='
1040enable_option_checking
1041with_target_bits
1042enable_openjdk_only
1043with_custom_make_dir
1044with_jdk_variant
1045with_jvm_interpreter
1046with_jvm_variants
1047enable_debug
1048with_debug_level
1049with_devkit
1050with_sys_root
1051with_sysroot
1052with_tools_dir
1053with_toolchain_path
1054with_extra_path
1055with_sdk_name
1056with_conf_name
1057with_output_sync
1058with_builddeps_conf
1059with_builddeps_server
1060with_builddeps_dir
1061with_builddeps_group
1062enable_headful
1063enable_hotspot_test_in_build
1064with_cacerts_file
1065enable_unlimited_crypto
1066with_copyright_year
1067with_milestone
1068with_update_version
1069with_user_release_suffix
1070with_build_number
1071with_version_string
1072with_version_pre
1073with_version_opt
1074with_version_build
1075with_version_major
1076with_version_minor
1077with_version_security
1078with_version_patch
1079with_boot_jdk
1080with_add_source_root
1081with_override_source_root
1082with_adds_and_overrides
1083with_override_langtools
1084with_override_corba
1085with_override_jaxp
1086with_override_jaxws
1087with_override_hotspot
1088with_override_nashorn
1089with_override_jdk
1090with_import_hotspot
1091with_toolchain_type
1092with_toolchain_version
1093with_jtreg
1094with_extra_cflags
1095with_extra_cxxflags
1096with_extra_ldflags
1097enable_warnings_as_errors
1098enable_debug_symbols
1099enable_zip_debug_info
1100enable_native_coverage
1101with_x
1102with_cups
1103with_cups_include
1104with_freetype
1105with_freetype_include
1106with_freetype_lib
1107with_freetype_src
1108enable_freetype_bundling
1109with_alsa
1110with_alsa_include
1111with_alsa_lib
1112with_libjpeg
1113with_giflib
1114with_lcms
1115with_libpng
1116with_zlib
1117with_stdc__lib
1118with_msvcr_dll
1119with_msvcp_dll
1120with_dxsdk
1121with_dxsdk_lib
1122with_dxsdk_include
1123with_num_cores
1124with_memory_size
1125with_jobs
1126with_boot_jdk_jvmargs
1127with_sjavac_server_java
1128enable_sjavac
1129enable_precompiled_headers
1130enable_ccache
1131with_ccache_dir
1132'
1133      ac_precious_vars='build_alias
1134host_alias
1135target_alias
1136BASENAME
1137BASH
1138CAT
1139CHMOD
1140CMP
1141COMM
1142CP
1143CUT
1144DATE
1145DIFF
1146DIRNAME
1147ECHO
1148EXPR
1149FILE
1150FIND
1151HEAD
1152LN
1153LS
1154MKDIR
1155MKTEMP
1156MV
1157NAWK
1158PRINTF
1159RM
1160SH
1161SORT
1162TAIL
1163TAR
1164TEE
1165TOUCH
1166TR
1167UNAME
1168UNIQ
1169WC
1170WHICH
1171XARGS
1172AWK
1173GREP
1174EGREP
1175FGREP
1176SED
1177CYGPATH
1178READLINK
1179DF
1180CPIO
1181UNZIP
1182ZIP
1183LDD
1184OTOOL
1185READELF
1186HG
1187STAT
1188TIME
1189PATCH
1190DSYMUTIL
1191XATTR
1192CODESIGN
1193SETFILE
1194PKG_CONFIG
1195JAVA
1196JAVAC
1197JAVAH
1198JAR
1199JARSIGNER
1200CC
1201CFLAGS
1202LDFLAGS
1203LIBS
1204CPPFLAGS
1205CXX
1206CXXFLAGS
1207CCC
1208CPP
1209CXXCPP
1210AS
1211AR
1212LIPO
1213STRIP
1214NM
1215GNM
1216OBJCOPY
1217OBJDUMP
1218BUILD_CC
1219BUILD_CXX
1220BUILD_LD
1221JTREGEXE
1222XMKMF
1223FREETYPE_CFLAGS
1224FREETYPE_LIBS
1225ALSA_CFLAGS
1226ALSA_LIBS
1227LCMS_CFLAGS
1228LCMS_LIBS
1229PNG_CFLAGS
1230PNG_LIBS
1231LIBFFI_CFLAGS
1232LIBFFI_LIBS
1233CCACHE'
1234
1235
1236# Initialize some variables set by options.
1237ac_init_help=
1238ac_init_version=false
1239ac_unrecognized_opts=
1240ac_unrecognized_sep=
1241# The variables have the same names as the options, with
1242# dashes changed to underlines.
1243cache_file=/dev/null
1244exec_prefix=NONE
1245no_create=
1246no_recursion=
1247prefix=NONE
1248program_prefix=NONE
1249program_suffix=NONE
1250program_transform_name=s,x,x,
1251silent=
1252site=
1253srcdir=
1254verbose=
1255x_includes=NONE
1256x_libraries=NONE
1257
1258# Installation directory options.
1259# These are left unexpanded so users can "make install exec_prefix=/foo"
1260# and all the variables that are supposed to be based on exec_prefix
1261# by default will actually change.
1262# Use braces instead of parens because sh, perl, etc. also accept them.
1263# (The list follows the same order as the GNU Coding Standards.)
1264bindir='${exec_prefix}/bin'
1265sbindir='${exec_prefix}/sbin'
1266libexecdir='${exec_prefix}/libexec'
1267datarootdir='${prefix}/share'
1268datadir='${datarootdir}'
1269sysconfdir='${prefix}/etc'
1270sharedstatedir='${prefix}/com'
1271localstatedir='${prefix}/var'
1272includedir='${prefix}/include'
1273oldincludedir='/usr/include'
1274docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1275infodir='${datarootdir}/info'
1276htmldir='${docdir}'
1277dvidir='${docdir}'
1278pdfdir='${docdir}'
1279psdir='${docdir}'
1280libdir='${exec_prefix}/lib'
1281localedir='${datarootdir}/locale'
1282mandir='${datarootdir}/man'
1283
1284ac_prev=
1285ac_dashdash=
1286for ac_option
1287do
1288  # If the previous option needs an argument, assign it.
1289  if test -n "$ac_prev"; then
1290    eval $ac_prev=\$ac_option
1291    ac_prev=
1292    continue
1293  fi
1294
1295  case $ac_option in
1296  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1297  *=)   ac_optarg= ;;
1298  *)    ac_optarg=yes ;;
1299  esac
1300
1301  # Accept the important Cygnus configure options, so we can diagnose typos.
1302
1303  case $ac_dashdash$ac_option in
1304  --)
1305    ac_dashdash=yes ;;
1306
1307  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1308    ac_prev=bindir ;;
1309  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1310    bindir=$ac_optarg ;;
1311
1312  -build | --build | --buil | --bui | --bu)
1313    ac_prev=build_alias ;;
1314  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1315    build_alias=$ac_optarg ;;
1316
1317  -cache-file | --cache-file | --cache-fil | --cache-fi \
1318  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1319    ac_prev=cache_file ;;
1320  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1321  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1322    cache_file=$ac_optarg ;;
1323
1324  --config-cache | -C)
1325    cache_file=config.cache ;;
1326
1327  -datadir | --datadir | --datadi | --datad)
1328    ac_prev=datadir ;;
1329  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1330    datadir=$ac_optarg ;;
1331
1332  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1333  | --dataroo | --dataro | --datar)
1334    ac_prev=datarootdir ;;
1335  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1336  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1337    datarootdir=$ac_optarg ;;
1338
1339  -disable-* | --disable-*)
1340    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1341    # Reject names that are not valid shell variable names.
1342    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1343      as_fn_error $? "invalid feature name: $ac_useropt"
1344    ac_useropt_orig=$ac_useropt
1345    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1346    case $ac_user_opts in
1347      *"
1348"enable_$ac_useropt"
1349"*) ;;
1350      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1351	 ac_unrecognized_sep=', ';;
1352    esac
1353    eval enable_$ac_useropt=no ;;
1354
1355  -docdir | --docdir | --docdi | --doc | --do)
1356    ac_prev=docdir ;;
1357  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1358    docdir=$ac_optarg ;;
1359
1360  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1361    ac_prev=dvidir ;;
1362  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1363    dvidir=$ac_optarg ;;
1364
1365  -enable-* | --enable-*)
1366    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1367    # Reject names that are not valid shell variable names.
1368    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1369      as_fn_error $? "invalid feature name: $ac_useropt"
1370    ac_useropt_orig=$ac_useropt
1371    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1372    case $ac_user_opts in
1373      *"
1374"enable_$ac_useropt"
1375"*) ;;
1376      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1377	 ac_unrecognized_sep=', ';;
1378    esac
1379    eval enable_$ac_useropt=\$ac_optarg ;;
1380
1381  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1382  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1383  | --exec | --exe | --ex)
1384    ac_prev=exec_prefix ;;
1385  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1386  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1387  | --exec=* | --exe=* | --ex=*)
1388    exec_prefix=$ac_optarg ;;
1389
1390  -gas | --gas | --ga | --g)
1391    # Obsolete; use --with-gas.
1392    with_gas=yes ;;
1393
1394  -help | --help | --hel | --he | -h)
1395    ac_init_help=long ;;
1396  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1397    ac_init_help=recursive ;;
1398  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1399    ac_init_help=short ;;
1400
1401  -host | --host | --hos | --ho)
1402    ac_prev=host_alias ;;
1403  -host=* | --host=* | --hos=* | --ho=*)
1404    host_alias=$ac_optarg ;;
1405
1406  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1407    ac_prev=htmldir ;;
1408  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1409  | --ht=*)
1410    htmldir=$ac_optarg ;;
1411
1412  -includedir | --includedir | --includedi | --included | --include \
1413  | --includ | --inclu | --incl | --inc)
1414    ac_prev=includedir ;;
1415  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1416  | --includ=* | --inclu=* | --incl=* | --inc=*)
1417    includedir=$ac_optarg ;;
1418
1419  -infodir | --infodir | --infodi | --infod | --info | --inf)
1420    ac_prev=infodir ;;
1421  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1422    infodir=$ac_optarg ;;
1423
1424  -libdir | --libdir | --libdi | --libd)
1425    ac_prev=libdir ;;
1426  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1427    libdir=$ac_optarg ;;
1428
1429  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1430  | --libexe | --libex | --libe)
1431    ac_prev=libexecdir ;;
1432  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1433  | --libexe=* | --libex=* | --libe=*)
1434    libexecdir=$ac_optarg ;;
1435
1436  -localedir | --localedir | --localedi | --localed | --locale)
1437    ac_prev=localedir ;;
1438  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1439    localedir=$ac_optarg ;;
1440
1441  -localstatedir | --localstatedir | --localstatedi | --localstated \
1442  | --localstate | --localstat | --localsta | --localst | --locals)
1443    ac_prev=localstatedir ;;
1444  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1445  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1446    localstatedir=$ac_optarg ;;
1447
1448  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1449    ac_prev=mandir ;;
1450  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1451    mandir=$ac_optarg ;;
1452
1453  -nfp | --nfp | --nf)
1454    # Obsolete; use --without-fp.
1455    with_fp=no ;;
1456
1457  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1458  | --no-cr | --no-c | -n)
1459    no_create=yes ;;
1460
1461  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1462  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1463    no_recursion=yes ;;
1464
1465  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1466  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1467  | --oldin | --oldi | --old | --ol | --o)
1468    ac_prev=oldincludedir ;;
1469  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1470  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1471  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1472    oldincludedir=$ac_optarg ;;
1473
1474  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1475    ac_prev=prefix ;;
1476  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1477    prefix=$ac_optarg ;;
1478
1479  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1480  | --program-pre | --program-pr | --program-p)
1481    ac_prev=program_prefix ;;
1482  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1483  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1484    program_prefix=$ac_optarg ;;
1485
1486  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1487  | --program-suf | --program-su | --program-s)
1488    ac_prev=program_suffix ;;
1489  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1490  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1491    program_suffix=$ac_optarg ;;
1492
1493  -program-transform-name | --program-transform-name \
1494  | --program-transform-nam | --program-transform-na \
1495  | --program-transform-n | --program-transform- \
1496  | --program-transform | --program-transfor \
1497  | --program-transfo | --program-transf \
1498  | --program-trans | --program-tran \
1499  | --progr-tra | --program-tr | --program-t)
1500    ac_prev=program_transform_name ;;
1501  -program-transform-name=* | --program-transform-name=* \
1502  | --program-transform-nam=* | --program-transform-na=* \
1503  | --program-transform-n=* | --program-transform-=* \
1504  | --program-transform=* | --program-transfor=* \
1505  | --program-transfo=* | --program-transf=* \
1506  | --program-trans=* | --program-tran=* \
1507  | --progr-tra=* | --program-tr=* | --program-t=*)
1508    program_transform_name=$ac_optarg ;;
1509
1510  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1511    ac_prev=pdfdir ;;
1512  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1513    pdfdir=$ac_optarg ;;
1514
1515  -psdir | --psdir | --psdi | --psd | --ps)
1516    ac_prev=psdir ;;
1517  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1518    psdir=$ac_optarg ;;
1519
1520  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1521  | -silent | --silent | --silen | --sile | --sil)
1522    silent=yes ;;
1523
1524  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1525    ac_prev=sbindir ;;
1526  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1527  | --sbi=* | --sb=*)
1528    sbindir=$ac_optarg ;;
1529
1530  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1531  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1532  | --sharedst | --shareds | --shared | --share | --shar \
1533  | --sha | --sh)
1534    ac_prev=sharedstatedir ;;
1535  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1536  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1537  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1538  | --sha=* | --sh=*)
1539    sharedstatedir=$ac_optarg ;;
1540
1541  -site | --site | --sit)
1542    ac_prev=site ;;
1543  -site=* | --site=* | --sit=*)
1544    site=$ac_optarg ;;
1545
1546  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1547    ac_prev=srcdir ;;
1548  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1549    srcdir=$ac_optarg ;;
1550
1551  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1552  | --syscon | --sysco | --sysc | --sys | --sy)
1553    ac_prev=sysconfdir ;;
1554  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1555  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1556    sysconfdir=$ac_optarg ;;
1557
1558  -target | --target | --targe | --targ | --tar | --ta | --t)
1559    ac_prev=target_alias ;;
1560  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1561    target_alias=$ac_optarg ;;
1562
1563  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1564    verbose=yes ;;
1565
1566  -version | --version | --versio | --versi | --vers | -V)
1567    ac_init_version=: ;;
1568
1569  -with-* | --with-*)
1570    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1571    # Reject names that are not valid shell variable names.
1572    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1573      as_fn_error $? "invalid package name: $ac_useropt"
1574    ac_useropt_orig=$ac_useropt
1575    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1576    case $ac_user_opts in
1577      *"
1578"with_$ac_useropt"
1579"*) ;;
1580      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1581	 ac_unrecognized_sep=', ';;
1582    esac
1583    eval with_$ac_useropt=\$ac_optarg ;;
1584
1585  -without-* | --without-*)
1586    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1587    # Reject names that are not valid shell variable names.
1588    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1589      as_fn_error $? "invalid package name: $ac_useropt"
1590    ac_useropt_orig=$ac_useropt
1591    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1592    case $ac_user_opts in
1593      *"
1594"with_$ac_useropt"
1595"*) ;;
1596      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1597	 ac_unrecognized_sep=', ';;
1598    esac
1599    eval with_$ac_useropt=no ;;
1600
1601  --x)
1602    # Obsolete; use --with-x.
1603    with_x=yes ;;
1604
1605  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1606  | --x-incl | --x-inc | --x-in | --x-i)
1607    ac_prev=x_includes ;;
1608  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1609  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1610    x_includes=$ac_optarg ;;
1611
1612  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1613  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1614    ac_prev=x_libraries ;;
1615  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1616  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1617    x_libraries=$ac_optarg ;;
1618
1619  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1620Try \`$0 --help' for more information"
1621    ;;
1622
1623  *=*)
1624    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1625    # Reject names that are not valid shell variable names.
1626    case $ac_envvar in #(
1627      '' | [0-9]* | *[!_$as_cr_alnum]* )
1628      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1629    esac
1630    eval $ac_envvar=\$ac_optarg
1631    export $ac_envvar ;;
1632
1633  *)
1634    # FIXME: should be removed in autoconf 3.0.
1635    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1636    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1637      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1638    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1639    ;;
1640
1641  esac
1642done
1643
1644if test -n "$ac_prev"; then
1645  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1646  as_fn_error $? "missing argument to $ac_option"
1647fi
1648
1649if test -n "$ac_unrecognized_opts"; then
1650  case $enable_option_checking in
1651    no) ;;
1652    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1653    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1654  esac
1655fi
1656
1657# Check all directory arguments for consistency.
1658for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1659		datadir sysconfdir sharedstatedir localstatedir includedir \
1660		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1661		libdir localedir mandir
1662do
1663  eval ac_val=\$$ac_var
1664  # Remove trailing slashes.
1665  case $ac_val in
1666    */ )
1667      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1668      eval $ac_var=\$ac_val;;
1669  esac
1670  # Be sure to have absolute directory names.
1671  case $ac_val in
1672    [\\/$]* | ?:[\\/]* )  continue;;
1673    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1674  esac
1675  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1676done
1677
1678# There might be people who depend on the old broken behavior: `$host'
1679# used to hold the argument of --host etc.
1680# FIXME: To remove some day.
1681build=$build_alias
1682host=$host_alias
1683target=$target_alias
1684
1685# FIXME: To remove some day.
1686if test "x$host_alias" != x; then
1687  if test "x$build_alias" = x; then
1688    cross_compiling=maybe
1689  elif test "x$build_alias" != "x$host_alias"; then
1690    cross_compiling=yes
1691  fi
1692fi
1693
1694ac_tool_prefix=
1695test -n "$host_alias" && ac_tool_prefix=$host_alias-
1696
1697test "$silent" = yes && exec 6>/dev/null
1698
1699
1700ac_pwd=`pwd` && test -n "$ac_pwd" &&
1701ac_ls_di=`ls -di .` &&
1702ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1703  as_fn_error $? "working directory cannot be determined"
1704test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1705  as_fn_error $? "pwd does not report name of working directory"
1706
1707
1708# Find the source files, if location was not specified.
1709if test -z "$srcdir"; then
1710  ac_srcdir_defaulted=yes
1711  # Try the directory containing this script, then the parent directory.
1712  ac_confdir=`$as_dirname -- "$as_myself" ||
1713$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1714	 X"$as_myself" : 'X\(//\)[^/]' \| \
1715	 X"$as_myself" : 'X\(//\)$' \| \
1716	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1717$as_echo X"$as_myself" |
1718    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1719	    s//\1/
1720	    q
1721	  }
1722	  /^X\(\/\/\)[^/].*/{
1723	    s//\1/
1724	    q
1725	  }
1726	  /^X\(\/\/\)$/{
1727	    s//\1/
1728	    q
1729	  }
1730	  /^X\(\/\).*/{
1731	    s//\1/
1732	    q
1733	  }
1734	  s/.*/./; q'`
1735  srcdir=$ac_confdir
1736  if test ! -r "$srcdir/$ac_unique_file"; then
1737    srcdir=..
1738  fi
1739else
1740  ac_srcdir_defaulted=no
1741fi
1742if test ! -r "$srcdir/$ac_unique_file"; then
1743  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1744  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1745fi
1746ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1747ac_abs_confdir=`(
1748	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1749	pwd)`
1750# When building in place, set srcdir=.
1751if test "$ac_abs_confdir" = "$ac_pwd"; then
1752  srcdir=.
1753fi
1754# Remove unnecessary trailing slashes from srcdir.
1755# Double slashes in file names in object file debugging info
1756# mess up M-x gdb in Emacs.
1757case $srcdir in
1758*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1759esac
1760for ac_var in $ac_precious_vars; do
1761  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1762  eval ac_env_${ac_var}_value=\$${ac_var}
1763  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1764  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1765done
1766
1767#
1768# Report the --help message.
1769#
1770if test "$ac_init_help" = "long"; then
1771  # Omit some internal or obsolete options to make the list less imposing.
1772  # This message is too long to be a string in the A/UX 3.1 sh.
1773  cat <<_ACEOF
1774\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1775
1776Usage: $0 [OPTION]... [VAR=VALUE]...
1777
1778To assign environment variables (e.g., CC, CFLAGS...), specify them as
1779VAR=VALUE.  See below for descriptions of some of the useful variables.
1780
1781Defaults for the options are specified in brackets.
1782
1783Configuration:
1784  -h, --help              display this help and exit
1785      --help=short        display options specific to this package
1786      --help=recursive    display the short help of all the included packages
1787  -V, --version           display version information and exit
1788  -q, --quiet, --silent   do not print \`checking ...' messages
1789      --cache-file=FILE   cache test results in FILE [disabled]
1790  -C, --config-cache      alias for \`--cache-file=config.cache'
1791  -n, --no-create         do not create output files
1792      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1793
1794Installation directories:
1795  --prefix=PREFIX         install architecture-independent files in PREFIX
1796                          [$ac_default_prefix]
1797  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1798                          [PREFIX]
1799
1800By default, \`make install' will install all the files in
1801\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1802an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1803for instance \`--prefix=\$HOME'.
1804
1805For better control, use the options below.
1806
1807Fine tuning of the installation directories:
1808  --bindir=DIR            user executables [EPREFIX/bin]
1809  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1810  --libexecdir=DIR        program executables [EPREFIX/libexec]
1811  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1812  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1813  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1814  --libdir=DIR            object code libraries [EPREFIX/lib]
1815  --includedir=DIR        C header files [PREFIX/include]
1816  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1817  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1818  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1819  --infodir=DIR           info documentation [DATAROOTDIR/info]
1820  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1821  --mandir=DIR            man documentation [DATAROOTDIR/man]
1822  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1823  --htmldir=DIR           html documentation [DOCDIR]
1824  --dvidir=DIR            dvi documentation [DOCDIR]
1825  --pdfdir=DIR            pdf documentation [DOCDIR]
1826  --psdir=DIR             ps documentation [DOCDIR]
1827_ACEOF
1828
1829  cat <<\_ACEOF
1830
1831X features:
1832  --x-includes=DIR    X include files are in DIR
1833  --x-libraries=DIR   X library files are in DIR
1834
1835System types:
1836  --build=BUILD     configure for building on BUILD [guessed]
1837  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1838  --target=TARGET   configure for building compilers for TARGET [HOST]
1839_ACEOF
1840fi
1841
1842if test -n "$ac_init_help"; then
1843  case $ac_init_help in
1844     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1845   esac
1846  cat <<\_ACEOF
1847
1848Optional Features:
1849  --disable-option-checking  ignore unrecognized --enable/--with options
1850  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1851  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1852  --enable-openjdk-only   suppress building custom source even if present
1853                          [disabled]
1854  --enable-debug          set the debug level to fastdebug (shorthand for
1855                          --with-debug-level=fastdebug) [disabled]
1856  --disable-headful       disable building headful support (graphical UI
1857                          support) [enabled]
1858  --enable-hotspot-test-in-build
1859                          run the Queens test after Hotspot build [disabled]
1860  --enable-unlimited-crypto
1861                          Enable unlimited crypto policy [disabled]
1862  --disable-warnings-as-errors
1863                          do not consider native warnings to be an error
1864                          [enabled]
1865  --disable-debug-symbols disable generation of debug symbols [enabled]
1866  --disable-zip-debug-info
1867                          disable zipping of debug-info files [enabled]
1868  --enable-native-coverage
1869                          enable native compilation with code coverage
1870                          data[disabled]
1871  --disable-freetype-bundling
1872                          disable bundling of the freetype library with the
1873                          build result [enabled on Windows or when using
1874                          --with-freetype, disabled otherwise]
1875  --enable-sjavac         use sjavac to do fast incremental compiles
1876                          [disabled]
1877  --disable-precompiled-headers
1878                          disable using precompiled headers when compiling C++
1879                          [enabled]
1880  --enable-ccache         enable using ccache to speed up recompilations
1881                          [disabled]
1882
1883Optional Packages:
1884  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1885  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1886  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1887                          support it), e.g. --with-target-bits=32 [guessed]
1888  --with-custom-make-dir  Deprecated. Option is kept for backwards
1889                          compatibility and is ignored
1890  --with-jdk-variant      JDK variant to build (normal) [normal]
1891  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1892  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1893                          client, minimal1, kernel, zero, zeroshark, core)
1894                          [server]
1895  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1896                          optimized (HotSpot build only)) [release]
1897  --with-devkit           use this devkit for compilers, tools and resources
1898  --with-sys-root         alias for --with-sysroot for backwards compatability
1899  --with-sysroot          use this directory as sysroot
1900  --with-tools-dir        alias for --with-toolchain-path for backwards
1901                          compatibility
1902  --with-toolchain-path   prepend these directories when searching for
1903                          toolchain binaries (compilers etc)
1904  --with-extra-path       prepend these directories to the default path
1905  --with-sdk-name         use the platform SDK of the given name. [macosx]
1906  --with-conf-name        use this as the name of the configuration [generated
1907                          from important configuration options]
1908  --with-output-sync      set make output sync type if supported by make.
1909                          [recurse]
1910  --with-builddeps-conf   use this configuration file for the builddeps
1911  --with-builddeps-server download and use build dependencies from this server
1912                          url
1913  --with-builddeps-dir    store downloaded build dependencies here
1914                          [/localhome/builddeps]
1915  --with-builddeps-group  chgrp the downloaded build dependencies to this
1916                          group
1917  --with-cacerts-file     specify alternative cacerts file
1918  --with-copyright-year   Set copyright year value for build [current year]
1919  --with-milestone        Deprecated. Option is kept for backwards
1920                          compatibility and is ignored
1921  --with-update-version   Deprecated. Option is kept for backwards
1922                          compatibility and is ignored
1923  --with-user-release-suffix
1924                          Deprecated. Option is kept for backwards
1925                          compatibility and is ignored
1926  --with-build-number     Deprecated. Option is kept for backwards
1927                          compatibility and is ignored
1928  --with-version-string   Set version string [calculated]
1929  --with-version-pre      Set the base part of the version 'PRE' field
1930                          (pre-release identifier) ['internal']
1931  --with-version-opt      Set version 'OPT' field (build metadata)
1932                          [<timestamp>.<user>.<dirname>]
1933  --with-version-build    Set version 'BUILD' field (build number) [not
1934                          specified]
1935  --with-version-major    Set version 'MAJOR' field (first number) [current
1936                          source value]
1937  --with-version-minor    Set version 'MINOR' field (second number) [current
1938                          source value]
1939  --with-version-security Set version 'SECURITY' field (third number) [current
1940                          source value]
1941  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1942                          specified]
1943  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1944  --with-add-source-root  for each and every source directory, look in this
1945                          additional source root for the same directory; if it
1946                          exists and have files in it, include it in the build
1947  --with-override-source-root
1948                          for each and every source directory, look in this
1949                          override source root for the same directory; if it
1950                          exists, use that directory instead and ignore the
1951                          directory in the original source root
1952  --with-adds-and-overrides
1953                          use the subdirs 'adds' and 'overrides' in the
1954                          specified directory as add-source-root and
1955                          override-source-root
1956  --with-override-langtools
1957                          use this langtools dir for the build
1958  --with-override-corba   use this corba dir for the build
1959  --with-override-jaxp    use this jaxp dir for the build
1960  --with-override-jaxws   use this jaxws dir for the build
1961  --with-override-hotspot use this hotspot dir for the build
1962  --with-override-nashorn use this nashorn dir for the build
1963  --with-override-jdk     use this jdk dir for the build
1964  --with-import-hotspot   import hotspot binaries from this jdk image or
1965                          hotspot build dist dir instead of building from
1966                          source
1967  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1968                          to show possible values [platform dependent]
1969  --with-toolchain-version
1970                          the version of the toolchain to look for, use
1971                          '--help' to show possible values [platform
1972                          dependent]
1973  --with-jtreg            Regression Test Harness [probed]
1974  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1975  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1976  --with-extra-ldflags    extra flags to be used when linking jdk
1977  --with-x                use the X Window System
1978  --with-cups             specify prefix directory for the cups package
1979                          (expecting the headers under PATH/include)
1980  --with-cups-include     specify directory for the cups include files
1981  --with-freetype         specify prefix directory for the freetype package
1982                          (expecting the libraries under PATH/lib and the
1983                          headers under PATH/include)
1984  --with-freetype-include specify directory for the freetype include files
1985  --with-freetype-lib     specify directory for the freetype library
1986  --with-freetype-src     specify directory with freetype sources to
1987                          automatically build the library (experimental,
1988                          Windows-only)
1989  --with-alsa             specify prefix directory for the alsa package
1990                          (expecting the libraries under PATH/lib and the
1991                          headers under PATH/include)
1992  --with-alsa-include     specify directory for the alsa include files
1993  --with-alsa-lib         specify directory for the alsa library
1994  --with-libjpeg          use libjpeg from build system or OpenJDK source
1995                          (system, bundled) [bundled]
1996  --with-giflib           use giflib from build system or OpenJDK source
1997                          (system, bundled) [bundled]
1998  --with-lcms             use lcms2 from build system or OpenJDK source
1999                          (system, bundled) [bundled]
2000  --with-libpng           use libpng from build system or OpenJDK source
2001                          (system, bundled) [bundled]
2002  --with-zlib             use zlib from build system or OpenJDK source
2003                          (system, bundled) [bundled]
2004  --with-stdc++lib=<static>,<dynamic>,<default>
2005                          force linking of the C++ runtime on Linux to either
2006                          static or dynamic, default is static with dynamic as
2007                          fallback
2008  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2009                          (Windows only) [probed]
2010  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2011                          (Windows only) [probed]
2012  --with-dxsdk            Deprecated. Option is kept for backwards
2013                          compatibility and is ignored
2014  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2015                          compatibility and is ignored
2016  --with-dxsdk-include    Deprecated. Option is kept for backwards
2017                          compatibility and is ignored
2018  --with-num-cores        number of cores in the build system, e.g.
2019                          --with-num-cores=8 [probed]
2020  --with-memory-size      memory (in MB) available in the build system, e.g.
2021                          --with-memory-size=1024 [probed]
2022  --with-jobs             number of parallel jobs to let make run [calculated
2023                          based on cores and memory]
2024  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2025                          invocations of boot JDK, overriding the default
2026                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2027                          -enableassertions"
2028  --with-sjavac-server-java
2029                          use this java binary for running the sjavac
2030                          background server [Boot JDK java]
2031  --with-ccache-dir       where to store ccache files [~/.ccache]
2032
2033Some influential environment variables:
2034  BASENAME    Override default value for BASENAME
2035  BASH        Override default value for BASH
2036  CAT         Override default value for CAT
2037  CHMOD       Override default value for CHMOD
2038  CMP         Override default value for CMP
2039  COMM        Override default value for COMM
2040  CP          Override default value for CP
2041  CUT         Override default value for CUT
2042  DATE        Override default value for DATE
2043  DIFF        Override default value for DIFF
2044  DIRNAME     Override default value for DIRNAME
2045  ECHO        Override default value for ECHO
2046  EXPR        Override default value for EXPR
2047  FILE        Override default value for FILE
2048  FIND        Override default value for FIND
2049  HEAD        Override default value for HEAD
2050  LN          Override default value for LN
2051  LS          Override default value for LS
2052  MKDIR       Override default value for MKDIR
2053  MKTEMP      Override default value for MKTEMP
2054  MV          Override default value for MV
2055  NAWK        Override default value for NAWK
2056  PRINTF      Override default value for PRINTF
2057  RM          Override default value for RM
2058  SH          Override default value for SH
2059  SORT        Override default value for SORT
2060  TAIL        Override default value for TAIL
2061  TAR         Override default value for TAR
2062  TEE         Override default value for TEE
2063  TOUCH       Override default value for TOUCH
2064  TR          Override default value for TR
2065  UNAME       Override default value for UNAME
2066  UNIQ        Override default value for UNIQ
2067  WC          Override default value for WC
2068  WHICH       Override default value for WHICH
2069  XARGS       Override default value for XARGS
2070  AWK         Override default value for AWK
2071  GREP        Override default value for GREP
2072  EGREP       Override default value for EGREP
2073  FGREP       Override default value for FGREP
2074  SED         Override default value for SED
2075  CYGPATH     Override default value for CYGPATH
2076  READLINK    Override default value for READLINK
2077  DF          Override default value for DF
2078  CPIO        Override default value for CPIO
2079  UNZIP       Override default value for UNZIP
2080  ZIP         Override default value for ZIP
2081  LDD         Override default value for LDD
2082  OTOOL       Override default value for OTOOL
2083  READELF     Override default value for READELF
2084  HG          Override default value for HG
2085  STAT        Override default value for STAT
2086  TIME        Override default value for TIME
2087  PATCH       Override default value for PATCH
2088  DSYMUTIL    Override default value for DSYMUTIL
2089  XATTR       Override default value for XATTR
2090  CODESIGN    Override default value for CODESIGN
2091  SETFILE     Override default value for SETFILE
2092  PKG_CONFIG  path to pkg-config utility
2093  JAVA        Override default value for JAVA
2094  JAVAC       Override default value for JAVAC
2095  JAVAH       Override default value for JAVAH
2096  JAR         Override default value for JAR
2097  JARSIGNER   Override default value for JARSIGNER
2098  CC          C compiler command
2099  CFLAGS      C compiler flags
2100  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2101              nonstandard directory <lib dir>
2102  LIBS        libraries to pass to the linker, e.g. -l<library>
2103  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2104              you have headers in a nonstandard directory <include dir>
2105  CXX         C++ compiler command
2106  CXXFLAGS    C++ compiler flags
2107  CPP         C preprocessor
2108  CXXCPP      C++ preprocessor
2109  AS          Override default value for AS
2110  AR          Override default value for AR
2111  LIPO        Override default value for LIPO
2112  STRIP       Override default value for STRIP
2113  NM          Override default value for NM
2114  GNM         Override default value for GNM
2115  OBJCOPY     Override default value for OBJCOPY
2116  OBJDUMP     Override default value for OBJDUMP
2117  BUILD_CC    Override default value for BUILD_CC
2118  BUILD_CXX   Override default value for BUILD_CXX
2119  BUILD_LD    Override default value for BUILD_LD
2120  JTREGEXE    Override default value for JTREGEXE
2121  XMKMF       Path to xmkmf, Makefile generator for X Window System
2122  FREETYPE_CFLAGS
2123              C compiler flags for FREETYPE, overriding pkg-config
2124  FREETYPE_LIBS
2125              linker flags for FREETYPE, overriding pkg-config
2126  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2127  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2128  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2129  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2130  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2131  PNG_LIBS    linker flags for PNG, overriding pkg-config
2132  LIBFFI_CFLAGS
2133              C compiler flags for LIBFFI, overriding pkg-config
2134  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2135  CCACHE      Override default value for CCACHE
2136
2137Use these variables to override the choices made by `configure' or to help
2138it to find libraries and programs with nonstandard names/locations.
2139
2140Report bugs to <build-dev@openjdk.java.net>.
2141OpenJDK home page: <http://openjdk.java.net>.
2142_ACEOF
2143ac_status=$?
2144fi
2145
2146if test "$ac_init_help" = "recursive"; then
2147  # If there are subdirs, report their specific --help.
2148  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2149    test -d "$ac_dir" ||
2150      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2151      continue
2152    ac_builddir=.
2153
2154case "$ac_dir" in
2155.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2156*)
2157  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2158  # A ".." for each directory in $ac_dir_suffix.
2159  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2160  case $ac_top_builddir_sub in
2161  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2162  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2163  esac ;;
2164esac
2165ac_abs_top_builddir=$ac_pwd
2166ac_abs_builddir=$ac_pwd$ac_dir_suffix
2167# for backward compatibility:
2168ac_top_builddir=$ac_top_build_prefix
2169
2170case $srcdir in
2171  .)  # We are building in place.
2172    ac_srcdir=.
2173    ac_top_srcdir=$ac_top_builddir_sub
2174    ac_abs_top_srcdir=$ac_pwd ;;
2175  [\\/]* | ?:[\\/]* )  # Absolute name.
2176    ac_srcdir=$srcdir$ac_dir_suffix;
2177    ac_top_srcdir=$srcdir
2178    ac_abs_top_srcdir=$srcdir ;;
2179  *) # Relative name.
2180    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2181    ac_top_srcdir=$ac_top_build_prefix$srcdir
2182    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2183esac
2184ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2185
2186    cd "$ac_dir" || { ac_status=$?; continue; }
2187    # Check for guested configure.
2188    if test -f "$ac_srcdir/configure.gnu"; then
2189      echo &&
2190      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2191    elif test -f "$ac_srcdir/configure"; then
2192      echo &&
2193      $SHELL "$ac_srcdir/configure" --help=recursive
2194    else
2195      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2196    fi || ac_status=$?
2197    cd "$ac_pwd" || { ac_status=$?; break; }
2198  done
2199fi
2200
2201test -n "$ac_init_help" && exit $ac_status
2202if $ac_init_version; then
2203  cat <<\_ACEOF
2204OpenJDK configure jdk9
2205generated by GNU Autoconf 2.69
2206
2207Copyright (C) 2012 Free Software Foundation, Inc.
2208This configure script is free software; the Free Software Foundation
2209gives unlimited permission to copy, distribute and modify it.
2210_ACEOF
2211  exit
2212fi
2213
2214## ------------------------ ##
2215## Autoconf initialization. ##
2216## ------------------------ ##
2217
2218# ac_fn_c_try_compile LINENO
2219# --------------------------
2220# Try to compile conftest.$ac_ext, and return whether this succeeded.
2221ac_fn_c_try_compile ()
2222{
2223  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224  rm -f conftest.$ac_objext
2225  if { { ac_try="$ac_compile"
2226case "(($ac_try" in
2227  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2228  *) ac_try_echo=$ac_try;;
2229esac
2230eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2231$as_echo "$ac_try_echo"; } >&5
2232  (eval "$ac_compile") 2>conftest.err
2233  ac_status=$?
2234  if test -s conftest.err; then
2235    grep -v '^ *+' conftest.err >conftest.er1
2236    cat conftest.er1 >&5
2237    mv -f conftest.er1 conftest.err
2238  fi
2239  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2240  test $ac_status = 0; } && {
2241	 test -z "$ac_c_werror_flag" ||
2242	 test ! -s conftest.err
2243       } && test -s conftest.$ac_objext; then :
2244  ac_retval=0
2245else
2246  $as_echo "$as_me: failed program was:" >&5
2247sed 's/^/| /' conftest.$ac_ext >&5
2248
2249	ac_retval=1
2250fi
2251  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2252  as_fn_set_status $ac_retval
2253
2254} # ac_fn_c_try_compile
2255
2256# ac_fn_cxx_try_compile LINENO
2257# ----------------------------
2258# Try to compile conftest.$ac_ext, and return whether this succeeded.
2259ac_fn_cxx_try_compile ()
2260{
2261  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2262  rm -f conftest.$ac_objext
2263  if { { ac_try="$ac_compile"
2264case "(($ac_try" in
2265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2266  *) ac_try_echo=$ac_try;;
2267esac
2268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2269$as_echo "$ac_try_echo"; } >&5
2270  (eval "$ac_compile") 2>conftest.err
2271  ac_status=$?
2272  if test -s conftest.err; then
2273    grep -v '^ *+' conftest.err >conftest.er1
2274    cat conftest.er1 >&5
2275    mv -f conftest.er1 conftest.err
2276  fi
2277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2278  test $ac_status = 0; } && {
2279	 test -z "$ac_cxx_werror_flag" ||
2280	 test ! -s conftest.err
2281       } && test -s conftest.$ac_objext; then :
2282  ac_retval=0
2283else
2284  $as_echo "$as_me: failed program was:" >&5
2285sed 's/^/| /' conftest.$ac_ext >&5
2286
2287	ac_retval=1
2288fi
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290  as_fn_set_status $ac_retval
2291
2292} # ac_fn_cxx_try_compile
2293
2294# ac_fn_c_try_cpp LINENO
2295# ----------------------
2296# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2297ac_fn_c_try_cpp ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if { { ac_try="$ac_cpp conftest.$ac_ext"
2301case "(($ac_try" in
2302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303  *) ac_try_echo=$ac_try;;
2304esac
2305eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306$as_echo "$ac_try_echo"; } >&5
2307  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2308  ac_status=$?
2309  if test -s conftest.err; then
2310    grep -v '^ *+' conftest.err >conftest.er1
2311    cat conftest.er1 >&5
2312    mv -f conftest.er1 conftest.err
2313  fi
2314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315  test $ac_status = 0; } > conftest.i && {
2316	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2317	 test ! -s conftest.err
2318       }; then :
2319  ac_retval=0
2320else
2321  $as_echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324    ac_retval=1
2325fi
2326  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327  as_fn_set_status $ac_retval
2328
2329} # ac_fn_c_try_cpp
2330
2331# ac_fn_cxx_try_cpp LINENO
2332# ------------------------
2333# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2334ac_fn_cxx_try_cpp ()
2335{
2336  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337  if { { ac_try="$ac_cpp conftest.$ac_ext"
2338case "(($ac_try" in
2339  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2340  *) ac_try_echo=$ac_try;;
2341esac
2342eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2343$as_echo "$ac_try_echo"; } >&5
2344  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2345  ac_status=$?
2346  if test -s conftest.err; then
2347    grep -v '^ *+' conftest.err >conftest.er1
2348    cat conftest.er1 >&5
2349    mv -f conftest.er1 conftest.err
2350  fi
2351  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2352  test $ac_status = 0; } > conftest.i && {
2353	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2354	 test ! -s conftest.err
2355       }; then :
2356  ac_retval=0
2357else
2358  $as_echo "$as_me: failed program was:" >&5
2359sed 's/^/| /' conftest.$ac_ext >&5
2360
2361    ac_retval=1
2362fi
2363  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364  as_fn_set_status $ac_retval
2365
2366} # ac_fn_cxx_try_cpp
2367
2368# ac_fn_c_try_link LINENO
2369# -----------------------
2370# Try to link conftest.$ac_ext, and return whether this succeeded.
2371ac_fn_c_try_link ()
2372{
2373  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374  rm -f conftest.$ac_objext conftest$ac_exeext
2375  if { { ac_try="$ac_link"
2376case "(($ac_try" in
2377  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2378  *) ac_try_echo=$ac_try;;
2379esac
2380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2381$as_echo "$ac_try_echo"; } >&5
2382  (eval "$ac_link") 2>conftest.err
2383  ac_status=$?
2384  if test -s conftest.err; then
2385    grep -v '^ *+' conftest.err >conftest.er1
2386    cat conftest.er1 >&5
2387    mv -f conftest.er1 conftest.err
2388  fi
2389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2390  test $ac_status = 0; } && {
2391	 test -z "$ac_c_werror_flag" ||
2392	 test ! -s conftest.err
2393       } && test -s conftest$ac_exeext && {
2394	 test "$cross_compiling" = yes ||
2395	 test -x conftest$ac_exeext
2396       }; then :
2397  ac_retval=0
2398else
2399  $as_echo "$as_me: failed program was:" >&5
2400sed 's/^/| /' conftest.$ac_ext >&5
2401
2402	ac_retval=1
2403fi
2404  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2405  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2406  # interfere with the next link command; also delete a directory that is
2407  # left behind by Apple's compiler.  We do this before executing the actions.
2408  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2409  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2410  as_fn_set_status $ac_retval
2411
2412} # ac_fn_c_try_link
2413
2414# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2415# ---------------------------------------------------------
2416# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2417# the include files in INCLUDES and setting the cache variable VAR
2418# accordingly.
2419ac_fn_cxx_check_header_mongrel ()
2420{
2421  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422  if eval \${$3+:} false; then :
2423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2424$as_echo_n "checking for $2... " >&6; }
2425if eval \${$3+:} false; then :
2426  $as_echo_n "(cached) " >&6
2427fi
2428eval ac_res=\$$3
2429	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2430$as_echo "$ac_res" >&6; }
2431else
2432  # Is the header compilable?
2433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2434$as_echo_n "checking $2 usability... " >&6; }
2435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2436/* end confdefs.h.  */
2437$4
2438#include <$2>
2439_ACEOF
2440if ac_fn_cxx_try_compile "$LINENO"; then :
2441  ac_header_compiler=yes
2442else
2443  ac_header_compiler=no
2444fi
2445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2447$as_echo "$ac_header_compiler" >&6; }
2448
2449# Is the header present?
2450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2451$as_echo_n "checking $2 presence... " >&6; }
2452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2453/* end confdefs.h.  */
2454#include <$2>
2455_ACEOF
2456if ac_fn_cxx_try_cpp "$LINENO"; then :
2457  ac_header_preproc=yes
2458else
2459  ac_header_preproc=no
2460fi
2461rm -f conftest.err conftest.i conftest.$ac_ext
2462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2463$as_echo "$ac_header_preproc" >&6; }
2464
2465# So?  What about this header?
2466case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2467  yes:no: )
2468    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2469$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2471$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2472    ;;
2473  no:yes:* )
2474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2475$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2477$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2479$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2481$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2483$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2484( $as_echo "## ----------------------------------------- ##
2485## Report this to build-dev@openjdk.java.net ##
2486## ----------------------------------------- ##"
2487     ) | sed "s/^/$as_me: WARNING:     /" >&2
2488    ;;
2489esac
2490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2491$as_echo_n "checking for $2... " >&6; }
2492if eval \${$3+:} false; then :
2493  $as_echo_n "(cached) " >&6
2494else
2495  eval "$3=\$ac_header_compiler"
2496fi
2497eval ac_res=\$$3
2498	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2499$as_echo "$ac_res" >&6; }
2500fi
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502
2503} # ac_fn_cxx_check_header_mongrel
2504
2505# ac_fn_cxx_try_run LINENO
2506# ------------------------
2507# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2508# that executables *can* be run.
2509ac_fn_cxx_try_run ()
2510{
2511  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2512  if { { ac_try="$ac_link"
2513case "(($ac_try" in
2514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2515  *) ac_try_echo=$ac_try;;
2516esac
2517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2518$as_echo "$ac_try_echo"; } >&5
2519  (eval "$ac_link") 2>&5
2520  ac_status=$?
2521  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2522  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2523  { { case "(($ac_try" in
2524  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2525  *) ac_try_echo=$ac_try;;
2526esac
2527eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2528$as_echo "$ac_try_echo"; } >&5
2529  (eval "$ac_try") 2>&5
2530  ac_status=$?
2531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2532  test $ac_status = 0; }; }; then :
2533  ac_retval=0
2534else
2535  $as_echo "$as_me: program exited with status $ac_status" >&5
2536       $as_echo "$as_me: failed program was:" >&5
2537sed 's/^/| /' conftest.$ac_ext >&5
2538
2539       ac_retval=$ac_status
2540fi
2541  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2542  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2543  as_fn_set_status $ac_retval
2544
2545} # ac_fn_cxx_try_run
2546
2547# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2548# ---------------------------------------------------------
2549# Tests whether HEADER exists and can be compiled using the include files in
2550# INCLUDES, setting the cache variable VAR accordingly.
2551ac_fn_cxx_check_header_compile ()
2552{
2553  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2555$as_echo_n "checking for $2... " >&6; }
2556if eval \${$3+:} false; then :
2557  $as_echo_n "(cached) " >&6
2558else
2559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560/* end confdefs.h.  */
2561$4
2562#include <$2>
2563_ACEOF
2564if ac_fn_cxx_try_compile "$LINENO"; then :
2565  eval "$3=yes"
2566else
2567  eval "$3=no"
2568fi
2569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2570fi
2571eval ac_res=\$$3
2572	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2573$as_echo "$ac_res" >&6; }
2574  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2575
2576} # ac_fn_cxx_check_header_compile
2577
2578# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2579# ----------------------------------------------
2580# Tries to find the compile-time value of EXPR in a program that includes
2581# INCLUDES, setting VAR accordingly. Returns whether the value could be
2582# computed
2583ac_fn_cxx_compute_int ()
2584{
2585  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586  if test "$cross_compiling" = yes; then
2587    # Depending upon the size, compute the lo and hi bounds.
2588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2589/* end confdefs.h.  */
2590$4
2591int
2592main ()
2593{
2594static int test_array [1 - 2 * !(($2) >= 0)];
2595test_array [0] = 0;
2596return test_array [0];
2597
2598  ;
2599  return 0;
2600}
2601_ACEOF
2602if ac_fn_cxx_try_compile "$LINENO"; then :
2603  ac_lo=0 ac_mid=0
2604  while :; do
2605    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608int
2609main ()
2610{
2611static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2612test_array [0] = 0;
2613return test_array [0];
2614
2615  ;
2616  return 0;
2617}
2618_ACEOF
2619if ac_fn_cxx_try_compile "$LINENO"; then :
2620  ac_hi=$ac_mid; break
2621else
2622  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2623			if test $ac_lo -le $ac_mid; then
2624			  ac_lo= ac_hi=
2625			  break
2626			fi
2627			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2628fi
2629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630  done
2631else
2632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2633/* end confdefs.h.  */
2634$4
2635int
2636main ()
2637{
2638static int test_array [1 - 2 * !(($2) < 0)];
2639test_array [0] = 0;
2640return test_array [0];
2641
2642  ;
2643  return 0;
2644}
2645_ACEOF
2646if ac_fn_cxx_try_compile "$LINENO"; then :
2647  ac_hi=-1 ac_mid=-1
2648  while :; do
2649    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2650/* end confdefs.h.  */
2651$4
2652int
2653main ()
2654{
2655static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2656test_array [0] = 0;
2657return test_array [0];
2658
2659  ;
2660  return 0;
2661}
2662_ACEOF
2663if ac_fn_cxx_try_compile "$LINENO"; then :
2664  ac_lo=$ac_mid; break
2665else
2666  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2667			if test $ac_mid -le $ac_hi; then
2668			  ac_lo= ac_hi=
2669			  break
2670			fi
2671			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2672fi
2673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2674  done
2675else
2676  ac_lo= ac_hi=
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681# Binary search between lo and hi bounds.
2682while test "x$ac_lo" != "x$ac_hi"; do
2683  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2685/* end confdefs.h.  */
2686$4
2687int
2688main ()
2689{
2690static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2691test_array [0] = 0;
2692return test_array [0];
2693
2694  ;
2695  return 0;
2696}
2697_ACEOF
2698if ac_fn_cxx_try_compile "$LINENO"; then :
2699  ac_hi=$ac_mid
2700else
2701  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2702fi
2703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2704done
2705case $ac_lo in #((
2706?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2707'') ac_retval=1 ;;
2708esac
2709  else
2710    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2711/* end confdefs.h.  */
2712$4
2713static long int longval () { return $2; }
2714static unsigned long int ulongval () { return $2; }
2715#include <stdio.h>
2716#include <stdlib.h>
2717int
2718main ()
2719{
2720
2721  FILE *f = fopen ("conftest.val", "w");
2722  if (! f)
2723    return 1;
2724  if (($2) < 0)
2725    {
2726      long int i = longval ();
2727      if (i != ($2))
2728	return 1;
2729      fprintf (f, "%ld", i);
2730    }
2731  else
2732    {
2733      unsigned long int i = ulongval ();
2734      if (i != ($2))
2735	return 1;
2736      fprintf (f, "%lu", i);
2737    }
2738  /* Do not output a trailing newline, as this causes \r\n confusion
2739     on some platforms.  */
2740  return ferror (f) || fclose (f) != 0;
2741
2742  ;
2743  return 0;
2744}
2745_ACEOF
2746if ac_fn_cxx_try_run "$LINENO"; then :
2747  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2748else
2749  ac_retval=1
2750fi
2751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2752  conftest.$ac_objext conftest.beam conftest.$ac_ext
2753rm -f conftest.val
2754
2755  fi
2756  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2757  as_fn_set_status $ac_retval
2758
2759} # ac_fn_cxx_compute_int
2760
2761# ac_fn_cxx_try_link LINENO
2762# -------------------------
2763# Try to link conftest.$ac_ext, and return whether this succeeded.
2764ac_fn_cxx_try_link ()
2765{
2766  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2767  rm -f conftest.$ac_objext conftest$ac_exeext
2768  if { { ac_try="$ac_link"
2769case "(($ac_try" in
2770  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2771  *) ac_try_echo=$ac_try;;
2772esac
2773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2774$as_echo "$ac_try_echo"; } >&5
2775  (eval "$ac_link") 2>conftest.err
2776  ac_status=$?
2777  if test -s conftest.err; then
2778    grep -v '^ *+' conftest.err >conftest.er1
2779    cat conftest.er1 >&5
2780    mv -f conftest.er1 conftest.err
2781  fi
2782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2783  test $ac_status = 0; } && {
2784	 test -z "$ac_cxx_werror_flag" ||
2785	 test ! -s conftest.err
2786       } && test -s conftest$ac_exeext && {
2787	 test "$cross_compiling" = yes ||
2788	 test -x conftest$ac_exeext
2789       }; then :
2790  ac_retval=0
2791else
2792  $as_echo "$as_me: failed program was:" >&5
2793sed 's/^/| /' conftest.$ac_ext >&5
2794
2795	ac_retval=1
2796fi
2797  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2798  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2799  # interfere with the next link command; also delete a directory that is
2800  # left behind by Apple's compiler.  We do this before executing the actions.
2801  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2802  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2803  as_fn_set_status $ac_retval
2804
2805} # ac_fn_cxx_try_link
2806
2807# ac_fn_cxx_check_func LINENO FUNC VAR
2808# ------------------------------------
2809# Tests whether FUNC exists, setting the cache variable VAR accordingly
2810ac_fn_cxx_check_func ()
2811{
2812  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2814$as_echo_n "checking for $2... " >&6; }
2815if eval \${$3+:} false; then :
2816  $as_echo_n "(cached) " >&6
2817else
2818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h.  */
2820/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2821   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2822#define $2 innocuous_$2
2823
2824/* System header to define __stub macros and hopefully few prototypes,
2825    which can conflict with char $2 (); below.
2826    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2827    <limits.h> exists even on freestanding compilers.  */
2828
2829#ifdef __STDC__
2830# include <limits.h>
2831#else
2832# include <assert.h>
2833#endif
2834
2835#undef $2
2836
2837/* Override any GCC internal prototype to avoid an error.
2838   Use char because int might match the return type of a GCC
2839   builtin and then its argument prototype would still apply.  */
2840#ifdef __cplusplus
2841extern "C"
2842#endif
2843char $2 ();
2844/* The GNU C library defines this for functions which it implements
2845    to always fail with ENOSYS.  Some functions are actually named
2846    something starting with __ and the normal name is an alias.  */
2847#if defined __stub_$2 || defined __stub___$2
2848choke me
2849#endif
2850
2851int
2852main ()
2853{
2854return $2 ();
2855  ;
2856  return 0;
2857}
2858_ACEOF
2859if ac_fn_cxx_try_link "$LINENO"; then :
2860  eval "$3=yes"
2861else
2862  eval "$3=no"
2863fi
2864rm -f core conftest.err conftest.$ac_objext \
2865    conftest$ac_exeext conftest.$ac_ext
2866fi
2867eval ac_res=\$$3
2868	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2869$as_echo "$ac_res" >&6; }
2870  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2871
2872} # ac_fn_cxx_check_func
2873
2874# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2875# -------------------------------------------------------
2876# Tests whether HEADER exists and can be compiled using the include files in
2877# INCLUDES, setting the cache variable VAR accordingly.
2878ac_fn_c_check_header_compile ()
2879{
2880  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2882$as_echo_n "checking for $2... " >&6; }
2883if eval \${$3+:} false; then :
2884  $as_echo_n "(cached) " >&6
2885else
2886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2887/* end confdefs.h.  */
2888$4
2889#include <$2>
2890_ACEOF
2891if ac_fn_c_try_compile "$LINENO"; then :
2892  eval "$3=yes"
2893else
2894  eval "$3=no"
2895fi
2896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2897fi
2898eval ac_res=\$$3
2899	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2900$as_echo "$ac_res" >&6; }
2901  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2902
2903} # ac_fn_c_check_header_compile
2904cat >config.log <<_ACEOF
2905This file contains any messages produced by compilers while
2906running configure, to aid debugging if configure makes a mistake.
2907
2908It was created by OpenJDK $as_me jdk9, which was
2909generated by GNU Autoconf 2.69.  Invocation command line was
2910
2911  $ $0 $@
2912
2913_ACEOF
2914exec 5>>config.log
2915{
2916cat <<_ASUNAME
2917## --------- ##
2918## Platform. ##
2919## --------- ##
2920
2921hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2922uname -m = `(uname -m) 2>/dev/null || echo unknown`
2923uname -r = `(uname -r) 2>/dev/null || echo unknown`
2924uname -s = `(uname -s) 2>/dev/null || echo unknown`
2925uname -v = `(uname -v) 2>/dev/null || echo unknown`
2926
2927/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2928/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2929
2930/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2931/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2932/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2933/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2934/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2935/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2936/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2937
2938_ASUNAME
2939
2940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2941for as_dir in $PATH
2942do
2943  IFS=$as_save_IFS
2944  test -z "$as_dir" && as_dir=.
2945    $as_echo "PATH: $as_dir"
2946  done
2947IFS=$as_save_IFS
2948
2949} >&5
2950
2951cat >&5 <<_ACEOF
2952
2953
2954## ----------- ##
2955## Core tests. ##
2956## ----------- ##
2957
2958_ACEOF
2959
2960
2961# Keep a trace of the command line.
2962# Strip out --no-create and --no-recursion so they do not pile up.
2963# Strip out --silent because we don't want to record it for future runs.
2964# Also quote any args containing shell meta-characters.
2965# Make two passes to allow for proper duplicate-argument suppression.
2966ac_configure_args=
2967ac_configure_args0=
2968ac_configure_args1=
2969ac_must_keep_next=false
2970for ac_pass in 1 2
2971do
2972  for ac_arg
2973  do
2974    case $ac_arg in
2975    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2976    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2977    | -silent | --silent | --silen | --sile | --sil)
2978      continue ;;
2979    *\'*)
2980      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2981    esac
2982    case $ac_pass in
2983    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2984    2)
2985      as_fn_append ac_configure_args1 " '$ac_arg'"
2986      if test $ac_must_keep_next = true; then
2987	ac_must_keep_next=false # Got value, back to normal.
2988      else
2989	case $ac_arg in
2990	  *=* | --config-cache | -C | -disable-* | --disable-* \
2991	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2992	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2993	  | -with-* | --with-* | -without-* | --without-* | --x)
2994	    case "$ac_configure_args0 " in
2995	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2996	    esac
2997	    ;;
2998	  -* ) ac_must_keep_next=true ;;
2999	esac
3000      fi
3001      as_fn_append ac_configure_args " '$ac_arg'"
3002      ;;
3003    esac
3004  done
3005done
3006{ ac_configure_args0=; unset ac_configure_args0;}
3007{ ac_configure_args1=; unset ac_configure_args1;}
3008
3009# When interrupted or exit'd, cleanup temporary files, and complete
3010# config.log.  We remove comments because anyway the quotes in there
3011# would cause problems or look ugly.
3012# WARNING: Use '\'' to represent an apostrophe within the trap.
3013# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3014trap 'exit_status=$?
3015  # Save into config.log some information that might help in debugging.
3016  {
3017    echo
3018
3019    $as_echo "## ---------------- ##
3020## Cache variables. ##
3021## ---------------- ##"
3022    echo
3023    # The following way of writing the cache mishandles newlines in values,
3024(
3025  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3026    eval ac_val=\$$ac_var
3027    case $ac_val in #(
3028    *${as_nl}*)
3029      case $ac_var in #(
3030      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3031$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3032      esac
3033      case $ac_var in #(
3034      _ | IFS | as_nl) ;; #(
3035      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3036      *) { eval $ac_var=; unset $ac_var;} ;;
3037      esac ;;
3038    esac
3039  done
3040  (set) 2>&1 |
3041    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3042    *${as_nl}ac_space=\ *)
3043      sed -n \
3044	"s/'\''/'\''\\\\'\'''\''/g;
3045	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3046      ;; #(
3047    *)
3048      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3049      ;;
3050    esac |
3051    sort
3052)
3053    echo
3054
3055    $as_echo "## ----------------- ##
3056## Output variables. ##
3057## ----------------- ##"
3058    echo
3059    for ac_var in $ac_subst_vars
3060    do
3061      eval ac_val=\$$ac_var
3062      case $ac_val in
3063      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3064      esac
3065      $as_echo "$ac_var='\''$ac_val'\''"
3066    done | sort
3067    echo
3068
3069    if test -n "$ac_subst_files"; then
3070      $as_echo "## ------------------- ##
3071## File substitutions. ##
3072## ------------------- ##"
3073      echo
3074      for ac_var in $ac_subst_files
3075      do
3076	eval ac_val=\$$ac_var
3077	case $ac_val in
3078	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3079	esac
3080	$as_echo "$ac_var='\''$ac_val'\''"
3081      done | sort
3082      echo
3083    fi
3084
3085    if test -s confdefs.h; then
3086      $as_echo "## ----------- ##
3087## confdefs.h. ##
3088## ----------- ##"
3089      echo
3090      cat confdefs.h
3091      echo
3092    fi
3093    test "$ac_signal" != 0 &&
3094      $as_echo "$as_me: caught signal $ac_signal"
3095    $as_echo "$as_me: exit $exit_status"
3096  } >&5
3097  rm -f core *.core core.conftest.* &&
3098    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3099    exit $exit_status
3100' 0
3101for ac_signal in 1 2 13 15; do
3102  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3103done
3104ac_signal=0
3105
3106# confdefs.h avoids OS command line length limits that DEFS can exceed.
3107rm -f -r conftest* confdefs.h
3108
3109$as_echo "/* confdefs.h */" > confdefs.h
3110
3111# Predefined preprocessor variables.
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_NAME "$PACKAGE_NAME"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_VERSION "$PACKAGE_VERSION"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_STRING "$PACKAGE_STRING"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3131_ACEOF
3132
3133cat >>confdefs.h <<_ACEOF
3134#define PACKAGE_URL "$PACKAGE_URL"
3135_ACEOF
3136
3137
3138# Let the site file select an alternate cache file if it wants to.
3139# Prefer an explicitly selected file to automatically selected ones.
3140ac_site_file1=NONE
3141ac_site_file2=NONE
3142if test -n "$CONFIG_SITE"; then
3143  # We do not want a PATH search for config.site.
3144  case $CONFIG_SITE in #((
3145    -*)  ac_site_file1=./$CONFIG_SITE;;
3146    */*) ac_site_file1=$CONFIG_SITE;;
3147    *)   ac_site_file1=./$CONFIG_SITE;;
3148  esac
3149elif test "x$prefix" != xNONE; then
3150  ac_site_file1=$prefix/share/config.site
3151  ac_site_file2=$prefix/etc/config.site
3152else
3153  ac_site_file1=$ac_default_prefix/share/config.site
3154  ac_site_file2=$ac_default_prefix/etc/config.site
3155fi
3156for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3157do
3158  test "x$ac_site_file" = xNONE && continue
3159  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3160    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3161$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3162    sed 's/^/| /' "$ac_site_file" >&5
3163    . "$ac_site_file" \
3164      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3166as_fn_error $? "failed to load site script $ac_site_file
3167See \`config.log' for more details" "$LINENO" 5; }
3168  fi
3169done
3170
3171if test -r "$cache_file"; then
3172  # Some versions of bash will fail to source /dev/null (special files
3173  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3174  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3175    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3176$as_echo "$as_me: loading cache $cache_file" >&6;}
3177    case $cache_file in
3178      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3179      *)                      . "./$cache_file";;
3180    esac
3181  fi
3182else
3183  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3184$as_echo "$as_me: creating cache $cache_file" >&6;}
3185  >$cache_file
3186fi
3187
3188# Check that the precious variables saved in the cache have kept the same
3189# value.
3190ac_cache_corrupted=false
3191for ac_var in $ac_precious_vars; do
3192  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3193  eval ac_new_set=\$ac_env_${ac_var}_set
3194  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3195  eval ac_new_val=\$ac_env_${ac_var}_value
3196  case $ac_old_set,$ac_new_set in
3197    set,)
3198      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3199$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3200      ac_cache_corrupted=: ;;
3201    ,set)
3202      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3203$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3204      ac_cache_corrupted=: ;;
3205    ,);;
3206    *)
3207      if test "x$ac_old_val" != "x$ac_new_val"; then
3208	# differences in whitespace do not lead to failure.
3209	ac_old_val_w=`echo x $ac_old_val`
3210	ac_new_val_w=`echo x $ac_new_val`
3211	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3212	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3213$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3214	  ac_cache_corrupted=:
3215	else
3216	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3217$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3218	  eval $ac_var=\$ac_old_val
3219	fi
3220	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3221$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3222	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3223$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3224      fi;;
3225  esac
3226  # Pass precious variables to config.status.
3227  if test "$ac_new_set" = set; then
3228    case $ac_new_val in
3229    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3230    *) ac_arg=$ac_var=$ac_new_val ;;
3231    esac
3232    case " $ac_configure_args " in
3233      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3234      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3235    esac
3236  fi
3237done
3238if $ac_cache_corrupted; then
3239  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3241  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3242$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3243  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3244fi
3245## -------------------- ##
3246## Main body of script. ##
3247## -------------------- ##
3248
3249ac_ext=c
3250ac_cpp='$CPP $CPPFLAGS'
3251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3253ac_compiler_gnu=$ac_cv_c_compiler_gnu
3254
3255
3256
3257ac_aux_dir=
3258for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3259  if test -f "$ac_dir/install-sh"; then
3260    ac_aux_dir=$ac_dir
3261    ac_install_sh="$ac_aux_dir/install-sh -c"
3262    break
3263  elif test -f "$ac_dir/install.sh"; then
3264    ac_aux_dir=$ac_dir
3265    ac_install_sh="$ac_aux_dir/install.sh -c"
3266    break
3267  elif test -f "$ac_dir/shtool"; then
3268    ac_aux_dir=$ac_dir
3269    ac_install_sh="$ac_aux_dir/shtool install -c"
3270    break
3271  fi
3272done
3273if test -z "$ac_aux_dir"; then
3274  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3275fi
3276
3277# These three variables are undocumented and unsupported,
3278# and are intended to be withdrawn in a future Autoconf release.
3279# They can cause serious problems if a builder's source tree is in a directory
3280# whose full name contains unusual characters.
3281ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3282ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3283ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3284
3285
3286# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3287
3288#
3289# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3290# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3291#
3292# This code is free software; you can redistribute it and/or modify it
3293# under the terms of the GNU General Public License version 2 only, as
3294# published by the Free Software Foundation.  Oracle designates this
3295# particular file as subject to the "Classpath" exception as provided
3296# by Oracle in the LICENSE file that accompanied this code.
3297#
3298# This code is distributed in the hope that it will be useful, but WITHOUT
3299# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3300# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3301# version 2 for more details (a copy is included in the LICENSE file that
3302# accompanied this code).
3303#
3304# You should have received a copy of the GNU General Public License version
3305# 2 along with this work; if not, write to the Free Software Foundation,
3306# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3307#
3308# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3309# or visit www.oracle.com if you need additional information or have any
3310# questions.
3311#
3312
3313#
3314# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3315#
3316# This program is free software; you can redistribute it and/or modify
3317# it under the terms of the GNU General Public License as published by
3318# the Free Software Foundation; either version 2 of the License, or
3319# (at your option) any later version.
3320#
3321# This program is distributed in the hope that it will be useful, but
3322# WITHOUT ANY WARRANTY; without even the implied warranty of
3323# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3324# General Public License for more details.
3325#
3326# You should have received a copy of the GNU General Public License
3327# along with this program; if not, write to the Free Software
3328# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3329#
3330# As a special exception to the GNU General Public License, if you
3331# distribute this file as part of a program that contains a
3332# configuration script generated by Autoconf, you may include it under
3333# the same distribution terms that you use for the rest of that program.
3334
3335# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3336# ----------------------------------
3337# PKG_PROG_PKG_CONFIG
3338
3339# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3340#
3341# Check to see whether a particular set of modules exists.  Similar
3342# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3343#
3344#
3345# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3346# this or PKG_CHECK_MODULES is called, or make sure to call
3347# PKG_CHECK_EXISTS manually
3348# --------------------------------------------------------------
3349
3350
3351
3352# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3353# ---------------------------------------------
3354# _PKG_CONFIG
3355
3356# _PKG_SHORT_ERRORS_SUPPORTED
3357# -----------------------------
3358# _PKG_SHORT_ERRORS_SUPPORTED
3359
3360
3361# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3362# [ACTION-IF-NOT-FOUND])
3363#
3364#
3365# Note that if there is a possibility the first call to
3366# PKG_CHECK_MODULES might not happen, you should be sure to include an
3367# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3368#
3369#
3370# --------------------------------------------------------------
3371# PKG_CHECK_MODULES
3372
3373
3374# Include these first...
3375#
3376# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3377# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3378#
3379# This code is free software; you can redistribute it and/or modify it
3380# under the terms of the GNU General Public License version 2 only, as
3381# published by the Free Software Foundation.  Oracle designates this
3382# particular file as subject to the "Classpath" exception as provided
3383# by Oracle in the LICENSE file that accompanied this code.
3384#
3385# This code is distributed in the hope that it will be useful, but WITHOUT
3386# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3387# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3388# version 2 for more details (a copy is included in the LICENSE file that
3389# accompanied this code).
3390#
3391# You should have received a copy of the GNU General Public License version
3392# 2 along with this work; if not, write to the Free Software Foundation,
3393# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3394#
3395# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3396# or visit www.oracle.com if you need additional information or have any
3397# questions.
3398#
3399
3400# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3401# If so, then append $1 to $2 \
3402# Also set JVM_ARG_OK to true/false depending on outcome.
3403
3404
3405# Appends a string to a path variable, only adding the : when needed.
3406
3407
3408# Prepends a string to a path variable, only adding the : when needed.
3409
3410
3411# This will make sure the given variable points to a full and proper
3412# path. This means:
3413# 1) There will be no spaces in the path. On unix platforms,
3414#    spaces in the path will result in an error. On Windows,
3415#    the path will be rewritten using short-style to be space-free.
3416# 2) The path will be absolute, and it will be in unix-style (on
3417#     cygwin).
3418# $1: The name of the variable to fix
3419
3420
3421# This will make sure the given variable points to a executable
3422# with a full and proper path. This means:
3423# 1) There will be no spaces in the path. On unix platforms,
3424#    spaces in the path will result in an error. On Windows,
3425#    the path will be rewritten using short-style to be space-free.
3426# 2) The path will be absolute, and it will be in unix-style (on
3427#     cygwin).
3428# Any arguments given to the executable is preserved.
3429# If the input variable does not have a directory specification, then
3430# it need to be in the PATH.
3431# $1: The name of the variable to fix
3432
3433
3434
3435
3436# Register a --with argument but mark it as deprecated
3437# $1: The name of the with argument to deprecate, not including --with-
3438
3439
3440# Register a --enable argument but mark it as deprecated
3441# $1: The name of the with argument to deprecate, not including --enable-
3442# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3443
3444
3445
3446
3447# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3448# $1: variable to check
3449
3450
3451# Check that there are no unprocessed overridden variables left.
3452# If so, they are an incorrect argument and we will exit with an error.
3453
3454
3455# Setup a tool for the given variable. If correctly specified by the user,
3456# use that value, otherwise search for the tool using the supplied code snippet.
3457# $1: variable to set
3458# $2: code snippet to call to look for the tool
3459
3460
3461# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3462# $1: variable to set
3463# $2: executable name (or list of names) to look for
3464
3465
3466# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3467# $1: variable to set
3468# $2: executable name (or list of names) to look for
3469
3470
3471# Like BASIC_PATH_PROGS but fails if no tool was found.
3472# $1: variable to set
3473# $2: executable name (or list of names) to look for
3474
3475
3476# Like BASIC_SETUP_TOOL but fails if no tool was found.
3477# $1: variable to set
3478# $2: autoconf macro to call to look for the special tool
3479
3480
3481# Setup the most fundamental tools that relies on not much else to set up,
3482# but is used by much of the early bootstrap code.
3483
3484
3485# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3486
3487
3488# Evaluates platform specific overrides for devkit variables.
3489# $1: Name of variable
3490
3491
3492
3493
3494
3495
3496#%%% Simple tools %%%
3497
3498# Check if we have found a usable version of make
3499# $1: the path to a potential make binary (or empty)
3500# $2: the description on how we found this
3501
3502
3503
3504
3505# Goes looking for a usable version of GNU make.
3506
3507
3508
3509
3510
3511
3512# Check if build directory is on local disk. If not possible to determine,
3513# we prefer to claim it's local.
3514# Argument 1: directory to test
3515# Argument 2: what to do if it is on local disk
3516# Argument 3: what to do otherwise (remote disk or failure)
3517
3518
3519# Check that source files have basic read permissions set. This might
3520# not be the case in cygwin in certain conditions.
3521
3522
3523
3524
3525# Check for support for specific options in bash
3526
3527
3528# Code to run after AC_OUTPUT
3529
3530
3531#
3532# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3533# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3534#
3535# This code is free software; you can redistribute it and/or modify it
3536# under the terms of the GNU General Public License version 2 only, as
3537# published by the Free Software Foundation.  Oracle designates this
3538# particular file as subject to the "Classpath" exception as provided
3539# by Oracle in the LICENSE file that accompanied this code.
3540#
3541# This code is distributed in the hope that it will be useful, but WITHOUT
3542# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3543# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3544# version 2 for more details (a copy is included in the LICENSE file that
3545# accompanied this code).
3546#
3547# You should have received a copy of the GNU General Public License version
3548# 2 along with this work; if not, write to the Free Software Foundation,
3549# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3550#
3551# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3552# or visit www.oracle.com if you need additional information or have any
3553# questions.
3554#
3555
3556
3557
3558
3559
3560# Helper function which possibly converts a path using DOS-style short mode.
3561# If so, the updated path is stored in $new_path.
3562# $1: The path to check
3563
3564
3565# Helper function which possibly converts a path using DOS-style short mode.
3566# If so, the updated path is stored in $new_path.
3567# $1: The path to check
3568
3569
3570# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3571# and could probably be heavily simplified. However, all changes in this
3572# area tend to need lot of testing in different scenarios, and in lack of
3573# proper unit testing, cleaning this up has not been deemed worth the effort
3574# at the moment.
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3585
3586
3587
3588
3589#
3590# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3591# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3592#
3593# This code is free software; you can redistribute it and/or modify it
3594# under the terms of the GNU General Public License version 2 only, as
3595# published by the Free Software Foundation.  Oracle designates this
3596# particular file as subject to the "Classpath" exception as provided
3597# by Oracle in the LICENSE file that accompanied this code.
3598#
3599# This code is distributed in the hope that it will be useful, but WITHOUT
3600# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3601# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3602# version 2 for more details (a copy is included in the LICENSE file that
3603# accompanied this code).
3604#
3605# You should have received a copy of the GNU General Public License version
3606# 2 along with this work; if not, write to the Free Software Foundation,
3607# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3608#
3609# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3610# or visit www.oracle.com if you need additional information or have any
3611# questions.
3612#
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624# ... then the rest
3625#
3626# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3627# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3628#
3629# This code is free software; you can redistribute it and/or modify it
3630# under the terms of the GNU General Public License version 2 only, as
3631# published by the Free Software Foundation.  Oracle designates this
3632# particular file as subject to the "Classpath" exception as provided
3633# by Oracle in the LICENSE file that accompanied this code.
3634#
3635# This code is distributed in the hope that it will be useful, but WITHOUT
3636# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3637# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3638# version 2 for more details (a copy is included in the LICENSE file that
3639# accompanied this code).
3640#
3641# You should have received a copy of the GNU General Public License version
3642# 2 along with this work; if not, write to the Free Software Foundation,
3643# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3644#
3645# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3646# or visit www.oracle.com if you need additional information or have any
3647# questions.
3648#
3649
3650########################################################################
3651# This file handles detection of the Boot JDK. The Boot JDK detection
3652# process has been developed as a response to solve a complex real-world
3653# problem. Initially, it was simple, but it has grown as platform after
3654# platform, idiosyncracy after idiosyncracy has been supported.
3655#
3656# The basic idea is this:
3657# 1) You need an acceptable *) JDK to use as a Boot JDK
3658# 2) There are several ways to locate a JDK, that are mostly platform
3659#    dependent **)
3660# 3) You can have multiple JDKs installed
3661# 4) If possible, configure should try to dig out an acceptable JDK
3662#    automatically, without having to resort to command-line options
3663#
3664# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3665#     javac) and not a JRE, etc.
3666#
3667# **) On Windows we typically use a well-known path.
3668#     On MacOSX we typically use the tool java_home.
3669#     On Linux we typically find javac in the $PATH, and then follow a
3670#     chain of symlinks that often ends up in a real JDK.
3671#
3672# This leads to the code where we check in different ways to locate a
3673# JDK, and if one is found, check if it is acceptable. If not, we print
3674# our reasons for rejecting it (useful when debugging non-working
3675# configure situations) and continue checking the next one.
3676########################################################################
3677
3678# Execute the check given as argument, and verify the result
3679# If the Boot JDK was previously found, do nothing
3680# $1 A command line (typically autoconf macro) to execute
3681
3682
3683# Test: Is bootjdk explicitely set by command line arguments?
3684
3685
3686# Test: Is bootjdk available from builddeps?
3687
3688
3689# Test: Is $JAVA_HOME set?
3690
3691
3692# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3693
3694
3695# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3696# $1: Argument to the java_home binary (optional)
3697
3698
3699# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3700
3701
3702# Look for a jdk in the given path. If there are multiple, try to select the newest.
3703# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3704# $1 = Path to directory containing jdk installations.
3705# $2 = String to append to the found JDK directory to get the proper JDK home
3706
3707
3708# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3709# environmental variable as base for where to look.
3710# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3711
3712
3713# Test: Is there a JDK installed in default, well-known locations?
3714
3715
3716# Check that a command-line tool in the Boot JDK is correct
3717# $1 = name of variable to assign
3718# $2 = name of binary
3719
3720
3721###############################################################################
3722#
3723# We need a Boot JDK to bootstrap the build.
3724#
3725
3726
3727
3728
3729
3730#
3731# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3732# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733#
3734# This code is free software; you can redistribute it and/or modify it
3735# under the terms of the GNU General Public License version 2 only, as
3736# published by the Free Software Foundation.  Oracle designates this
3737# particular file as subject to the "Classpath" exception as provided
3738# by Oracle in the LICENSE file that accompanied this code.
3739#
3740# This code is distributed in the hope that it will be useful, but WITHOUT
3741# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743# version 2 for more details (a copy is included in the LICENSE file that
3744# accompanied this code).
3745#
3746# You should have received a copy of the GNU General Public License version
3747# 2 along with this work; if not, write to the Free Software Foundation,
3748# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749#
3750# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751# or visit www.oracle.com if you need additional information or have any
3752# questions.
3753#
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774#
3775# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3776# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3777#
3778# This code is free software; you can redistribute it and/or modify it
3779# under the terms of the GNU General Public License version 2 only, as
3780# published by the Free Software Foundation.  Oracle designates this
3781# particular file as subject to the "Classpath" exception as provided
3782# by Oracle in the LICENSE file that accompanied this code.
3783#
3784# This code is distributed in the hope that it will be useful, but WITHOUT
3785# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3786# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3787# version 2 for more details (a copy is included in the LICENSE file that
3788# accompanied this code).
3789#
3790# You should have received a copy of the GNU General Public License version
3791# 2 along with this work; if not, write to the Free Software Foundation,
3792# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3793#
3794# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3795# or visit www.oracle.com if you need additional information or have any
3796# questions.
3797#
3798
3799
3800
3801
3802
3803# Documentation on common flags used for solstudio in HIGHEST.
3804#
3805# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3806#          done with care, there are some assumptions below that need to
3807#          be understood about the use of pointers, and IEEE behavior.
3808#
3809# -fns: Use non-standard floating point mode (not IEEE 754)
3810# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3811# -fsingle: Use single precision floating point with 'float'
3812# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3813#   (Source with excessing pointer casting and data access with mixed
3814#    pointer types are not recommended)
3815# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3816#   (If you expect perfect errno behavior, do not use this)
3817# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3818# -xrestrict: Pointer parameters to functions do not overlap
3819#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3820#    If you pass in multiple pointers to the same data, do not use this)
3821# -xlibmil: Inline some library routines
3822#   (If you expect perfect errno behavior, do not use this)
3823# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3824#   (If you expect perfect errno behavior, do not use this)
3825#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3826
3827    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3828    # Bug?
3829    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3830    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3831    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3832    #fi
3833
3834
3835
3836
3837
3838# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3839#                                   [RUN-IF-FALSE])
3840# ------------------------------------------------------------
3841# Check that the c and c++ compilers support an argument
3842
3843
3844# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3845#                                    [RUN-IF-FALSE])
3846# ------------------------------------------------------------
3847# Check that the linker support an argument
3848
3849
3850
3851
3852#
3853# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3854# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3855#
3856# This code is free software; you can redistribute it and/or modify it
3857# under the terms of the GNU General Public License version 2 only, as
3858# published by the Free Software Foundation.  Oracle designates this
3859# particular file as subject to the "Classpath" exception as provided
3860# by Oracle in the LICENSE file that accompanied this code.
3861#
3862# This code is distributed in the hope that it will be useful, but WITHOUT
3863# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3864# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3865# version 2 for more details (a copy is included in the LICENSE file that
3866# accompanied this code).
3867#
3868# You should have received a copy of the GNU General Public License version
3869# 2 along with this work; if not, write to the Free Software Foundation,
3870# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3871#
3872# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3873# or visit www.oracle.com if you need additional information or have any
3874# questions.
3875#
3876
3877
3878
3879
3880
3881cygwin_help() {
3882  case $1 in
3883    unzip)
3884      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3885      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3886      ;;
3887    zip)
3888      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3889      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3890      ;;
3891    make)
3892      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3893      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3894      ;;
3895    freetype)
3896      HELP_MSG="
3897The freetype library can now be build during the configure process.
3898Download the freetype sources and unpack them into an arbitrary directory:
3899
3900wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3901tar -xzf freetype-2.5.3.tar.gz
3902
3903Then run configure with '--with-freetype-src=<freetype_src>'. This will
3904automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3905builds or into '<freetype_src>/lib32' for 32-bit builds.
3906Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3907and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3908      ;;
3909  esac
3910}
3911
3912msys_help() {
3913  PKGHANDLER_COMMAND=""
3914}
3915
3916apt_help() {
3917  case $1 in
3918    devkit)
3919      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3920    openjdk)
3921      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3922    alsa)
3923      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3924    cups)
3925      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3926    freetype)
3927      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3928    pulse)
3929      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3930    x11)
3931      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3932    ccache)
3933      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3934  esac
3935}
3936
3937yum_help() {
3938  case $1 in
3939    devkit)
3940      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3941    openjdk)
3942      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3943    alsa)
3944      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3945    cups)
3946      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3947    freetype)
3948      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3949    pulse)
3950      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3951    x11)
3952      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3953    ccache)
3954      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3955  esac
3956}
3957
3958port_help() {
3959  PKGHANDLER_COMMAND=""
3960}
3961
3962pkgutil_help() {
3963  PKGHANDLER_COMMAND=""
3964}
3965
3966pkgadd_help() {
3967  PKGHANDLER_COMMAND=""
3968}
3969
3970# This function will check if we're called from the "configure" wrapper while
3971# printing --help. If so, we will print out additional information that can
3972# only be extracted within the autoconf script, and then exit. This must be
3973# called at the very beginning in configure.ac.
3974
3975
3976
3977
3978
3979
3980#
3981# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3982# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3983#
3984# This code is free software; you can redistribute it and/or modify it
3985# under the terms of the GNU General Public License version 2 only, as
3986# published by the Free Software Foundation.  Oracle designates this
3987# particular file as subject to the "Classpath" exception as provided
3988# by Oracle in the LICENSE file that accompanied this code.
3989#
3990# This code is distributed in the hope that it will be useful, but WITHOUT
3991# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3992# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3993# version 2 for more details (a copy is included in the LICENSE file that
3994# accompanied this code).
3995#
3996# You should have received a copy of the GNU General Public License version
3997# 2 along with this work; if not, write to the Free Software Foundation,
3998# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3999#
4000# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4001# or visit www.oracle.com if you need additional information or have any
4002# questions.
4003#
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014###############################################################################
4015#
4016# Should we build only OpenJDK even if closed sources are present?
4017#
4018
4019
4020
4021
4022
4023
4024###############################################################################
4025#
4026# Enable or disable the elliptic curve crypto implementation
4027#
4028
4029
4030
4031
4032
4033################################################################################
4034#
4035# Gcov coverage data for hotspot
4036#
4037
4038
4039#
4040# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4041# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4042#
4043# This code is free software; you can redistribute it and/or modify it
4044# under the terms of the GNU General Public License version 2 only, as
4045# published by the Free Software Foundation.  Oracle designates this
4046# particular file as subject to the "Classpath" exception as provided
4047# by Oracle in the LICENSE file that accompanied this code.
4048#
4049# This code is distributed in the hope that it will be useful, but WITHOUT
4050# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4051# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4052# version 2 for more details (a copy is included in the LICENSE file that
4053# accompanied this code).
4054#
4055# You should have received a copy of the GNU General Public License version
4056# 2 along with this work; if not, write to the Free Software Foundation,
4057# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4058#
4059# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4060# or visit www.oracle.com if you need additional information or have any
4061# questions.
4062#
4063
4064###############################################################################
4065#
4066# Setup version numbers
4067#
4068
4069# Verify that a given string represents a valid version number, and assign it
4070# to a variable.
4071
4072# Argument 1: the variable to assign to
4073# Argument 2: the value given by the user
4074
4075
4076
4077
4078#
4079# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4080# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4081#
4082# This code is free software; you can redistribute it and/or modify it
4083# under the terms of the GNU General Public License version 2 only, as
4084# published by the Free Software Foundation.  Oracle designates this
4085# particular file as subject to the "Classpath" exception as provided
4086# by Oracle in the LICENSE file that accompanied this code.
4087#
4088# This code is distributed in the hope that it will be useful, but WITHOUT
4089# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4090# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4091# version 2 for more details (a copy is included in the LICENSE file that
4092# accompanied this code).
4093#
4094# You should have received a copy of the GNU General Public License version
4095# 2 along with this work; if not, write to the Free Software Foundation,
4096# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4097#
4098# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4099# or visit www.oracle.com if you need additional information or have any
4100# questions.
4101#
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
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# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4149# Converts autoconf style CPU name to OpenJDK style, into
4150# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4151
4152
4153# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4154# Converts autoconf style OS name to OpenJDK style, into
4155# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4156
4157
4158# Expects $host_os $host_cpu $build_os and $build_cpu
4159# and $with_target_bits to have been setup!
4160#
4161# Translate the standard triplet(quadruplet) definition
4162# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4163# OPENJDK_BUILD_OS, etc.
4164
4165
4166# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4167# accordingly. Must be done after setting up build and target system, but before
4168# doing anything else with these values.
4169
4170
4171# Setup the legacy variables, for controlling the old makefiles.
4172#
4173
4174
4175
4176
4177#%%% Build and target systems %%%
4178
4179
4180
4181
4182# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4183# Add -mX to various FLAGS variables.
4184
4185
4186
4187
4188
4189
4190#
4191# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4192# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4193#
4194# This code is free software; you can redistribute it and/or modify it
4195# under the terms of the GNU General Public License version 2 only, as
4196# published by the Free Software Foundation.  Oracle designates this
4197# particular file as subject to the "Classpath" exception as provided
4198# by Oracle in the LICENSE file that accompanied this code.
4199#
4200# This code is distributed in the hope that it will be useful, but WITHOUT
4201# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4202# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4203# version 2 for more details (a copy is included in the LICENSE file that
4204# accompanied this code).
4205#
4206# You should have received a copy of the GNU General Public License version
4207# 2 along with this work; if not, write to the Free Software Foundation,
4208# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4209#
4210# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4211# or visit www.oracle.com if you need additional information or have any
4212# questions.
4213#
4214
4215
4216
4217
4218
4219
4220
4221
4222#
4223# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4224# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4225#
4226# This code is free software; you can redistribute it and/or modify it
4227# under the terms of the GNU General Public License version 2 only, as
4228# published by the Free Software Foundation.  Oracle designates this
4229# particular file as subject to the "Classpath" exception as provided
4230# by Oracle in the LICENSE file that accompanied this code.
4231#
4232# This code is distributed in the hope that it will be useful, but WITHOUT
4233# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4234# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4235# version 2 for more details (a copy is included in the LICENSE file that
4236# accompanied this code).
4237#
4238# You should have received a copy of the GNU General Public License version
4239# 2 along with this work; if not, write to the Free Software Foundation,
4240# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4241#
4242# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4243# or visit www.oracle.com if you need additional information or have any
4244# questions.
4245#
4246
4247########################################################################
4248# This file is responsible for detecting, verifying and setting up the
4249# toolchain, i.e. the compiler, linker and related utilities. It will setup
4250# proper paths to the binaries, but it will not setup any flags.
4251#
4252# The binaries used is determined by the toolchain type, which is the family of
4253# compilers and related tools that are used.
4254########################################################################
4255
4256
4257# All valid toolchains, regardless of platform (used by help.m4)
4258VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4259
4260# These toolchains are valid on different platforms
4261VALID_TOOLCHAINS_linux="gcc clang"
4262VALID_TOOLCHAINS_solaris="solstudio"
4263VALID_TOOLCHAINS_macosx="gcc clang"
4264VALID_TOOLCHAINS_aix="xlc"
4265VALID_TOOLCHAINS_windows="microsoft"
4266
4267# Toolchain descriptions
4268TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4269TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4270TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4271TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4272TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4273
4274# Setup a number of variables describing how native output files are
4275# named on this platform/toolchain.
4276
4277
4278# Determine which toolchain type to use, and make sure it is valid for this
4279# platform. Setup various information about the selected toolchain.
4280
4281
4282# Before we start detecting the toolchain executables, we might need some
4283# special setup, e.g. additional paths etc.
4284
4285
4286# Restore path, etc
4287
4288
4289# Check if a compiler is of the toolchain type we expect, and save the version
4290# information from it. If the compiler does not match the expected type,
4291# this function will abort using AC_MSG_ERROR. If it matches, the version will
4292# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4293# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4294#
4295# $1 = compiler to test (CC or CXX)
4296# $2 = human readable name of compiler (C or C++)
4297
4298
4299# Try to locate the given C or C++ compiler in the path, or otherwise.
4300#
4301# $1 = compiler to test (CC or CXX)
4302# $2 = human readable name of compiler (C or C++)
4303# $3 = list of compiler names to search for
4304
4305
4306# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4307# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4308# archiver (AR). Verify that the compilers are correct according to the
4309# toolchain type.
4310
4311
4312# Setup additional tools that is considered a part of the toolchain, but not the
4313# core part. Many of these are highly platform-specific and do not exist,
4314# and/or are not needed on all platforms.
4315
4316
4317# Setup the build tools (i.e, the compiler and linker used to build programs
4318# that should be run on the build platform, not the target platform, as a build
4319# helper). Since the non-cross-compile case uses the normal, target compilers
4320# for this, we can only do this after these have been setup.
4321
4322
4323# Setup legacy variables that are still needed as alternative ways to refer to
4324# parts of the toolchain.
4325
4326
4327# Do some additional checks on the detected tools.
4328
4329
4330# Setup the JTReg Regression Test Harness.
4331
4332
4333#
4334# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4335# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4336#
4337# This code is free software; you can redistribute it and/or modify it
4338# under the terms of the GNU General Public License version 2 only, as
4339# published by the Free Software Foundation.  Oracle designates this
4340# particular file as subject to the "Classpath" exception as provided
4341# by Oracle in the LICENSE file that accompanied this code.
4342#
4343# This code is distributed in the hope that it will be useful, but WITHOUT
4344# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4345# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4346# version 2 for more details (a copy is included in the LICENSE file that
4347# accompanied this code).
4348#
4349# You should have received a copy of the GNU General Public License version
4350# 2 along with this work; if not, write to the Free Software Foundation,
4351# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4352#
4353# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4354# or visit www.oracle.com if you need additional information or have any
4355# questions.
4356#
4357
4358################################################################################
4359# The order of these defines the priority by which we try to find them.
4360VALID_VS_VERSIONS="2013 2012 2010"
4361
4362VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4363VS_VERSION_INTERNAL_2010=100
4364VS_MSVCR_2010=msvcr100.dll
4365# We don't use msvcp on Visual Studio 2010
4366#VS_MSVCP_2010=msvcp100.dll
4367VS_ENVVAR_2010="VS100COMNTOOLS"
4368VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4369VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4370VS_VS_PLATFORM_NAME_2010="v100"
4371VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4372
4373VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4374VS_VERSION_INTERNAL_2012=110
4375VS_MSVCR_2012=msvcr110.dll
4376VS_MSVCP_2012=msvcp110.dll
4377VS_ENVVAR_2012="VS110COMNTOOLS"
4378VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4379VS_SDK_INSTALLDIR_2012=
4380VS_VS_PLATFORM_NAME_2012="v110"
4381VS_SDK_PLATFORM_NAME_2012=
4382
4383VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4384VS_VERSION_INTERNAL_2013=120
4385VS_MSVCR_2013=msvcr120.dll
4386VS_MSVCP_2013=msvcp120.dll
4387VS_ENVVAR_2013="VS120COMNTOOLS"
4388VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4389VS_SDK_INSTALLDIR_2013=
4390VS_VS_PLATFORM_NAME_2013="v120"
4391VS_SDK_PLATFORM_NAME_2013=
4392
4393################################################################################
4394
4395
4396
4397################################################################################
4398
4399
4400
4401################################################################################
4402# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4403# build environment and assigns it to VS_ENV_CMD
4404
4405
4406################################################################################
4407
4408
4409
4410################################################################################
4411# Check if the VS env variables were setup prior to running configure.
4412# If not, then find vcvarsall.bat and run it automatically, and integrate
4413# the set env variables into the spec file.
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428# This line needs to be here, verbatim, after all includes and the dummy hook
4429# definitions. It is replaced with custom functionality when building
4430# custom sources.
4431#CUSTOM_AUTOCONF_INCLUDE
4432
4433# Do not change or remove the following line, it is needed for consistency checks:
4434DATE_WHEN_GENERATED=1445335893
4435
4436###############################################################################
4437#
4438# Initialization / Boot-strapping
4439#
4440# The bootstrapping process needs to solve the "chicken or the egg" problem,
4441# thus it jumps back and forth, each time gaining something needed later on.
4442#
4443###############################################################################
4444
4445# If we are requested to print additional help, do that and then exit.
4446# This must be the very first call.
4447
4448  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4449    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4450    $PRINTF "Which are valid to use depends on the build platform.\n"
4451    for toolchain in $VALID_TOOLCHAINS_all; do
4452      # Use indirect variable referencing
4453      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4454      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4455      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4456    done
4457
4458    # And now exit directly
4459    exit 0
4460  fi
4461
4462
4463# Basic initialization that must happen first of all in the normal process.
4464
4465  # Save the original command line. This is passed to us by the wrapper configure script.
4466
4467  # Save the path variable before it gets changed
4468  ORIGINAL_PATH="$PATH"
4469
4470  DATE_WHEN_CONFIGURED=`LANG=C date`
4471
4472  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4473$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4474  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4475$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4476
4477
4478  # Start with tools that do not need have cross compilation support
4479  # and can be expected to be found in the default PATH. These tools are
4480  # used by configure. Nor are these tools expected to be found in the
4481  # devkit from the builddeps server either, since they are
4482  # needed to download the devkit.
4483
4484  # First are all the simple required tools.
4485
4486
4487
4488  # Publish this variable in the help.
4489
4490
4491  if test "x$BASENAME" = x; then
4492    # The variable is not set by user, try to locate tool using the code snippet
4493    for ac_prog in basename
4494do
4495  # Extract the first word of "$ac_prog", so it can be a program name with args.
4496set dummy $ac_prog; ac_word=$2
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4498$as_echo_n "checking for $ac_word... " >&6; }
4499if ${ac_cv_path_BASENAME+:} false; then :
4500  $as_echo_n "(cached) " >&6
4501else
4502  case $BASENAME in
4503  [\\/]* | ?:[\\/]*)
4504  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4505  ;;
4506  *)
4507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH
4509do
4510  IFS=$as_save_IFS
4511  test -z "$as_dir" && as_dir=.
4512    for ac_exec_ext in '' $ac_executable_extensions; do
4513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4514    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4516    break 2
4517  fi
4518done
4519  done
4520IFS=$as_save_IFS
4521
4522  ;;
4523esac
4524fi
4525BASENAME=$ac_cv_path_BASENAME
4526if test -n "$BASENAME"; then
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4528$as_echo "$BASENAME" >&6; }
4529else
4530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4531$as_echo "no" >&6; }
4532fi
4533
4534
4535  test -n "$BASENAME" && break
4536done
4537
4538  else
4539    # The variable is set, but is it from the command line or the environment?
4540
4541    # Try to remove the string !BASENAME! from our list.
4542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4544      # If it failed, the variable was not from the command line. Ignore it,
4545      # but warn the user (except for BASH, which is always set by the calling BASH).
4546      if test "xBASENAME" != xBASH; then
4547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4548$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4549      fi
4550      # Try to locate tool using the code snippet
4551      for ac_prog in basename
4552do
4553  # Extract the first word of "$ac_prog", so it can be a program name with args.
4554set dummy $ac_prog; ac_word=$2
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4556$as_echo_n "checking for $ac_word... " >&6; }
4557if ${ac_cv_path_BASENAME+:} false; then :
4558  $as_echo_n "(cached) " >&6
4559else
4560  case $BASENAME in
4561  [\\/]* | ?:[\\/]*)
4562  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4563  ;;
4564  *)
4565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566for as_dir in $PATH
4567do
4568  IFS=$as_save_IFS
4569  test -z "$as_dir" && as_dir=.
4570    for ac_exec_ext in '' $ac_executable_extensions; do
4571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4572    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4574    break 2
4575  fi
4576done
4577  done
4578IFS=$as_save_IFS
4579
4580  ;;
4581esac
4582fi
4583BASENAME=$ac_cv_path_BASENAME
4584if test -n "$BASENAME"; then
4585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4586$as_echo "$BASENAME" >&6; }
4587else
4588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4589$as_echo "no" >&6; }
4590fi
4591
4592
4593  test -n "$BASENAME" && break
4594done
4595
4596    else
4597      # If it succeeded, then it was overridden by the user. We will use it
4598      # for the tool.
4599
4600      # First remove it from the list of overridden variables, so we can test
4601      # for unknown variables in the end.
4602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4603
4604      # Check if the provided tool contains a complete path.
4605      tool_specified="$BASENAME"
4606      tool_basename="${tool_specified##*/}"
4607      if test "x$tool_basename" = "x$tool_specified"; then
4608        # A command without a complete path is provided, search $PATH.
4609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4610$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4611        # Extract the first word of "$tool_basename", so it can be a program name with args.
4612set dummy $tool_basename; ac_word=$2
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4614$as_echo_n "checking for $ac_word... " >&6; }
4615if ${ac_cv_path_BASENAME+:} false; then :
4616  $as_echo_n "(cached) " >&6
4617else
4618  case $BASENAME in
4619  [\\/]* | ?:[\\/]*)
4620  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4621  ;;
4622  *)
4623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624for as_dir in $PATH
4625do
4626  IFS=$as_save_IFS
4627  test -z "$as_dir" && as_dir=.
4628    for ac_exec_ext in '' $ac_executable_extensions; do
4629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4630    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4632    break 2
4633  fi
4634done
4635  done
4636IFS=$as_save_IFS
4637
4638  ;;
4639esac
4640fi
4641BASENAME=$ac_cv_path_BASENAME
4642if test -n "$BASENAME"; then
4643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4644$as_echo "$BASENAME" >&6; }
4645else
4646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4647$as_echo "no" >&6; }
4648fi
4649
4650
4651        if test "x$BASENAME" = x; then
4652          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4653        fi
4654      else
4655        # Otherwise we believe it is a complete path. Use it as it is.
4656        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4657$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4659$as_echo_n "checking for BASENAME... " >&6; }
4660        if test ! -x "$tool_specified"; then
4661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4662$as_echo "not found" >&6; }
4663          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4664        fi
4665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4666$as_echo "$tool_specified" >&6; }
4667      fi
4668    fi
4669  fi
4670
4671
4672
4673  if test "x$BASENAME" = x; then
4674    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4675  fi
4676
4677
4678
4679
4680
4681  # Publish this variable in the help.
4682
4683
4684  if test "x$BASH" = x; then
4685    # The variable is not set by user, try to locate tool using the code snippet
4686    for ac_prog in bash
4687do
4688  # Extract the first word of "$ac_prog", so it can be a program name with args.
4689set dummy $ac_prog; ac_word=$2
4690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691$as_echo_n "checking for $ac_word... " >&6; }
4692if ${ac_cv_path_BASH+:} false; then :
4693  $as_echo_n "(cached) " >&6
4694else
4695  case $BASH in
4696  [\\/]* | ?:[\\/]*)
4697  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4698  ;;
4699  *)
4700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in $PATH
4702do
4703  IFS=$as_save_IFS
4704  test -z "$as_dir" && as_dir=.
4705    for ac_exec_ext in '' $ac_executable_extensions; do
4706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4707    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709    break 2
4710  fi
4711done
4712  done
4713IFS=$as_save_IFS
4714
4715  ;;
4716esac
4717fi
4718BASH=$ac_cv_path_BASH
4719if test -n "$BASH"; then
4720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4721$as_echo "$BASH" >&6; }
4722else
4723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
4725fi
4726
4727
4728  test -n "$BASH" && break
4729done
4730
4731  else
4732    # The variable is set, but is it from the command line or the environment?
4733
4734    # Try to remove the string !BASH! from our list.
4735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4737      # If it failed, the variable was not from the command line. Ignore it,
4738      # but warn the user (except for BASH, which is always set by the calling BASH).
4739      if test "xBASH" != xBASH; then
4740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4741$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4742      fi
4743      # Try to locate tool using the code snippet
4744      for ac_prog in bash
4745do
4746  # Extract the first word of "$ac_prog", so it can be a program name with args.
4747set dummy $ac_prog; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_path_BASH+:} false; then :
4751  $as_echo_n "(cached) " >&6
4752else
4753  case $BASH in
4754  [\\/]* | ?:[\\/]*)
4755  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4756  ;;
4757  *)
4758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4759for as_dir in $PATH
4760do
4761  IFS=$as_save_IFS
4762  test -z "$as_dir" && as_dir=.
4763    for ac_exec_ext in '' $ac_executable_extensions; do
4764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4765    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4767    break 2
4768  fi
4769done
4770  done
4771IFS=$as_save_IFS
4772
4773  ;;
4774esac
4775fi
4776BASH=$ac_cv_path_BASH
4777if test -n "$BASH"; then
4778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4779$as_echo "$BASH" >&6; }
4780else
4781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784
4785
4786  test -n "$BASH" && break
4787done
4788
4789    else
4790      # If it succeeded, then it was overridden by the user. We will use it
4791      # for the tool.
4792
4793      # First remove it from the list of overridden variables, so we can test
4794      # for unknown variables in the end.
4795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4796
4797      # Check if the provided tool contains a complete path.
4798      tool_specified="$BASH"
4799      tool_basename="${tool_specified##*/}"
4800      if test "x$tool_basename" = "x$tool_specified"; then
4801        # A command without a complete path is provided, search $PATH.
4802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4803$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4804        # Extract the first word of "$tool_basename", so it can be a program name with args.
4805set dummy $tool_basename; ac_word=$2
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4807$as_echo_n "checking for $ac_word... " >&6; }
4808if ${ac_cv_path_BASH+:} false; then :
4809  $as_echo_n "(cached) " >&6
4810else
4811  case $BASH in
4812  [\\/]* | ?:[\\/]*)
4813  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4814  ;;
4815  *)
4816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4817for as_dir in $PATH
4818do
4819  IFS=$as_save_IFS
4820  test -z "$as_dir" && as_dir=.
4821    for ac_exec_ext in '' $ac_executable_extensions; do
4822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4823    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4825    break 2
4826  fi
4827done
4828  done
4829IFS=$as_save_IFS
4830
4831  ;;
4832esac
4833fi
4834BASH=$ac_cv_path_BASH
4835if test -n "$BASH"; then
4836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4837$as_echo "$BASH" >&6; }
4838else
4839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4840$as_echo "no" >&6; }
4841fi
4842
4843
4844        if test "x$BASH" = x; then
4845          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4846        fi
4847      else
4848        # Otherwise we believe it is a complete path. Use it as it is.
4849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4850$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4852$as_echo_n "checking for BASH... " >&6; }
4853        if test ! -x "$tool_specified"; then
4854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4855$as_echo "not found" >&6; }
4856          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4857        fi
4858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4859$as_echo "$tool_specified" >&6; }
4860      fi
4861    fi
4862  fi
4863
4864
4865
4866  if test "x$BASH" = x; then
4867    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4868  fi
4869
4870
4871
4872
4873
4874  # Publish this variable in the help.
4875
4876
4877  if test "x$CAT" = x; then
4878    # The variable is not set by user, try to locate tool using the code snippet
4879    for ac_prog in cat
4880do
4881  # Extract the first word of "$ac_prog", so it can be a program name with args.
4882set dummy $ac_prog; ac_word=$2
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if ${ac_cv_path_CAT+:} false; then :
4886  $as_echo_n "(cached) " >&6
4887else
4888  case $CAT in
4889  [\\/]* | ?:[\\/]*)
4890  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4891  ;;
4892  *)
4893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in $PATH
4895do
4896  IFS=$as_save_IFS
4897  test -z "$as_dir" && as_dir=.
4898    for ac_exec_ext in '' $ac_executable_extensions; do
4899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4900    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902    break 2
4903  fi
4904done
4905  done
4906IFS=$as_save_IFS
4907
4908  ;;
4909esac
4910fi
4911CAT=$ac_cv_path_CAT
4912if test -n "$CAT"; then
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4914$as_echo "$CAT" >&6; }
4915else
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
4920
4921  test -n "$CAT" && break
4922done
4923
4924  else
4925    # The variable is set, but is it from the command line or the environment?
4926
4927    # Try to remove the string !CAT! from our list.
4928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4930      # If it failed, the variable was not from the command line. Ignore it,
4931      # but warn the user (except for BASH, which is always set by the calling BASH).
4932      if test "xCAT" != xBASH; then
4933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4934$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4935      fi
4936      # Try to locate tool using the code snippet
4937      for ac_prog in cat
4938do
4939  # Extract the first word of "$ac_prog", so it can be a program name with args.
4940set dummy $ac_prog; ac_word=$2
4941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4942$as_echo_n "checking for $ac_word... " >&6; }
4943if ${ac_cv_path_CAT+:} false; then :
4944  $as_echo_n "(cached) " >&6
4945else
4946  case $CAT in
4947  [\\/]* | ?:[\\/]*)
4948  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4949  ;;
4950  *)
4951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4952for as_dir in $PATH
4953do
4954  IFS=$as_save_IFS
4955  test -z "$as_dir" && as_dir=.
4956    for ac_exec_ext in '' $ac_executable_extensions; do
4957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4958    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4960    break 2
4961  fi
4962done
4963  done
4964IFS=$as_save_IFS
4965
4966  ;;
4967esac
4968fi
4969CAT=$ac_cv_path_CAT
4970if test -n "$CAT"; then
4971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4972$as_echo "$CAT" >&6; }
4973else
4974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4975$as_echo "no" >&6; }
4976fi
4977
4978
4979  test -n "$CAT" && break
4980done
4981
4982    else
4983      # If it succeeded, then it was overridden by the user. We will use it
4984      # for the tool.
4985
4986      # First remove it from the list of overridden variables, so we can test
4987      # for unknown variables in the end.
4988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4989
4990      # Check if the provided tool contains a complete path.
4991      tool_specified="$CAT"
4992      tool_basename="${tool_specified##*/}"
4993      if test "x$tool_basename" = "x$tool_specified"; then
4994        # A command without a complete path is provided, search $PATH.
4995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4996$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4997        # Extract the first word of "$tool_basename", so it can be a program name with args.
4998set dummy $tool_basename; ac_word=$2
4999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5000$as_echo_n "checking for $ac_word... " >&6; }
5001if ${ac_cv_path_CAT+:} false; then :
5002  $as_echo_n "(cached) " >&6
5003else
5004  case $CAT in
5005  [\\/]* | ?:[\\/]*)
5006  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5007  ;;
5008  *)
5009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012  IFS=$as_save_IFS
5013  test -z "$as_dir" && as_dir=.
5014    for ac_exec_ext in '' $ac_executable_extensions; do
5015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5016    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5018    break 2
5019  fi
5020done
5021  done
5022IFS=$as_save_IFS
5023
5024  ;;
5025esac
5026fi
5027CAT=$ac_cv_path_CAT
5028if test -n "$CAT"; then
5029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5030$as_echo "$CAT" >&6; }
5031else
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5033$as_echo "no" >&6; }
5034fi
5035
5036
5037        if test "x$CAT" = x; then
5038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5039        fi
5040      else
5041        # Otherwise we believe it is a complete path. Use it as it is.
5042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5043$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5045$as_echo_n "checking for CAT... " >&6; }
5046        if test ! -x "$tool_specified"; then
5047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5048$as_echo "not found" >&6; }
5049          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5050        fi
5051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5052$as_echo "$tool_specified" >&6; }
5053      fi
5054    fi
5055  fi
5056
5057
5058
5059  if test "x$CAT" = x; then
5060    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5061  fi
5062
5063
5064
5065
5066
5067  # Publish this variable in the help.
5068
5069
5070  if test "x$CHMOD" = x; then
5071    # The variable is not set by user, try to locate tool using the code snippet
5072    for ac_prog in chmod
5073do
5074  # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
5078if ${ac_cv_path_CHMOD+:} false; then :
5079  $as_echo_n "(cached) " >&6
5080else
5081  case $CHMOD in
5082  [\\/]* | ?:[\\/]*)
5083  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5084  ;;
5085  *)
5086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5087for as_dir in $PATH
5088do
5089  IFS=$as_save_IFS
5090  test -z "$as_dir" && as_dir=.
5091    for ac_exec_ext in '' $ac_executable_extensions; do
5092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5093    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5095    break 2
5096  fi
5097done
5098  done
5099IFS=$as_save_IFS
5100
5101  ;;
5102esac
5103fi
5104CHMOD=$ac_cv_path_CHMOD
5105if test -n "$CHMOD"; then
5106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5107$as_echo "$CHMOD" >&6; }
5108else
5109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5110$as_echo "no" >&6; }
5111fi
5112
5113
5114  test -n "$CHMOD" && break
5115done
5116
5117  else
5118    # The variable is set, but is it from the command line or the environment?
5119
5120    # Try to remove the string !CHMOD! from our list.
5121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5123      # If it failed, the variable was not from the command line. Ignore it,
5124      # but warn the user (except for BASH, which is always set by the calling BASH).
5125      if test "xCHMOD" != xBASH; then
5126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5127$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5128      fi
5129      # Try to locate tool using the code snippet
5130      for ac_prog in chmod
5131do
5132  # Extract the first word of "$ac_prog", so it can be a program name with args.
5133set dummy $ac_prog; ac_word=$2
5134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5135$as_echo_n "checking for $ac_word... " >&6; }
5136if ${ac_cv_path_CHMOD+:} false; then :
5137  $as_echo_n "(cached) " >&6
5138else
5139  case $CHMOD in
5140  [\\/]* | ?:[\\/]*)
5141  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5142  ;;
5143  *)
5144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5145for as_dir in $PATH
5146do
5147  IFS=$as_save_IFS
5148  test -z "$as_dir" && as_dir=.
5149    for ac_exec_ext in '' $ac_executable_extensions; do
5150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5151    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5153    break 2
5154  fi
5155done
5156  done
5157IFS=$as_save_IFS
5158
5159  ;;
5160esac
5161fi
5162CHMOD=$ac_cv_path_CHMOD
5163if test -n "$CHMOD"; then
5164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5165$as_echo "$CHMOD" >&6; }
5166else
5167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168$as_echo "no" >&6; }
5169fi
5170
5171
5172  test -n "$CHMOD" && break
5173done
5174
5175    else
5176      # If it succeeded, then it was overridden by the user. We will use it
5177      # for the tool.
5178
5179      # First remove it from the list of overridden variables, so we can test
5180      # for unknown variables in the end.
5181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5182
5183      # Check if the provided tool contains a complete path.
5184      tool_specified="$CHMOD"
5185      tool_basename="${tool_specified##*/}"
5186      if test "x$tool_basename" = "x$tool_specified"; then
5187        # A command without a complete path is provided, search $PATH.
5188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5189$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5190        # Extract the first word of "$tool_basename", so it can be a program name with args.
5191set dummy $tool_basename; ac_word=$2
5192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5193$as_echo_n "checking for $ac_word... " >&6; }
5194if ${ac_cv_path_CHMOD+:} false; then :
5195  $as_echo_n "(cached) " >&6
5196else
5197  case $CHMOD in
5198  [\\/]* | ?:[\\/]*)
5199  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5200  ;;
5201  *)
5202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5203for as_dir in $PATH
5204do
5205  IFS=$as_save_IFS
5206  test -z "$as_dir" && as_dir=.
5207    for ac_exec_ext in '' $ac_executable_extensions; do
5208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5209    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5211    break 2
5212  fi
5213done
5214  done
5215IFS=$as_save_IFS
5216
5217  ;;
5218esac
5219fi
5220CHMOD=$ac_cv_path_CHMOD
5221if test -n "$CHMOD"; then
5222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5223$as_echo "$CHMOD" >&6; }
5224else
5225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5226$as_echo "no" >&6; }
5227fi
5228
5229
5230        if test "x$CHMOD" = x; then
5231          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5232        fi
5233      else
5234        # Otherwise we believe it is a complete path. Use it as it is.
5235        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5236$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5238$as_echo_n "checking for CHMOD... " >&6; }
5239        if test ! -x "$tool_specified"; then
5240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5241$as_echo "not found" >&6; }
5242          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5243        fi
5244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5245$as_echo "$tool_specified" >&6; }
5246      fi
5247    fi
5248  fi
5249
5250
5251
5252  if test "x$CHMOD" = x; then
5253    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5254  fi
5255
5256
5257
5258
5259
5260  # Publish this variable in the help.
5261
5262
5263  if test "x$CMP" = x; then
5264    # The variable is not set by user, try to locate tool using the code snippet
5265    for ac_prog in cmp
5266do
5267  # Extract the first word of "$ac_prog", so it can be a program name with args.
5268set dummy $ac_prog; ac_word=$2
5269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5270$as_echo_n "checking for $ac_word... " >&6; }
5271if ${ac_cv_path_CMP+:} false; then :
5272  $as_echo_n "(cached) " >&6
5273else
5274  case $CMP in
5275  [\\/]* | ?:[\\/]*)
5276  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5277  ;;
5278  *)
5279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5280for as_dir in $PATH
5281do
5282  IFS=$as_save_IFS
5283  test -z "$as_dir" && as_dir=.
5284    for ac_exec_ext in '' $ac_executable_extensions; do
5285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5286    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5288    break 2
5289  fi
5290done
5291  done
5292IFS=$as_save_IFS
5293
5294  ;;
5295esac
5296fi
5297CMP=$ac_cv_path_CMP
5298if test -n "$CMP"; then
5299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5300$as_echo "$CMP" >&6; }
5301else
5302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5303$as_echo "no" >&6; }
5304fi
5305
5306
5307  test -n "$CMP" && break
5308done
5309
5310  else
5311    # The variable is set, but is it from the command line or the environment?
5312
5313    # Try to remove the string !CMP! from our list.
5314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5316      # If it failed, the variable was not from the command line. Ignore it,
5317      # but warn the user (except for BASH, which is always set by the calling BASH).
5318      if test "xCMP" != xBASH; then
5319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5320$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5321      fi
5322      # Try to locate tool using the code snippet
5323      for ac_prog in cmp
5324do
5325  # Extract the first word of "$ac_prog", so it can be a program name with args.
5326set dummy $ac_prog; ac_word=$2
5327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5328$as_echo_n "checking for $ac_word... " >&6; }
5329if ${ac_cv_path_CMP+:} false; then :
5330  $as_echo_n "(cached) " >&6
5331else
5332  case $CMP in
5333  [\\/]* | ?:[\\/]*)
5334  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5335  ;;
5336  *)
5337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5338for as_dir in $PATH
5339do
5340  IFS=$as_save_IFS
5341  test -z "$as_dir" && as_dir=.
5342    for ac_exec_ext in '' $ac_executable_extensions; do
5343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5344    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5346    break 2
5347  fi
5348done
5349  done
5350IFS=$as_save_IFS
5351
5352  ;;
5353esac
5354fi
5355CMP=$ac_cv_path_CMP
5356if test -n "$CMP"; then
5357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5358$as_echo "$CMP" >&6; }
5359else
5360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361$as_echo "no" >&6; }
5362fi
5363
5364
5365  test -n "$CMP" && break
5366done
5367
5368    else
5369      # If it succeeded, then it was overridden by the user. We will use it
5370      # for the tool.
5371
5372      # First remove it from the list of overridden variables, so we can test
5373      # for unknown variables in the end.
5374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5375
5376      # Check if the provided tool contains a complete path.
5377      tool_specified="$CMP"
5378      tool_basename="${tool_specified##*/}"
5379      if test "x$tool_basename" = "x$tool_specified"; then
5380        # A command without a complete path is provided, search $PATH.
5381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5382$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5383        # Extract the first word of "$tool_basename", so it can be a program name with args.
5384set dummy $tool_basename; ac_word=$2
5385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386$as_echo_n "checking for $ac_word... " >&6; }
5387if ${ac_cv_path_CMP+:} false; then :
5388  $as_echo_n "(cached) " >&6
5389else
5390  case $CMP in
5391  [\\/]* | ?:[\\/]*)
5392  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5393  ;;
5394  *)
5395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5396for as_dir in $PATH
5397do
5398  IFS=$as_save_IFS
5399  test -z "$as_dir" && as_dir=.
5400    for ac_exec_ext in '' $ac_executable_extensions; do
5401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5402    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5404    break 2
5405  fi
5406done
5407  done
5408IFS=$as_save_IFS
5409
5410  ;;
5411esac
5412fi
5413CMP=$ac_cv_path_CMP
5414if test -n "$CMP"; then
5415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5416$as_echo "$CMP" >&6; }
5417else
5418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419$as_echo "no" >&6; }
5420fi
5421
5422
5423        if test "x$CMP" = x; then
5424          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5425        fi
5426      else
5427        # Otherwise we believe it is a complete path. Use it as it is.
5428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5429$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5431$as_echo_n "checking for CMP... " >&6; }
5432        if test ! -x "$tool_specified"; then
5433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5434$as_echo "not found" >&6; }
5435          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5436        fi
5437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5438$as_echo "$tool_specified" >&6; }
5439      fi
5440    fi
5441  fi
5442
5443
5444
5445  if test "x$CMP" = x; then
5446    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5447  fi
5448
5449
5450
5451
5452
5453  # Publish this variable in the help.
5454
5455
5456  if test "x$COMM" = x; then
5457    # The variable is not set by user, try to locate tool using the code snippet
5458    for ac_prog in comm
5459do
5460  # Extract the first word of "$ac_prog", so it can be a program name with args.
5461set dummy $ac_prog; ac_word=$2
5462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5463$as_echo_n "checking for $ac_word... " >&6; }
5464if ${ac_cv_path_COMM+:} false; then :
5465  $as_echo_n "(cached) " >&6
5466else
5467  case $COMM in
5468  [\\/]* | ?:[\\/]*)
5469  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5470  ;;
5471  *)
5472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5473for as_dir in $PATH
5474do
5475  IFS=$as_save_IFS
5476  test -z "$as_dir" && as_dir=.
5477    for ac_exec_ext in '' $ac_executable_extensions; do
5478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5479    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5481    break 2
5482  fi
5483done
5484  done
5485IFS=$as_save_IFS
5486
5487  ;;
5488esac
5489fi
5490COMM=$ac_cv_path_COMM
5491if test -n "$COMM"; then
5492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5493$as_echo "$COMM" >&6; }
5494else
5495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5496$as_echo "no" >&6; }
5497fi
5498
5499
5500  test -n "$COMM" && break
5501done
5502
5503  else
5504    # The variable is set, but is it from the command line or the environment?
5505
5506    # Try to remove the string !COMM! from our list.
5507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5509      # If it failed, the variable was not from the command line. Ignore it,
5510      # but warn the user (except for BASH, which is always set by the calling BASH).
5511      if test "xCOMM" != xBASH; then
5512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5513$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5514      fi
5515      # Try to locate tool using the code snippet
5516      for ac_prog in comm
5517do
5518  # Extract the first word of "$ac_prog", so it can be a program name with args.
5519set dummy $ac_prog; ac_word=$2
5520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5521$as_echo_n "checking for $ac_word... " >&6; }
5522if ${ac_cv_path_COMM+:} false; then :
5523  $as_echo_n "(cached) " >&6
5524else
5525  case $COMM in
5526  [\\/]* | ?:[\\/]*)
5527  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5528  ;;
5529  *)
5530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5531for as_dir in $PATH
5532do
5533  IFS=$as_save_IFS
5534  test -z "$as_dir" && as_dir=.
5535    for ac_exec_ext in '' $ac_executable_extensions; do
5536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5537    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5539    break 2
5540  fi
5541done
5542  done
5543IFS=$as_save_IFS
5544
5545  ;;
5546esac
5547fi
5548COMM=$ac_cv_path_COMM
5549if test -n "$COMM"; then
5550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5551$as_echo "$COMM" >&6; }
5552else
5553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5554$as_echo "no" >&6; }
5555fi
5556
5557
5558  test -n "$COMM" && break
5559done
5560
5561    else
5562      # If it succeeded, then it was overridden by the user. We will use it
5563      # for the tool.
5564
5565      # First remove it from the list of overridden variables, so we can test
5566      # for unknown variables in the end.
5567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5568
5569      # Check if the provided tool contains a complete path.
5570      tool_specified="$COMM"
5571      tool_basename="${tool_specified##*/}"
5572      if test "x$tool_basename" = "x$tool_specified"; then
5573        # A command without a complete path is provided, search $PATH.
5574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5575$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5576        # Extract the first word of "$tool_basename", so it can be a program name with args.
5577set dummy $tool_basename; ac_word=$2
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5579$as_echo_n "checking for $ac_word... " >&6; }
5580if ${ac_cv_path_COMM+:} false; then :
5581  $as_echo_n "(cached) " >&6
5582else
5583  case $COMM in
5584  [\\/]* | ?:[\\/]*)
5585  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5586  ;;
5587  *)
5588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5589for as_dir in $PATH
5590do
5591  IFS=$as_save_IFS
5592  test -z "$as_dir" && as_dir=.
5593    for ac_exec_ext in '' $ac_executable_extensions; do
5594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5595    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5597    break 2
5598  fi
5599done
5600  done
5601IFS=$as_save_IFS
5602
5603  ;;
5604esac
5605fi
5606COMM=$ac_cv_path_COMM
5607if test -n "$COMM"; then
5608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5609$as_echo "$COMM" >&6; }
5610else
5611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5612$as_echo "no" >&6; }
5613fi
5614
5615
5616        if test "x$COMM" = x; then
5617          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5618        fi
5619      else
5620        # Otherwise we believe it is a complete path. Use it as it is.
5621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5622$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5624$as_echo_n "checking for COMM... " >&6; }
5625        if test ! -x "$tool_specified"; then
5626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5627$as_echo "not found" >&6; }
5628          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5629        fi
5630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5631$as_echo "$tool_specified" >&6; }
5632      fi
5633    fi
5634  fi
5635
5636
5637
5638  if test "x$COMM" = x; then
5639    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5640  fi
5641
5642
5643
5644
5645
5646  # Publish this variable in the help.
5647
5648
5649  if test "x$CP" = x; then
5650    # The variable is not set by user, try to locate tool using the code snippet
5651    for ac_prog in cp
5652do
5653  # Extract the first word of "$ac_prog", so it can be a program name with args.
5654set dummy $ac_prog; ac_word=$2
5655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5656$as_echo_n "checking for $ac_word... " >&6; }
5657if ${ac_cv_path_CP+:} false; then :
5658  $as_echo_n "(cached) " >&6
5659else
5660  case $CP in
5661  [\\/]* | ?:[\\/]*)
5662  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5663  ;;
5664  *)
5665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5666for as_dir in $PATH
5667do
5668  IFS=$as_save_IFS
5669  test -z "$as_dir" && as_dir=.
5670    for ac_exec_ext in '' $ac_executable_extensions; do
5671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5672    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5674    break 2
5675  fi
5676done
5677  done
5678IFS=$as_save_IFS
5679
5680  ;;
5681esac
5682fi
5683CP=$ac_cv_path_CP
5684if test -n "$CP"; then
5685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5686$as_echo "$CP" >&6; }
5687else
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689$as_echo "no" >&6; }
5690fi
5691
5692
5693  test -n "$CP" && break
5694done
5695
5696  else
5697    # The variable is set, but is it from the command line or the environment?
5698
5699    # Try to remove the string !CP! from our list.
5700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5702      # If it failed, the variable was not from the command line. Ignore it,
5703      # but warn the user (except for BASH, which is always set by the calling BASH).
5704      if test "xCP" != xBASH; then
5705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5706$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5707      fi
5708      # Try to locate tool using the code snippet
5709      for ac_prog in cp
5710do
5711  # Extract the first word of "$ac_prog", so it can be a program name with args.
5712set dummy $ac_prog; ac_word=$2
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5714$as_echo_n "checking for $ac_word... " >&6; }
5715if ${ac_cv_path_CP+:} false; then :
5716  $as_echo_n "(cached) " >&6
5717else
5718  case $CP in
5719  [\\/]* | ?:[\\/]*)
5720  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5721  ;;
5722  *)
5723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5724for as_dir in $PATH
5725do
5726  IFS=$as_save_IFS
5727  test -z "$as_dir" && as_dir=.
5728    for ac_exec_ext in '' $ac_executable_extensions; do
5729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5730    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5732    break 2
5733  fi
5734done
5735  done
5736IFS=$as_save_IFS
5737
5738  ;;
5739esac
5740fi
5741CP=$ac_cv_path_CP
5742if test -n "$CP"; then
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5744$as_echo "$CP" >&6; }
5745else
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5747$as_echo "no" >&6; }
5748fi
5749
5750
5751  test -n "$CP" && break
5752done
5753
5754    else
5755      # If it succeeded, then it was overridden by the user. We will use it
5756      # for the tool.
5757
5758      # First remove it from the list of overridden variables, so we can test
5759      # for unknown variables in the end.
5760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5761
5762      # Check if the provided tool contains a complete path.
5763      tool_specified="$CP"
5764      tool_basename="${tool_specified##*/}"
5765      if test "x$tool_basename" = "x$tool_specified"; then
5766        # A command without a complete path is provided, search $PATH.
5767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5768$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5769        # Extract the first word of "$tool_basename", so it can be a program name with args.
5770set dummy $tool_basename; ac_word=$2
5771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5772$as_echo_n "checking for $ac_word... " >&6; }
5773if ${ac_cv_path_CP+:} false; then :
5774  $as_echo_n "(cached) " >&6
5775else
5776  case $CP in
5777  [\\/]* | ?:[\\/]*)
5778  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5779  ;;
5780  *)
5781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782for as_dir in $PATH
5783do
5784  IFS=$as_save_IFS
5785  test -z "$as_dir" && as_dir=.
5786    for ac_exec_ext in '' $ac_executable_extensions; do
5787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790    break 2
5791  fi
5792done
5793  done
5794IFS=$as_save_IFS
5795
5796  ;;
5797esac
5798fi
5799CP=$ac_cv_path_CP
5800if test -n "$CP"; then
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5802$as_echo "$CP" >&6; }
5803else
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805$as_echo "no" >&6; }
5806fi
5807
5808
5809        if test "x$CP" = x; then
5810          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5811        fi
5812      else
5813        # Otherwise we believe it is a complete path. Use it as it is.
5814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5815$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5817$as_echo_n "checking for CP... " >&6; }
5818        if test ! -x "$tool_specified"; then
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5820$as_echo "not found" >&6; }
5821          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5822        fi
5823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5824$as_echo "$tool_specified" >&6; }
5825      fi
5826    fi
5827  fi
5828
5829
5830
5831  if test "x$CP" = x; then
5832    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5833  fi
5834
5835
5836
5837
5838
5839  # Publish this variable in the help.
5840
5841
5842  if test "x$CUT" = x; then
5843    # The variable is not set by user, try to locate tool using the code snippet
5844    for ac_prog in cut
5845do
5846  # Extract the first word of "$ac_prog", so it can be a program name with args.
5847set dummy $ac_prog; ac_word=$2
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849$as_echo_n "checking for $ac_word... " >&6; }
5850if ${ac_cv_path_CUT+:} false; then :
5851  $as_echo_n "(cached) " >&6
5852else
5853  case $CUT in
5854  [\\/]* | ?:[\\/]*)
5855  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5856  ;;
5857  *)
5858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5859for as_dir in $PATH
5860do
5861  IFS=$as_save_IFS
5862  test -z "$as_dir" && as_dir=.
5863    for ac_exec_ext in '' $ac_executable_extensions; do
5864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5865    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5867    break 2
5868  fi
5869done
5870  done
5871IFS=$as_save_IFS
5872
5873  ;;
5874esac
5875fi
5876CUT=$ac_cv_path_CUT
5877if test -n "$CUT"; then
5878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5879$as_echo "$CUT" >&6; }
5880else
5881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5882$as_echo "no" >&6; }
5883fi
5884
5885
5886  test -n "$CUT" && break
5887done
5888
5889  else
5890    # The variable is set, but is it from the command line or the environment?
5891
5892    # Try to remove the string !CUT! from our list.
5893    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5894    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5895      # If it failed, the variable was not from the command line. Ignore it,
5896      # but warn the user (except for BASH, which is always set by the calling BASH).
5897      if test "xCUT" != xBASH; then
5898        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5899$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5900      fi
5901      # Try to locate tool using the code snippet
5902      for ac_prog in cut
5903do
5904  # Extract the first word of "$ac_prog", so it can be a program name with args.
5905set dummy $ac_prog; ac_word=$2
5906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5907$as_echo_n "checking for $ac_word... " >&6; }
5908if ${ac_cv_path_CUT+:} false; then :
5909  $as_echo_n "(cached) " >&6
5910else
5911  case $CUT in
5912  [\\/]* | ?:[\\/]*)
5913  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5914  ;;
5915  *)
5916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5917for as_dir in $PATH
5918do
5919  IFS=$as_save_IFS
5920  test -z "$as_dir" && as_dir=.
5921    for ac_exec_ext in '' $ac_executable_extensions; do
5922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5923    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5925    break 2
5926  fi
5927done
5928  done
5929IFS=$as_save_IFS
5930
5931  ;;
5932esac
5933fi
5934CUT=$ac_cv_path_CUT
5935if test -n "$CUT"; then
5936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5937$as_echo "$CUT" >&6; }
5938else
5939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5940$as_echo "no" >&6; }
5941fi
5942
5943
5944  test -n "$CUT" && break
5945done
5946
5947    else
5948      # If it succeeded, then it was overridden by the user. We will use it
5949      # for the tool.
5950
5951      # First remove it from the list of overridden variables, so we can test
5952      # for unknown variables in the end.
5953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5954
5955      # Check if the provided tool contains a complete path.
5956      tool_specified="$CUT"
5957      tool_basename="${tool_specified##*/}"
5958      if test "x$tool_basename" = "x$tool_specified"; then
5959        # A command without a complete path is provided, search $PATH.
5960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5961$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5962        # Extract the first word of "$tool_basename", so it can be a program name with args.
5963set dummy $tool_basename; ac_word=$2
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5965$as_echo_n "checking for $ac_word... " >&6; }
5966if ${ac_cv_path_CUT+:} false; then :
5967  $as_echo_n "(cached) " >&6
5968else
5969  case $CUT in
5970  [\\/]* | ?:[\\/]*)
5971  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5972  ;;
5973  *)
5974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5975for as_dir in $PATH
5976do
5977  IFS=$as_save_IFS
5978  test -z "$as_dir" && as_dir=.
5979    for ac_exec_ext in '' $ac_executable_extensions; do
5980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5981    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5983    break 2
5984  fi
5985done
5986  done
5987IFS=$as_save_IFS
5988
5989  ;;
5990esac
5991fi
5992CUT=$ac_cv_path_CUT
5993if test -n "$CUT"; then
5994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5995$as_echo "$CUT" >&6; }
5996else
5997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5998$as_echo "no" >&6; }
5999fi
6000
6001
6002        if test "x$CUT" = x; then
6003          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6004        fi
6005      else
6006        # Otherwise we believe it is a complete path. Use it as it is.
6007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6008$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6010$as_echo_n "checking for CUT... " >&6; }
6011        if test ! -x "$tool_specified"; then
6012          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6013$as_echo "not found" >&6; }
6014          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6015        fi
6016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6017$as_echo "$tool_specified" >&6; }
6018      fi
6019    fi
6020  fi
6021
6022
6023
6024  if test "x$CUT" = x; then
6025    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6026  fi
6027
6028
6029
6030
6031
6032  # Publish this variable in the help.
6033
6034
6035  if test "x$DATE" = x; then
6036    # The variable is not set by user, try to locate tool using the code snippet
6037    for ac_prog in date
6038do
6039  # Extract the first word of "$ac_prog", so it can be a program name with args.
6040set dummy $ac_prog; ac_word=$2
6041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042$as_echo_n "checking for $ac_word... " >&6; }
6043if ${ac_cv_path_DATE+:} false; then :
6044  $as_echo_n "(cached) " >&6
6045else
6046  case $DATE in
6047  [\\/]* | ?:[\\/]*)
6048  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6049  ;;
6050  *)
6051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052for as_dir in $PATH
6053do
6054  IFS=$as_save_IFS
6055  test -z "$as_dir" && as_dir=.
6056    for ac_exec_ext in '' $ac_executable_extensions; do
6057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6058    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6060    break 2
6061  fi
6062done
6063  done
6064IFS=$as_save_IFS
6065
6066  ;;
6067esac
6068fi
6069DATE=$ac_cv_path_DATE
6070if test -n "$DATE"; then
6071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6072$as_echo "$DATE" >&6; }
6073else
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6075$as_echo "no" >&6; }
6076fi
6077
6078
6079  test -n "$DATE" && break
6080done
6081
6082  else
6083    # The variable is set, but is it from the command line or the environment?
6084
6085    # Try to remove the string !DATE! from our list.
6086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6088      # If it failed, the variable was not from the command line. Ignore it,
6089      # but warn the user (except for BASH, which is always set by the calling BASH).
6090      if test "xDATE" != xBASH; then
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6092$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6093      fi
6094      # Try to locate tool using the code snippet
6095      for ac_prog in date
6096do
6097  # Extract the first word of "$ac_prog", so it can be a program name with args.
6098set dummy $ac_prog; ac_word=$2
6099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6100$as_echo_n "checking for $ac_word... " >&6; }
6101if ${ac_cv_path_DATE+:} false; then :
6102  $as_echo_n "(cached) " >&6
6103else
6104  case $DATE in
6105  [\\/]* | ?:[\\/]*)
6106  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6107  ;;
6108  *)
6109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6110for as_dir in $PATH
6111do
6112  IFS=$as_save_IFS
6113  test -z "$as_dir" && as_dir=.
6114    for ac_exec_ext in '' $ac_executable_extensions; do
6115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6116    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6118    break 2
6119  fi
6120done
6121  done
6122IFS=$as_save_IFS
6123
6124  ;;
6125esac
6126fi
6127DATE=$ac_cv_path_DATE
6128if test -n "$DATE"; then
6129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6130$as_echo "$DATE" >&6; }
6131else
6132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6133$as_echo "no" >&6; }
6134fi
6135
6136
6137  test -n "$DATE" && break
6138done
6139
6140    else
6141      # If it succeeded, then it was overridden by the user. We will use it
6142      # for the tool.
6143
6144      # First remove it from the list of overridden variables, so we can test
6145      # for unknown variables in the end.
6146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6147
6148      # Check if the provided tool contains a complete path.
6149      tool_specified="$DATE"
6150      tool_basename="${tool_specified##*/}"
6151      if test "x$tool_basename" = "x$tool_specified"; then
6152        # A command without a complete path is provided, search $PATH.
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6154$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6155        # Extract the first word of "$tool_basename", so it can be a program name with args.
6156set dummy $tool_basename; ac_word=$2
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6158$as_echo_n "checking for $ac_word... " >&6; }
6159if ${ac_cv_path_DATE+:} false; then :
6160  $as_echo_n "(cached) " >&6
6161else
6162  case $DATE in
6163  [\\/]* | ?:[\\/]*)
6164  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6165  ;;
6166  *)
6167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH
6169do
6170  IFS=$as_save_IFS
6171  test -z "$as_dir" && as_dir=.
6172    for ac_exec_ext in '' $ac_executable_extensions; do
6173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6174    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6176    break 2
6177  fi
6178done
6179  done
6180IFS=$as_save_IFS
6181
6182  ;;
6183esac
6184fi
6185DATE=$ac_cv_path_DATE
6186if test -n "$DATE"; then
6187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6188$as_echo "$DATE" >&6; }
6189else
6190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
6192fi
6193
6194
6195        if test "x$DATE" = x; then
6196          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6197        fi
6198      else
6199        # Otherwise we believe it is a complete path. Use it as it is.
6200        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6201$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6203$as_echo_n "checking for DATE... " >&6; }
6204        if test ! -x "$tool_specified"; then
6205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6206$as_echo "not found" >&6; }
6207          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6208        fi
6209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6210$as_echo "$tool_specified" >&6; }
6211      fi
6212    fi
6213  fi
6214
6215
6216
6217  if test "x$DATE" = x; then
6218    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6219  fi
6220
6221
6222
6223
6224
6225  # Publish this variable in the help.
6226
6227
6228  if test "x$DIFF" = x; then
6229    # The variable is not set by user, try to locate tool using the code snippet
6230    for ac_prog in gdiff diff
6231do
6232  # Extract the first word of "$ac_prog", so it can be a program name with args.
6233set dummy $ac_prog; ac_word=$2
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6235$as_echo_n "checking for $ac_word... " >&6; }
6236if ${ac_cv_path_DIFF+:} false; then :
6237  $as_echo_n "(cached) " >&6
6238else
6239  case $DIFF in
6240  [\\/]* | ?:[\\/]*)
6241  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6242  ;;
6243  *)
6244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH
6246do
6247  IFS=$as_save_IFS
6248  test -z "$as_dir" && as_dir=.
6249    for ac_exec_ext in '' $ac_executable_extensions; do
6250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6251    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6253    break 2
6254  fi
6255done
6256  done
6257IFS=$as_save_IFS
6258
6259  ;;
6260esac
6261fi
6262DIFF=$ac_cv_path_DIFF
6263if test -n "$DIFF"; then
6264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6265$as_echo "$DIFF" >&6; }
6266else
6267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6268$as_echo "no" >&6; }
6269fi
6270
6271
6272  test -n "$DIFF" && break
6273done
6274
6275  else
6276    # The variable is set, but is it from the command line or the environment?
6277
6278    # Try to remove the string !DIFF! from our list.
6279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6281      # If it failed, the variable was not from the command line. Ignore it,
6282      # but warn the user (except for BASH, which is always set by the calling BASH).
6283      if test "xDIFF" != xBASH; then
6284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6285$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6286      fi
6287      # Try to locate tool using the code snippet
6288      for ac_prog in gdiff diff
6289do
6290  # Extract the first word of "$ac_prog", so it can be a program name with args.
6291set dummy $ac_prog; ac_word=$2
6292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6293$as_echo_n "checking for $ac_word... " >&6; }
6294if ${ac_cv_path_DIFF+:} false; then :
6295  $as_echo_n "(cached) " >&6
6296else
6297  case $DIFF in
6298  [\\/]* | ?:[\\/]*)
6299  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6300  ;;
6301  *)
6302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6303for as_dir in $PATH
6304do
6305  IFS=$as_save_IFS
6306  test -z "$as_dir" && as_dir=.
6307    for ac_exec_ext in '' $ac_executable_extensions; do
6308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6309    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6311    break 2
6312  fi
6313done
6314  done
6315IFS=$as_save_IFS
6316
6317  ;;
6318esac
6319fi
6320DIFF=$ac_cv_path_DIFF
6321if test -n "$DIFF"; then
6322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6323$as_echo "$DIFF" >&6; }
6324else
6325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6326$as_echo "no" >&6; }
6327fi
6328
6329
6330  test -n "$DIFF" && break
6331done
6332
6333    else
6334      # If it succeeded, then it was overridden by the user. We will use it
6335      # for the tool.
6336
6337      # First remove it from the list of overridden variables, so we can test
6338      # for unknown variables in the end.
6339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6340
6341      # Check if the provided tool contains a complete path.
6342      tool_specified="$DIFF"
6343      tool_basename="${tool_specified##*/}"
6344      if test "x$tool_basename" = "x$tool_specified"; then
6345        # A command without a complete path is provided, search $PATH.
6346        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6347$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6348        # Extract the first word of "$tool_basename", so it can be a program name with args.
6349set dummy $tool_basename; ac_word=$2
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6351$as_echo_n "checking for $ac_word... " >&6; }
6352if ${ac_cv_path_DIFF+:} false; then :
6353  $as_echo_n "(cached) " >&6
6354else
6355  case $DIFF in
6356  [\\/]* | ?:[\\/]*)
6357  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6358  ;;
6359  *)
6360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361for as_dir in $PATH
6362do
6363  IFS=$as_save_IFS
6364  test -z "$as_dir" && as_dir=.
6365    for ac_exec_ext in '' $ac_executable_extensions; do
6366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6367    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6369    break 2
6370  fi
6371done
6372  done
6373IFS=$as_save_IFS
6374
6375  ;;
6376esac
6377fi
6378DIFF=$ac_cv_path_DIFF
6379if test -n "$DIFF"; then
6380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6381$as_echo "$DIFF" >&6; }
6382else
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385fi
6386
6387
6388        if test "x$DIFF" = x; then
6389          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6390        fi
6391      else
6392        # Otherwise we believe it is a complete path. Use it as it is.
6393        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6394$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6396$as_echo_n "checking for DIFF... " >&6; }
6397        if test ! -x "$tool_specified"; then
6398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6399$as_echo "not found" >&6; }
6400          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6401        fi
6402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6403$as_echo "$tool_specified" >&6; }
6404      fi
6405    fi
6406  fi
6407
6408
6409
6410  if test "x$DIFF" = x; then
6411    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6412  fi
6413
6414
6415
6416
6417
6418  # Publish this variable in the help.
6419
6420
6421  if test "x$DIRNAME" = x; then
6422    # The variable is not set by user, try to locate tool using the code snippet
6423    for ac_prog in dirname
6424do
6425  # Extract the first word of "$ac_prog", so it can be a program name with args.
6426set dummy $ac_prog; ac_word=$2
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6428$as_echo_n "checking for $ac_word... " >&6; }
6429if ${ac_cv_path_DIRNAME+:} false; then :
6430  $as_echo_n "(cached) " >&6
6431else
6432  case $DIRNAME in
6433  [\\/]* | ?:[\\/]*)
6434  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6435  ;;
6436  *)
6437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438for as_dir in $PATH
6439do
6440  IFS=$as_save_IFS
6441  test -z "$as_dir" && as_dir=.
6442    for ac_exec_ext in '' $ac_executable_extensions; do
6443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6444    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6446    break 2
6447  fi
6448done
6449  done
6450IFS=$as_save_IFS
6451
6452  ;;
6453esac
6454fi
6455DIRNAME=$ac_cv_path_DIRNAME
6456if test -n "$DIRNAME"; then
6457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6458$as_echo "$DIRNAME" >&6; }
6459else
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
6462fi
6463
6464
6465  test -n "$DIRNAME" && break
6466done
6467
6468  else
6469    # The variable is set, but is it from the command line or the environment?
6470
6471    # Try to remove the string !DIRNAME! from our list.
6472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6474      # If it failed, the variable was not from the command line. Ignore it,
6475      # but warn the user (except for BASH, which is always set by the calling BASH).
6476      if test "xDIRNAME" != xBASH; then
6477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6478$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6479      fi
6480      # Try to locate tool using the code snippet
6481      for ac_prog in dirname
6482do
6483  # Extract the first word of "$ac_prog", so it can be a program name with args.
6484set dummy $ac_prog; ac_word=$2
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486$as_echo_n "checking for $ac_word... " >&6; }
6487if ${ac_cv_path_DIRNAME+:} false; then :
6488  $as_echo_n "(cached) " >&6
6489else
6490  case $DIRNAME in
6491  [\\/]* | ?:[\\/]*)
6492  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6493  ;;
6494  *)
6495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496for as_dir in $PATH
6497do
6498  IFS=$as_save_IFS
6499  test -z "$as_dir" && as_dir=.
6500    for ac_exec_ext in '' $ac_executable_extensions; do
6501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6502    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6504    break 2
6505  fi
6506done
6507  done
6508IFS=$as_save_IFS
6509
6510  ;;
6511esac
6512fi
6513DIRNAME=$ac_cv_path_DIRNAME
6514if test -n "$DIRNAME"; then
6515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6516$as_echo "$DIRNAME" >&6; }
6517else
6518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; }
6520fi
6521
6522
6523  test -n "$DIRNAME" && break
6524done
6525
6526    else
6527      # If it succeeded, then it was overridden by the user. We will use it
6528      # for the tool.
6529
6530      # First remove it from the list of overridden variables, so we can test
6531      # for unknown variables in the end.
6532      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6533
6534      # Check if the provided tool contains a complete path.
6535      tool_specified="$DIRNAME"
6536      tool_basename="${tool_specified##*/}"
6537      if test "x$tool_basename" = "x$tool_specified"; then
6538        # A command without a complete path is provided, search $PATH.
6539        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6540$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6541        # Extract the first word of "$tool_basename", so it can be a program name with args.
6542set dummy $tool_basename; ac_word=$2
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6544$as_echo_n "checking for $ac_word... " >&6; }
6545if ${ac_cv_path_DIRNAME+:} false; then :
6546  $as_echo_n "(cached) " >&6
6547else
6548  case $DIRNAME in
6549  [\\/]* | ?:[\\/]*)
6550  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6551  ;;
6552  *)
6553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6554for as_dir in $PATH
6555do
6556  IFS=$as_save_IFS
6557  test -z "$as_dir" && as_dir=.
6558    for ac_exec_ext in '' $ac_executable_extensions; do
6559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6560    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6562    break 2
6563  fi
6564done
6565  done
6566IFS=$as_save_IFS
6567
6568  ;;
6569esac
6570fi
6571DIRNAME=$ac_cv_path_DIRNAME
6572if test -n "$DIRNAME"; then
6573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6574$as_echo "$DIRNAME" >&6; }
6575else
6576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577$as_echo "no" >&6; }
6578fi
6579
6580
6581        if test "x$DIRNAME" = x; then
6582          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6583        fi
6584      else
6585        # Otherwise we believe it is a complete path. Use it as it is.
6586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6587$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6589$as_echo_n "checking for DIRNAME... " >&6; }
6590        if test ! -x "$tool_specified"; then
6591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6592$as_echo "not found" >&6; }
6593          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6594        fi
6595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6596$as_echo "$tool_specified" >&6; }
6597      fi
6598    fi
6599  fi
6600
6601
6602
6603  if test "x$DIRNAME" = x; then
6604    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6605  fi
6606
6607
6608
6609
6610
6611  # Publish this variable in the help.
6612
6613
6614  if test "x$ECHO" = x; then
6615    # The variable is not set by user, try to locate tool using the code snippet
6616    for ac_prog in echo
6617do
6618  # Extract the first word of "$ac_prog", so it can be a program name with args.
6619set dummy $ac_prog; ac_word=$2
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6621$as_echo_n "checking for $ac_word... " >&6; }
6622if ${ac_cv_path_ECHO+:} false; then :
6623  $as_echo_n "(cached) " >&6
6624else
6625  case $ECHO in
6626  [\\/]* | ?:[\\/]*)
6627  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6628  ;;
6629  *)
6630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6631for as_dir in $PATH
6632do
6633  IFS=$as_save_IFS
6634  test -z "$as_dir" && as_dir=.
6635    for ac_exec_ext in '' $ac_executable_extensions; do
6636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6637    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6639    break 2
6640  fi
6641done
6642  done
6643IFS=$as_save_IFS
6644
6645  ;;
6646esac
6647fi
6648ECHO=$ac_cv_path_ECHO
6649if test -n "$ECHO"; then
6650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6651$as_echo "$ECHO" >&6; }
6652else
6653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654$as_echo "no" >&6; }
6655fi
6656
6657
6658  test -n "$ECHO" && break
6659done
6660
6661  else
6662    # The variable is set, but is it from the command line or the environment?
6663
6664    # Try to remove the string !ECHO! from our list.
6665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6667      # If it failed, the variable was not from the command line. Ignore it,
6668      # but warn the user (except for BASH, which is always set by the calling BASH).
6669      if test "xECHO" != xBASH; then
6670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6671$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6672      fi
6673      # Try to locate tool using the code snippet
6674      for ac_prog in echo
6675do
6676  # Extract the first word of "$ac_prog", so it can be a program name with args.
6677set dummy $ac_prog; ac_word=$2
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679$as_echo_n "checking for $ac_word... " >&6; }
6680if ${ac_cv_path_ECHO+:} false; then :
6681  $as_echo_n "(cached) " >&6
6682else
6683  case $ECHO in
6684  [\\/]* | ?:[\\/]*)
6685  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6686  ;;
6687  *)
6688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6689for as_dir in $PATH
6690do
6691  IFS=$as_save_IFS
6692  test -z "$as_dir" && as_dir=.
6693    for ac_exec_ext in '' $ac_executable_extensions; do
6694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6695    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6697    break 2
6698  fi
6699done
6700  done
6701IFS=$as_save_IFS
6702
6703  ;;
6704esac
6705fi
6706ECHO=$ac_cv_path_ECHO
6707if test -n "$ECHO"; then
6708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6709$as_echo "$ECHO" >&6; }
6710else
6711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6712$as_echo "no" >&6; }
6713fi
6714
6715
6716  test -n "$ECHO" && break
6717done
6718
6719    else
6720      # If it succeeded, then it was overridden by the user. We will use it
6721      # for the tool.
6722
6723      # First remove it from the list of overridden variables, so we can test
6724      # for unknown variables in the end.
6725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6726
6727      # Check if the provided tool contains a complete path.
6728      tool_specified="$ECHO"
6729      tool_basename="${tool_specified##*/}"
6730      if test "x$tool_basename" = "x$tool_specified"; then
6731        # A command without a complete path is provided, search $PATH.
6732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6733$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6734        # Extract the first word of "$tool_basename", so it can be a program name with args.
6735set dummy $tool_basename; ac_word=$2
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6737$as_echo_n "checking for $ac_word... " >&6; }
6738if ${ac_cv_path_ECHO+:} false; then :
6739  $as_echo_n "(cached) " >&6
6740else
6741  case $ECHO in
6742  [\\/]* | ?:[\\/]*)
6743  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6744  ;;
6745  *)
6746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6747for as_dir in $PATH
6748do
6749  IFS=$as_save_IFS
6750  test -z "$as_dir" && as_dir=.
6751    for ac_exec_ext in '' $ac_executable_extensions; do
6752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6753    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6755    break 2
6756  fi
6757done
6758  done
6759IFS=$as_save_IFS
6760
6761  ;;
6762esac
6763fi
6764ECHO=$ac_cv_path_ECHO
6765if test -n "$ECHO"; then
6766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6767$as_echo "$ECHO" >&6; }
6768else
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6770$as_echo "no" >&6; }
6771fi
6772
6773
6774        if test "x$ECHO" = x; then
6775          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6776        fi
6777      else
6778        # Otherwise we believe it is a complete path. Use it as it is.
6779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6780$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6782$as_echo_n "checking for ECHO... " >&6; }
6783        if test ! -x "$tool_specified"; then
6784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6785$as_echo "not found" >&6; }
6786          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6787        fi
6788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6789$as_echo "$tool_specified" >&6; }
6790      fi
6791    fi
6792  fi
6793
6794
6795
6796  if test "x$ECHO" = x; then
6797    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6798  fi
6799
6800
6801
6802
6803
6804  # Publish this variable in the help.
6805
6806
6807  if test "x$EXPR" = x; then
6808    # The variable is not set by user, try to locate tool using the code snippet
6809    for ac_prog in expr
6810do
6811  # Extract the first word of "$ac_prog", so it can be a program name with args.
6812set dummy $ac_prog; ac_word=$2
6813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6814$as_echo_n "checking for $ac_word... " >&6; }
6815if ${ac_cv_path_EXPR+:} false; then :
6816  $as_echo_n "(cached) " >&6
6817else
6818  case $EXPR in
6819  [\\/]* | ?:[\\/]*)
6820  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6821  ;;
6822  *)
6823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6824for as_dir in $PATH
6825do
6826  IFS=$as_save_IFS
6827  test -z "$as_dir" && as_dir=.
6828    for ac_exec_ext in '' $ac_executable_extensions; do
6829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6830    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6832    break 2
6833  fi
6834done
6835  done
6836IFS=$as_save_IFS
6837
6838  ;;
6839esac
6840fi
6841EXPR=$ac_cv_path_EXPR
6842if test -n "$EXPR"; then
6843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6844$as_echo "$EXPR" >&6; }
6845else
6846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847$as_echo "no" >&6; }
6848fi
6849
6850
6851  test -n "$EXPR" && break
6852done
6853
6854  else
6855    # The variable is set, but is it from the command line or the environment?
6856
6857    # Try to remove the string !EXPR! from our list.
6858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6860      # If it failed, the variable was not from the command line. Ignore it,
6861      # but warn the user (except for BASH, which is always set by the calling BASH).
6862      if test "xEXPR" != xBASH; then
6863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6864$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6865      fi
6866      # Try to locate tool using the code snippet
6867      for ac_prog in expr
6868do
6869  # Extract the first word of "$ac_prog", so it can be a program name with args.
6870set dummy $ac_prog; ac_word=$2
6871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6872$as_echo_n "checking for $ac_word... " >&6; }
6873if ${ac_cv_path_EXPR+:} false; then :
6874  $as_echo_n "(cached) " >&6
6875else
6876  case $EXPR in
6877  [\\/]* | ?:[\\/]*)
6878  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6879  ;;
6880  *)
6881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6882for as_dir in $PATH
6883do
6884  IFS=$as_save_IFS
6885  test -z "$as_dir" && as_dir=.
6886    for ac_exec_ext in '' $ac_executable_extensions; do
6887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6888    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6890    break 2
6891  fi
6892done
6893  done
6894IFS=$as_save_IFS
6895
6896  ;;
6897esac
6898fi
6899EXPR=$ac_cv_path_EXPR
6900if test -n "$EXPR"; then
6901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6902$as_echo "$EXPR" >&6; }
6903else
6904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6905$as_echo "no" >&6; }
6906fi
6907
6908
6909  test -n "$EXPR" && break
6910done
6911
6912    else
6913      # If it succeeded, then it was overridden by the user. We will use it
6914      # for the tool.
6915
6916      # First remove it from the list of overridden variables, so we can test
6917      # for unknown variables in the end.
6918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6919
6920      # Check if the provided tool contains a complete path.
6921      tool_specified="$EXPR"
6922      tool_basename="${tool_specified##*/}"
6923      if test "x$tool_basename" = "x$tool_specified"; then
6924        # A command without a complete path is provided, search $PATH.
6925        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6926$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6927        # Extract the first word of "$tool_basename", so it can be a program name with args.
6928set dummy $tool_basename; ac_word=$2
6929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6930$as_echo_n "checking for $ac_word... " >&6; }
6931if ${ac_cv_path_EXPR+:} false; then :
6932  $as_echo_n "(cached) " >&6
6933else
6934  case $EXPR in
6935  [\\/]* | ?:[\\/]*)
6936  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6937  ;;
6938  *)
6939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6940for as_dir in $PATH
6941do
6942  IFS=$as_save_IFS
6943  test -z "$as_dir" && as_dir=.
6944    for ac_exec_ext in '' $ac_executable_extensions; do
6945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6946    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6948    break 2
6949  fi
6950done
6951  done
6952IFS=$as_save_IFS
6953
6954  ;;
6955esac
6956fi
6957EXPR=$ac_cv_path_EXPR
6958if test -n "$EXPR"; then
6959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6960$as_echo "$EXPR" >&6; }
6961else
6962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6963$as_echo "no" >&6; }
6964fi
6965
6966
6967        if test "x$EXPR" = x; then
6968          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6969        fi
6970      else
6971        # Otherwise we believe it is a complete path. Use it as it is.
6972        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6973$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6975$as_echo_n "checking for EXPR... " >&6; }
6976        if test ! -x "$tool_specified"; then
6977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6978$as_echo "not found" >&6; }
6979          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6980        fi
6981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6982$as_echo "$tool_specified" >&6; }
6983      fi
6984    fi
6985  fi
6986
6987
6988
6989  if test "x$EXPR" = x; then
6990    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6991  fi
6992
6993
6994
6995
6996
6997  # Publish this variable in the help.
6998
6999
7000  if test "x$FILE" = x; then
7001    # The variable is not set by user, try to locate tool using the code snippet
7002    for ac_prog in file
7003do
7004  # Extract the first word of "$ac_prog", so it can be a program name with args.
7005set dummy $ac_prog; ac_word=$2
7006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7007$as_echo_n "checking for $ac_word... " >&6; }
7008if ${ac_cv_path_FILE+:} false; then :
7009  $as_echo_n "(cached) " >&6
7010else
7011  case $FILE in
7012  [\\/]* | ?:[\\/]*)
7013  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7014  ;;
7015  *)
7016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7017for as_dir in $PATH
7018do
7019  IFS=$as_save_IFS
7020  test -z "$as_dir" && as_dir=.
7021    for ac_exec_ext in '' $ac_executable_extensions; do
7022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7023    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7025    break 2
7026  fi
7027done
7028  done
7029IFS=$as_save_IFS
7030
7031  ;;
7032esac
7033fi
7034FILE=$ac_cv_path_FILE
7035if test -n "$FILE"; then
7036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7037$as_echo "$FILE" >&6; }
7038else
7039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7040$as_echo "no" >&6; }
7041fi
7042
7043
7044  test -n "$FILE" && break
7045done
7046
7047  else
7048    # The variable is set, but is it from the command line or the environment?
7049
7050    # Try to remove the string !FILE! from our list.
7051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7053      # If it failed, the variable was not from the command line. Ignore it,
7054      # but warn the user (except for BASH, which is always set by the calling BASH).
7055      if test "xFILE" != xBASH; then
7056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7057$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7058      fi
7059      # Try to locate tool using the code snippet
7060      for ac_prog in file
7061do
7062  # Extract the first word of "$ac_prog", so it can be a program name with args.
7063set dummy $ac_prog; ac_word=$2
7064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7065$as_echo_n "checking for $ac_word... " >&6; }
7066if ${ac_cv_path_FILE+:} false; then :
7067  $as_echo_n "(cached) " >&6
7068else
7069  case $FILE in
7070  [\\/]* | ?:[\\/]*)
7071  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7072  ;;
7073  *)
7074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7075for as_dir in $PATH
7076do
7077  IFS=$as_save_IFS
7078  test -z "$as_dir" && as_dir=.
7079    for ac_exec_ext in '' $ac_executable_extensions; do
7080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7081    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7083    break 2
7084  fi
7085done
7086  done
7087IFS=$as_save_IFS
7088
7089  ;;
7090esac
7091fi
7092FILE=$ac_cv_path_FILE
7093if test -n "$FILE"; then
7094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7095$as_echo "$FILE" >&6; }
7096else
7097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7098$as_echo "no" >&6; }
7099fi
7100
7101
7102  test -n "$FILE" && break
7103done
7104
7105    else
7106      # If it succeeded, then it was overridden by the user. We will use it
7107      # for the tool.
7108
7109      # First remove it from the list of overridden variables, so we can test
7110      # for unknown variables in the end.
7111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7112
7113      # Check if the provided tool contains a complete path.
7114      tool_specified="$FILE"
7115      tool_basename="${tool_specified##*/}"
7116      if test "x$tool_basename" = "x$tool_specified"; then
7117        # A command without a complete path is provided, search $PATH.
7118        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7119$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7120        # Extract the first word of "$tool_basename", so it can be a program name with args.
7121set dummy $tool_basename; ac_word=$2
7122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7123$as_echo_n "checking for $ac_word... " >&6; }
7124if ${ac_cv_path_FILE+:} false; then :
7125  $as_echo_n "(cached) " >&6
7126else
7127  case $FILE in
7128  [\\/]* | ?:[\\/]*)
7129  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7130  ;;
7131  *)
7132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7133for as_dir in $PATH
7134do
7135  IFS=$as_save_IFS
7136  test -z "$as_dir" && as_dir=.
7137    for ac_exec_ext in '' $ac_executable_extensions; do
7138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7139    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7141    break 2
7142  fi
7143done
7144  done
7145IFS=$as_save_IFS
7146
7147  ;;
7148esac
7149fi
7150FILE=$ac_cv_path_FILE
7151if test -n "$FILE"; then
7152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7153$as_echo "$FILE" >&6; }
7154else
7155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7156$as_echo "no" >&6; }
7157fi
7158
7159
7160        if test "x$FILE" = x; then
7161          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7162        fi
7163      else
7164        # Otherwise we believe it is a complete path. Use it as it is.
7165        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7166$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7168$as_echo_n "checking for FILE... " >&6; }
7169        if test ! -x "$tool_specified"; then
7170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7171$as_echo "not found" >&6; }
7172          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7173        fi
7174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7175$as_echo "$tool_specified" >&6; }
7176      fi
7177    fi
7178  fi
7179
7180
7181
7182  if test "x$FILE" = x; then
7183    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7184  fi
7185
7186
7187
7188
7189
7190  # Publish this variable in the help.
7191
7192
7193  if test "x$FIND" = x; then
7194    # The variable is not set by user, try to locate tool using the code snippet
7195    for ac_prog in find
7196do
7197  # Extract the first word of "$ac_prog", so it can be a program name with args.
7198set dummy $ac_prog; ac_word=$2
7199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7200$as_echo_n "checking for $ac_word... " >&6; }
7201if ${ac_cv_path_FIND+:} false; then :
7202  $as_echo_n "(cached) " >&6
7203else
7204  case $FIND in
7205  [\\/]* | ?:[\\/]*)
7206  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7207  ;;
7208  *)
7209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7210for as_dir in $PATH
7211do
7212  IFS=$as_save_IFS
7213  test -z "$as_dir" && as_dir=.
7214    for ac_exec_ext in '' $ac_executable_extensions; do
7215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7216    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7218    break 2
7219  fi
7220done
7221  done
7222IFS=$as_save_IFS
7223
7224  ;;
7225esac
7226fi
7227FIND=$ac_cv_path_FIND
7228if test -n "$FIND"; then
7229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7230$as_echo "$FIND" >&6; }
7231else
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7233$as_echo "no" >&6; }
7234fi
7235
7236
7237  test -n "$FIND" && break
7238done
7239
7240  else
7241    # The variable is set, but is it from the command line or the environment?
7242
7243    # Try to remove the string !FIND! from our list.
7244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7246      # If it failed, the variable was not from the command line. Ignore it,
7247      # but warn the user (except for BASH, which is always set by the calling BASH).
7248      if test "xFIND" != xBASH; then
7249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7250$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7251      fi
7252      # Try to locate tool using the code snippet
7253      for ac_prog in find
7254do
7255  # Extract the first word of "$ac_prog", so it can be a program name with args.
7256set dummy $ac_prog; ac_word=$2
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7258$as_echo_n "checking for $ac_word... " >&6; }
7259if ${ac_cv_path_FIND+:} false; then :
7260  $as_echo_n "(cached) " >&6
7261else
7262  case $FIND in
7263  [\\/]* | ?:[\\/]*)
7264  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7265  ;;
7266  *)
7267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7268for as_dir in $PATH
7269do
7270  IFS=$as_save_IFS
7271  test -z "$as_dir" && as_dir=.
7272    for ac_exec_ext in '' $ac_executable_extensions; do
7273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7274    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7276    break 2
7277  fi
7278done
7279  done
7280IFS=$as_save_IFS
7281
7282  ;;
7283esac
7284fi
7285FIND=$ac_cv_path_FIND
7286if test -n "$FIND"; then
7287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7288$as_echo "$FIND" >&6; }
7289else
7290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7291$as_echo "no" >&6; }
7292fi
7293
7294
7295  test -n "$FIND" && break
7296done
7297
7298    else
7299      # If it succeeded, then it was overridden by the user. We will use it
7300      # for the tool.
7301
7302      # First remove it from the list of overridden variables, so we can test
7303      # for unknown variables in the end.
7304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7305
7306      # Check if the provided tool contains a complete path.
7307      tool_specified="$FIND"
7308      tool_basename="${tool_specified##*/}"
7309      if test "x$tool_basename" = "x$tool_specified"; then
7310        # A command without a complete path is provided, search $PATH.
7311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7312$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7313        # Extract the first word of "$tool_basename", so it can be a program name with args.
7314set dummy $tool_basename; ac_word=$2
7315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7316$as_echo_n "checking for $ac_word... " >&6; }
7317if ${ac_cv_path_FIND+:} false; then :
7318  $as_echo_n "(cached) " >&6
7319else
7320  case $FIND in
7321  [\\/]* | ?:[\\/]*)
7322  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7323  ;;
7324  *)
7325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7326for as_dir in $PATH
7327do
7328  IFS=$as_save_IFS
7329  test -z "$as_dir" && as_dir=.
7330    for ac_exec_ext in '' $ac_executable_extensions; do
7331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7332    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7334    break 2
7335  fi
7336done
7337  done
7338IFS=$as_save_IFS
7339
7340  ;;
7341esac
7342fi
7343FIND=$ac_cv_path_FIND
7344if test -n "$FIND"; then
7345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7346$as_echo "$FIND" >&6; }
7347else
7348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7349$as_echo "no" >&6; }
7350fi
7351
7352
7353        if test "x$FIND" = x; then
7354          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7355        fi
7356      else
7357        # Otherwise we believe it is a complete path. Use it as it is.
7358        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7359$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7361$as_echo_n "checking for FIND... " >&6; }
7362        if test ! -x "$tool_specified"; then
7363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7364$as_echo "not found" >&6; }
7365          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7366        fi
7367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7368$as_echo "$tool_specified" >&6; }
7369      fi
7370    fi
7371  fi
7372
7373
7374
7375  if test "x$FIND" = x; then
7376    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7377  fi
7378
7379
7380
7381
7382
7383  # Publish this variable in the help.
7384
7385
7386  if test "x$HEAD" = x; then
7387    # The variable is not set by user, try to locate tool using the code snippet
7388    for ac_prog in head
7389do
7390  # Extract the first word of "$ac_prog", so it can be a program name with args.
7391set dummy $ac_prog; ac_word=$2
7392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7393$as_echo_n "checking for $ac_word... " >&6; }
7394if ${ac_cv_path_HEAD+:} false; then :
7395  $as_echo_n "(cached) " >&6
7396else
7397  case $HEAD in
7398  [\\/]* | ?:[\\/]*)
7399  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7400  ;;
7401  *)
7402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7403for as_dir in $PATH
7404do
7405  IFS=$as_save_IFS
7406  test -z "$as_dir" && as_dir=.
7407    for ac_exec_ext in '' $ac_executable_extensions; do
7408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7409    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7411    break 2
7412  fi
7413done
7414  done
7415IFS=$as_save_IFS
7416
7417  ;;
7418esac
7419fi
7420HEAD=$ac_cv_path_HEAD
7421if test -n "$HEAD"; then
7422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7423$as_echo "$HEAD" >&6; }
7424else
7425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7426$as_echo "no" >&6; }
7427fi
7428
7429
7430  test -n "$HEAD" && break
7431done
7432
7433  else
7434    # The variable is set, but is it from the command line or the environment?
7435
7436    # Try to remove the string !HEAD! from our list.
7437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7439      # If it failed, the variable was not from the command line. Ignore it,
7440      # but warn the user (except for BASH, which is always set by the calling BASH).
7441      if test "xHEAD" != xBASH; then
7442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7443$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7444      fi
7445      # Try to locate tool using the code snippet
7446      for ac_prog in head
7447do
7448  # Extract the first word of "$ac_prog", so it can be a program name with args.
7449set dummy $ac_prog; ac_word=$2
7450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7451$as_echo_n "checking for $ac_word... " >&6; }
7452if ${ac_cv_path_HEAD+:} false; then :
7453  $as_echo_n "(cached) " >&6
7454else
7455  case $HEAD in
7456  [\\/]* | ?:[\\/]*)
7457  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7458  ;;
7459  *)
7460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7461for as_dir in $PATH
7462do
7463  IFS=$as_save_IFS
7464  test -z "$as_dir" && as_dir=.
7465    for ac_exec_ext in '' $ac_executable_extensions; do
7466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7467    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7469    break 2
7470  fi
7471done
7472  done
7473IFS=$as_save_IFS
7474
7475  ;;
7476esac
7477fi
7478HEAD=$ac_cv_path_HEAD
7479if test -n "$HEAD"; then
7480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7481$as_echo "$HEAD" >&6; }
7482else
7483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7484$as_echo "no" >&6; }
7485fi
7486
7487
7488  test -n "$HEAD" && break
7489done
7490
7491    else
7492      # If it succeeded, then it was overridden by the user. We will use it
7493      # for the tool.
7494
7495      # First remove it from the list of overridden variables, so we can test
7496      # for unknown variables in the end.
7497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7498
7499      # Check if the provided tool contains a complete path.
7500      tool_specified="$HEAD"
7501      tool_basename="${tool_specified##*/}"
7502      if test "x$tool_basename" = "x$tool_specified"; then
7503        # A command without a complete path is provided, search $PATH.
7504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7505$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7506        # Extract the first word of "$tool_basename", so it can be a program name with args.
7507set dummy $tool_basename; ac_word=$2
7508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7509$as_echo_n "checking for $ac_word... " >&6; }
7510if ${ac_cv_path_HEAD+:} false; then :
7511  $as_echo_n "(cached) " >&6
7512else
7513  case $HEAD in
7514  [\\/]* | ?:[\\/]*)
7515  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7516  ;;
7517  *)
7518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7519for as_dir in $PATH
7520do
7521  IFS=$as_save_IFS
7522  test -z "$as_dir" && as_dir=.
7523    for ac_exec_ext in '' $ac_executable_extensions; do
7524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7525    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7527    break 2
7528  fi
7529done
7530  done
7531IFS=$as_save_IFS
7532
7533  ;;
7534esac
7535fi
7536HEAD=$ac_cv_path_HEAD
7537if test -n "$HEAD"; then
7538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7539$as_echo "$HEAD" >&6; }
7540else
7541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7542$as_echo "no" >&6; }
7543fi
7544
7545
7546        if test "x$HEAD" = x; then
7547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7548        fi
7549      else
7550        # Otherwise we believe it is a complete path. Use it as it is.
7551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7552$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7554$as_echo_n "checking for HEAD... " >&6; }
7555        if test ! -x "$tool_specified"; then
7556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7557$as_echo "not found" >&6; }
7558          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7559        fi
7560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7561$as_echo "$tool_specified" >&6; }
7562      fi
7563    fi
7564  fi
7565
7566
7567
7568  if test "x$HEAD" = x; then
7569    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7570  fi
7571
7572
7573
7574
7575
7576  # Publish this variable in the help.
7577
7578
7579  if test "x$LN" = x; then
7580    # The variable is not set by user, try to locate tool using the code snippet
7581    for ac_prog in ln
7582do
7583  # Extract the first word of "$ac_prog", so it can be a program name with args.
7584set dummy $ac_prog; ac_word=$2
7585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7586$as_echo_n "checking for $ac_word... " >&6; }
7587if ${ac_cv_path_LN+:} false; then :
7588  $as_echo_n "(cached) " >&6
7589else
7590  case $LN in
7591  [\\/]* | ?:[\\/]*)
7592  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7593  ;;
7594  *)
7595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7596for as_dir in $PATH
7597do
7598  IFS=$as_save_IFS
7599  test -z "$as_dir" && as_dir=.
7600    for ac_exec_ext in '' $ac_executable_extensions; do
7601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7602    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7604    break 2
7605  fi
7606done
7607  done
7608IFS=$as_save_IFS
7609
7610  ;;
7611esac
7612fi
7613LN=$ac_cv_path_LN
7614if test -n "$LN"; then
7615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7616$as_echo "$LN" >&6; }
7617else
7618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7619$as_echo "no" >&6; }
7620fi
7621
7622
7623  test -n "$LN" && break
7624done
7625
7626  else
7627    # The variable is set, but is it from the command line or the environment?
7628
7629    # Try to remove the string !LN! from our list.
7630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7632      # If it failed, the variable was not from the command line. Ignore it,
7633      # but warn the user (except for BASH, which is always set by the calling BASH).
7634      if test "xLN" != xBASH; then
7635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7636$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7637      fi
7638      # Try to locate tool using the code snippet
7639      for ac_prog in ln
7640do
7641  # Extract the first word of "$ac_prog", so it can be a program name with args.
7642set dummy $ac_prog; ac_word=$2
7643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7644$as_echo_n "checking for $ac_word... " >&6; }
7645if ${ac_cv_path_LN+:} false; then :
7646  $as_echo_n "(cached) " >&6
7647else
7648  case $LN in
7649  [\\/]* | ?:[\\/]*)
7650  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7651  ;;
7652  *)
7653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7654for as_dir in $PATH
7655do
7656  IFS=$as_save_IFS
7657  test -z "$as_dir" && as_dir=.
7658    for ac_exec_ext in '' $ac_executable_extensions; do
7659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7660    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7662    break 2
7663  fi
7664done
7665  done
7666IFS=$as_save_IFS
7667
7668  ;;
7669esac
7670fi
7671LN=$ac_cv_path_LN
7672if test -n "$LN"; then
7673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7674$as_echo "$LN" >&6; }
7675else
7676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7677$as_echo "no" >&6; }
7678fi
7679
7680
7681  test -n "$LN" && break
7682done
7683
7684    else
7685      # If it succeeded, then it was overridden by the user. We will use it
7686      # for the tool.
7687
7688      # First remove it from the list of overridden variables, so we can test
7689      # for unknown variables in the end.
7690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7691
7692      # Check if the provided tool contains a complete path.
7693      tool_specified="$LN"
7694      tool_basename="${tool_specified##*/}"
7695      if test "x$tool_basename" = "x$tool_specified"; then
7696        # A command without a complete path is provided, search $PATH.
7697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7698$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7699        # Extract the first word of "$tool_basename", so it can be a program name with args.
7700set dummy $tool_basename; ac_word=$2
7701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7702$as_echo_n "checking for $ac_word... " >&6; }
7703if ${ac_cv_path_LN+:} false; then :
7704  $as_echo_n "(cached) " >&6
7705else
7706  case $LN in
7707  [\\/]* | ?:[\\/]*)
7708  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7709  ;;
7710  *)
7711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7712for as_dir in $PATH
7713do
7714  IFS=$as_save_IFS
7715  test -z "$as_dir" && as_dir=.
7716    for ac_exec_ext in '' $ac_executable_extensions; do
7717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7718    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7720    break 2
7721  fi
7722done
7723  done
7724IFS=$as_save_IFS
7725
7726  ;;
7727esac
7728fi
7729LN=$ac_cv_path_LN
7730if test -n "$LN"; then
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7732$as_echo "$LN" >&6; }
7733else
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7735$as_echo "no" >&6; }
7736fi
7737
7738
7739        if test "x$LN" = x; then
7740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7741        fi
7742      else
7743        # Otherwise we believe it is a complete path. Use it as it is.
7744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7745$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7747$as_echo_n "checking for LN... " >&6; }
7748        if test ! -x "$tool_specified"; then
7749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7750$as_echo "not found" >&6; }
7751          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7752        fi
7753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7754$as_echo "$tool_specified" >&6; }
7755      fi
7756    fi
7757  fi
7758
7759
7760
7761  if test "x$LN" = x; then
7762    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7763  fi
7764
7765
7766
7767
7768
7769  # Publish this variable in the help.
7770
7771
7772  if test "x$LS" = x; then
7773    # The variable is not set by user, try to locate tool using the code snippet
7774    for ac_prog in ls
7775do
7776  # Extract the first word of "$ac_prog", so it can be a program name with args.
7777set dummy $ac_prog; ac_word=$2
7778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7779$as_echo_n "checking for $ac_word... " >&6; }
7780if ${ac_cv_path_LS+:} false; then :
7781  $as_echo_n "(cached) " >&6
7782else
7783  case $LS in
7784  [\\/]* | ?:[\\/]*)
7785  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7786  ;;
7787  *)
7788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7789for as_dir in $PATH
7790do
7791  IFS=$as_save_IFS
7792  test -z "$as_dir" && as_dir=.
7793    for ac_exec_ext in '' $ac_executable_extensions; do
7794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7795    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7797    break 2
7798  fi
7799done
7800  done
7801IFS=$as_save_IFS
7802
7803  ;;
7804esac
7805fi
7806LS=$ac_cv_path_LS
7807if test -n "$LS"; then
7808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7809$as_echo "$LS" >&6; }
7810else
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7812$as_echo "no" >&6; }
7813fi
7814
7815
7816  test -n "$LS" && break
7817done
7818
7819  else
7820    # The variable is set, but is it from the command line or the environment?
7821
7822    # Try to remove the string !LS! from our list.
7823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7825      # If it failed, the variable was not from the command line. Ignore it,
7826      # but warn the user (except for BASH, which is always set by the calling BASH).
7827      if test "xLS" != xBASH; then
7828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7829$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7830      fi
7831      # Try to locate tool using the code snippet
7832      for ac_prog in ls
7833do
7834  # Extract the first word of "$ac_prog", so it can be a program name with args.
7835set dummy $ac_prog; ac_word=$2
7836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7837$as_echo_n "checking for $ac_word... " >&6; }
7838if ${ac_cv_path_LS+:} false; then :
7839  $as_echo_n "(cached) " >&6
7840else
7841  case $LS in
7842  [\\/]* | ?:[\\/]*)
7843  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7844  ;;
7845  *)
7846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7847for as_dir in $PATH
7848do
7849  IFS=$as_save_IFS
7850  test -z "$as_dir" && as_dir=.
7851    for ac_exec_ext in '' $ac_executable_extensions; do
7852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7853    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7855    break 2
7856  fi
7857done
7858  done
7859IFS=$as_save_IFS
7860
7861  ;;
7862esac
7863fi
7864LS=$ac_cv_path_LS
7865if test -n "$LS"; then
7866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7867$as_echo "$LS" >&6; }
7868else
7869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7870$as_echo "no" >&6; }
7871fi
7872
7873
7874  test -n "$LS" && break
7875done
7876
7877    else
7878      # If it succeeded, then it was overridden by the user. We will use it
7879      # for the tool.
7880
7881      # First remove it from the list of overridden variables, so we can test
7882      # for unknown variables in the end.
7883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7884
7885      # Check if the provided tool contains a complete path.
7886      tool_specified="$LS"
7887      tool_basename="${tool_specified##*/}"
7888      if test "x$tool_basename" = "x$tool_specified"; then
7889        # A command without a complete path is provided, search $PATH.
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7891$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7892        # Extract the first word of "$tool_basename", so it can be a program name with args.
7893set dummy $tool_basename; ac_word=$2
7894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7895$as_echo_n "checking for $ac_word... " >&6; }
7896if ${ac_cv_path_LS+:} false; then :
7897  $as_echo_n "(cached) " >&6
7898else
7899  case $LS in
7900  [\\/]* | ?:[\\/]*)
7901  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7902  ;;
7903  *)
7904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7905for as_dir in $PATH
7906do
7907  IFS=$as_save_IFS
7908  test -z "$as_dir" && as_dir=.
7909    for ac_exec_ext in '' $ac_executable_extensions; do
7910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7911    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7913    break 2
7914  fi
7915done
7916  done
7917IFS=$as_save_IFS
7918
7919  ;;
7920esac
7921fi
7922LS=$ac_cv_path_LS
7923if test -n "$LS"; then
7924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7925$as_echo "$LS" >&6; }
7926else
7927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7928$as_echo "no" >&6; }
7929fi
7930
7931
7932        if test "x$LS" = x; then
7933          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7934        fi
7935      else
7936        # Otherwise we believe it is a complete path. Use it as it is.
7937        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7938$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7940$as_echo_n "checking for LS... " >&6; }
7941        if test ! -x "$tool_specified"; then
7942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7943$as_echo "not found" >&6; }
7944          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7945        fi
7946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7947$as_echo "$tool_specified" >&6; }
7948      fi
7949    fi
7950  fi
7951
7952
7953
7954  if test "x$LS" = x; then
7955    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7956  fi
7957
7958
7959
7960
7961
7962  # Publish this variable in the help.
7963
7964
7965  if test "x$MKDIR" = x; then
7966    # The variable is not set by user, try to locate tool using the code snippet
7967    for ac_prog in mkdir
7968do
7969  # Extract the first word of "$ac_prog", so it can be a program name with args.
7970set dummy $ac_prog; ac_word=$2
7971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7972$as_echo_n "checking for $ac_word... " >&6; }
7973if ${ac_cv_path_MKDIR+:} false; then :
7974  $as_echo_n "(cached) " >&6
7975else
7976  case $MKDIR in
7977  [\\/]* | ?:[\\/]*)
7978  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7979  ;;
7980  *)
7981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7982for as_dir in $PATH
7983do
7984  IFS=$as_save_IFS
7985  test -z "$as_dir" && as_dir=.
7986    for ac_exec_ext in '' $ac_executable_extensions; do
7987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7988    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7990    break 2
7991  fi
7992done
7993  done
7994IFS=$as_save_IFS
7995
7996  ;;
7997esac
7998fi
7999MKDIR=$ac_cv_path_MKDIR
8000if test -n "$MKDIR"; then
8001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8002$as_echo "$MKDIR" >&6; }
8003else
8004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8005$as_echo "no" >&6; }
8006fi
8007
8008
8009  test -n "$MKDIR" && break
8010done
8011
8012  else
8013    # The variable is set, but is it from the command line or the environment?
8014
8015    # Try to remove the string !MKDIR! from our list.
8016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8018      # If it failed, the variable was not from the command line. Ignore it,
8019      # but warn the user (except for BASH, which is always set by the calling BASH).
8020      if test "xMKDIR" != xBASH; then
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8022$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8023      fi
8024      # Try to locate tool using the code snippet
8025      for ac_prog in mkdir
8026do
8027  # Extract the first word of "$ac_prog", so it can be a program name with args.
8028set dummy $ac_prog; ac_word=$2
8029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8030$as_echo_n "checking for $ac_word... " >&6; }
8031if ${ac_cv_path_MKDIR+:} false; then :
8032  $as_echo_n "(cached) " >&6
8033else
8034  case $MKDIR in
8035  [\\/]* | ?:[\\/]*)
8036  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8037  ;;
8038  *)
8039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8040for as_dir in $PATH
8041do
8042  IFS=$as_save_IFS
8043  test -z "$as_dir" && as_dir=.
8044    for ac_exec_ext in '' $ac_executable_extensions; do
8045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8046    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8048    break 2
8049  fi
8050done
8051  done
8052IFS=$as_save_IFS
8053
8054  ;;
8055esac
8056fi
8057MKDIR=$ac_cv_path_MKDIR
8058if test -n "$MKDIR"; then
8059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8060$as_echo "$MKDIR" >&6; }
8061else
8062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8063$as_echo "no" >&6; }
8064fi
8065
8066
8067  test -n "$MKDIR" && break
8068done
8069
8070    else
8071      # If it succeeded, then it was overridden by the user. We will use it
8072      # for the tool.
8073
8074      # First remove it from the list of overridden variables, so we can test
8075      # for unknown variables in the end.
8076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8077
8078      # Check if the provided tool contains a complete path.
8079      tool_specified="$MKDIR"
8080      tool_basename="${tool_specified##*/}"
8081      if test "x$tool_basename" = "x$tool_specified"; then
8082        # A command without a complete path is provided, search $PATH.
8083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8084$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8085        # Extract the first word of "$tool_basename", so it can be a program name with args.
8086set dummy $tool_basename; ac_word=$2
8087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8088$as_echo_n "checking for $ac_word... " >&6; }
8089if ${ac_cv_path_MKDIR+:} false; then :
8090  $as_echo_n "(cached) " >&6
8091else
8092  case $MKDIR in
8093  [\\/]* | ?:[\\/]*)
8094  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8095  ;;
8096  *)
8097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098for as_dir in $PATH
8099do
8100  IFS=$as_save_IFS
8101  test -z "$as_dir" && as_dir=.
8102    for ac_exec_ext in '' $ac_executable_extensions; do
8103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8104    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8106    break 2
8107  fi
8108done
8109  done
8110IFS=$as_save_IFS
8111
8112  ;;
8113esac
8114fi
8115MKDIR=$ac_cv_path_MKDIR
8116if test -n "$MKDIR"; then
8117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8118$as_echo "$MKDIR" >&6; }
8119else
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8121$as_echo "no" >&6; }
8122fi
8123
8124
8125        if test "x$MKDIR" = x; then
8126          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8127        fi
8128      else
8129        # Otherwise we believe it is a complete path. Use it as it is.
8130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8131$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8133$as_echo_n "checking for MKDIR... " >&6; }
8134        if test ! -x "$tool_specified"; then
8135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8136$as_echo "not found" >&6; }
8137          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8138        fi
8139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8140$as_echo "$tool_specified" >&6; }
8141      fi
8142    fi
8143  fi
8144
8145
8146
8147  if test "x$MKDIR" = x; then
8148    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8149  fi
8150
8151
8152
8153
8154
8155  # Publish this variable in the help.
8156
8157
8158  if test "x$MKTEMP" = x; then
8159    # The variable is not set by user, try to locate tool using the code snippet
8160    for ac_prog in mktemp
8161do
8162  # Extract the first word of "$ac_prog", so it can be a program name with args.
8163set dummy $ac_prog; ac_word=$2
8164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8165$as_echo_n "checking for $ac_word... " >&6; }
8166if ${ac_cv_path_MKTEMP+:} false; then :
8167  $as_echo_n "(cached) " >&6
8168else
8169  case $MKTEMP in
8170  [\\/]* | ?:[\\/]*)
8171  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8172  ;;
8173  *)
8174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8175for as_dir in $PATH
8176do
8177  IFS=$as_save_IFS
8178  test -z "$as_dir" && as_dir=.
8179    for ac_exec_ext in '' $ac_executable_extensions; do
8180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8181    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8183    break 2
8184  fi
8185done
8186  done
8187IFS=$as_save_IFS
8188
8189  ;;
8190esac
8191fi
8192MKTEMP=$ac_cv_path_MKTEMP
8193if test -n "$MKTEMP"; then
8194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8195$as_echo "$MKTEMP" >&6; }
8196else
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8198$as_echo "no" >&6; }
8199fi
8200
8201
8202  test -n "$MKTEMP" && break
8203done
8204
8205  else
8206    # The variable is set, but is it from the command line or the environment?
8207
8208    # Try to remove the string !MKTEMP! from our list.
8209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8211      # If it failed, the variable was not from the command line. Ignore it,
8212      # but warn the user (except for BASH, which is always set by the calling BASH).
8213      if test "xMKTEMP" != xBASH; then
8214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8215$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8216      fi
8217      # Try to locate tool using the code snippet
8218      for ac_prog in mktemp
8219do
8220  # Extract the first word of "$ac_prog", so it can be a program name with args.
8221set dummy $ac_prog; ac_word=$2
8222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8223$as_echo_n "checking for $ac_word... " >&6; }
8224if ${ac_cv_path_MKTEMP+:} false; then :
8225  $as_echo_n "(cached) " >&6
8226else
8227  case $MKTEMP in
8228  [\\/]* | ?:[\\/]*)
8229  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8230  ;;
8231  *)
8232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8233for as_dir in $PATH
8234do
8235  IFS=$as_save_IFS
8236  test -z "$as_dir" && as_dir=.
8237    for ac_exec_ext in '' $ac_executable_extensions; do
8238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8239    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8241    break 2
8242  fi
8243done
8244  done
8245IFS=$as_save_IFS
8246
8247  ;;
8248esac
8249fi
8250MKTEMP=$ac_cv_path_MKTEMP
8251if test -n "$MKTEMP"; then
8252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8253$as_echo "$MKTEMP" >&6; }
8254else
8255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8256$as_echo "no" >&6; }
8257fi
8258
8259
8260  test -n "$MKTEMP" && break
8261done
8262
8263    else
8264      # If it succeeded, then it was overridden by the user. We will use it
8265      # for the tool.
8266
8267      # First remove it from the list of overridden variables, so we can test
8268      # for unknown variables in the end.
8269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8270
8271      # Check if the provided tool contains a complete path.
8272      tool_specified="$MKTEMP"
8273      tool_basename="${tool_specified##*/}"
8274      if test "x$tool_basename" = "x$tool_specified"; then
8275        # A command without a complete path is provided, search $PATH.
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8277$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8278        # Extract the first word of "$tool_basename", so it can be a program name with args.
8279set dummy $tool_basename; ac_word=$2
8280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8281$as_echo_n "checking for $ac_word... " >&6; }
8282if ${ac_cv_path_MKTEMP+:} false; then :
8283  $as_echo_n "(cached) " >&6
8284else
8285  case $MKTEMP in
8286  [\\/]* | ?:[\\/]*)
8287  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8288  ;;
8289  *)
8290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8291for as_dir in $PATH
8292do
8293  IFS=$as_save_IFS
8294  test -z "$as_dir" && as_dir=.
8295    for ac_exec_ext in '' $ac_executable_extensions; do
8296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8297    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8299    break 2
8300  fi
8301done
8302  done
8303IFS=$as_save_IFS
8304
8305  ;;
8306esac
8307fi
8308MKTEMP=$ac_cv_path_MKTEMP
8309if test -n "$MKTEMP"; then
8310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8311$as_echo "$MKTEMP" >&6; }
8312else
8313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8314$as_echo "no" >&6; }
8315fi
8316
8317
8318        if test "x$MKTEMP" = x; then
8319          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8320        fi
8321      else
8322        # Otherwise we believe it is a complete path. Use it as it is.
8323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8324$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8326$as_echo_n "checking for MKTEMP... " >&6; }
8327        if test ! -x "$tool_specified"; then
8328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8329$as_echo "not found" >&6; }
8330          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8331        fi
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8333$as_echo "$tool_specified" >&6; }
8334      fi
8335    fi
8336  fi
8337
8338
8339
8340  if test "x$MKTEMP" = x; then
8341    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8342  fi
8343
8344
8345
8346
8347
8348  # Publish this variable in the help.
8349
8350
8351  if test "x$MV" = x; then
8352    # The variable is not set by user, try to locate tool using the code snippet
8353    for ac_prog in mv
8354do
8355  # Extract the first word of "$ac_prog", so it can be a program name with args.
8356set dummy $ac_prog; ac_word=$2
8357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8358$as_echo_n "checking for $ac_word... " >&6; }
8359if ${ac_cv_path_MV+:} false; then :
8360  $as_echo_n "(cached) " >&6
8361else
8362  case $MV in
8363  [\\/]* | ?:[\\/]*)
8364  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8365  ;;
8366  *)
8367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8368for as_dir in $PATH
8369do
8370  IFS=$as_save_IFS
8371  test -z "$as_dir" && as_dir=.
8372    for ac_exec_ext in '' $ac_executable_extensions; do
8373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8374    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8376    break 2
8377  fi
8378done
8379  done
8380IFS=$as_save_IFS
8381
8382  ;;
8383esac
8384fi
8385MV=$ac_cv_path_MV
8386if test -n "$MV"; then
8387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8388$as_echo "$MV" >&6; }
8389else
8390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8391$as_echo "no" >&6; }
8392fi
8393
8394
8395  test -n "$MV" && break
8396done
8397
8398  else
8399    # The variable is set, but is it from the command line or the environment?
8400
8401    # Try to remove the string !MV! from our list.
8402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8404      # If it failed, the variable was not from the command line. Ignore it,
8405      # but warn the user (except for BASH, which is always set by the calling BASH).
8406      if test "xMV" != xBASH; then
8407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8408$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8409      fi
8410      # Try to locate tool using the code snippet
8411      for ac_prog in mv
8412do
8413  # Extract the first word of "$ac_prog", so it can be a program name with args.
8414set dummy $ac_prog; ac_word=$2
8415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8416$as_echo_n "checking for $ac_word... " >&6; }
8417if ${ac_cv_path_MV+:} false; then :
8418  $as_echo_n "(cached) " >&6
8419else
8420  case $MV in
8421  [\\/]* | ?:[\\/]*)
8422  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8423  ;;
8424  *)
8425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8426for as_dir in $PATH
8427do
8428  IFS=$as_save_IFS
8429  test -z "$as_dir" && as_dir=.
8430    for ac_exec_ext in '' $ac_executable_extensions; do
8431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8432    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8434    break 2
8435  fi
8436done
8437  done
8438IFS=$as_save_IFS
8439
8440  ;;
8441esac
8442fi
8443MV=$ac_cv_path_MV
8444if test -n "$MV"; then
8445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8446$as_echo "$MV" >&6; }
8447else
8448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8449$as_echo "no" >&6; }
8450fi
8451
8452
8453  test -n "$MV" && break
8454done
8455
8456    else
8457      # If it succeeded, then it was overridden by the user. We will use it
8458      # for the tool.
8459
8460      # First remove it from the list of overridden variables, so we can test
8461      # for unknown variables in the end.
8462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8463
8464      # Check if the provided tool contains a complete path.
8465      tool_specified="$MV"
8466      tool_basename="${tool_specified##*/}"
8467      if test "x$tool_basename" = "x$tool_specified"; then
8468        # A command without a complete path is provided, search $PATH.
8469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8470$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8471        # Extract the first word of "$tool_basename", so it can be a program name with args.
8472set dummy $tool_basename; ac_word=$2
8473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8474$as_echo_n "checking for $ac_word... " >&6; }
8475if ${ac_cv_path_MV+:} false; then :
8476  $as_echo_n "(cached) " >&6
8477else
8478  case $MV in
8479  [\\/]* | ?:[\\/]*)
8480  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8481  ;;
8482  *)
8483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8484for as_dir in $PATH
8485do
8486  IFS=$as_save_IFS
8487  test -z "$as_dir" && as_dir=.
8488    for ac_exec_ext in '' $ac_executable_extensions; do
8489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8490    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8492    break 2
8493  fi
8494done
8495  done
8496IFS=$as_save_IFS
8497
8498  ;;
8499esac
8500fi
8501MV=$ac_cv_path_MV
8502if test -n "$MV"; then
8503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8504$as_echo "$MV" >&6; }
8505else
8506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507$as_echo "no" >&6; }
8508fi
8509
8510
8511        if test "x$MV" = x; then
8512          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8513        fi
8514      else
8515        # Otherwise we believe it is a complete path. Use it as it is.
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8517$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8519$as_echo_n "checking for MV... " >&6; }
8520        if test ! -x "$tool_specified"; then
8521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8522$as_echo "not found" >&6; }
8523          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8524        fi
8525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8526$as_echo "$tool_specified" >&6; }
8527      fi
8528    fi
8529  fi
8530
8531
8532
8533  if test "x$MV" = x; then
8534    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8535  fi
8536
8537
8538
8539
8540
8541  # Publish this variable in the help.
8542
8543
8544  if test "x$NAWK" = x; then
8545    # The variable is not set by user, try to locate tool using the code snippet
8546    for ac_prog in nawk gawk awk
8547do
8548  # Extract the first word of "$ac_prog", so it can be a program name with args.
8549set dummy $ac_prog; ac_word=$2
8550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8551$as_echo_n "checking for $ac_word... " >&6; }
8552if ${ac_cv_path_NAWK+:} false; then :
8553  $as_echo_n "(cached) " >&6
8554else
8555  case $NAWK in
8556  [\\/]* | ?:[\\/]*)
8557  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8558  ;;
8559  *)
8560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8561for as_dir in $PATH
8562do
8563  IFS=$as_save_IFS
8564  test -z "$as_dir" && as_dir=.
8565    for ac_exec_ext in '' $ac_executable_extensions; do
8566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8567    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8569    break 2
8570  fi
8571done
8572  done
8573IFS=$as_save_IFS
8574
8575  ;;
8576esac
8577fi
8578NAWK=$ac_cv_path_NAWK
8579if test -n "$NAWK"; then
8580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8581$as_echo "$NAWK" >&6; }
8582else
8583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8584$as_echo "no" >&6; }
8585fi
8586
8587
8588  test -n "$NAWK" && break
8589done
8590
8591  else
8592    # The variable is set, but is it from the command line or the environment?
8593
8594    # Try to remove the string !NAWK! from our list.
8595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8597      # If it failed, the variable was not from the command line. Ignore it,
8598      # but warn the user (except for BASH, which is always set by the calling BASH).
8599      if test "xNAWK" != xBASH; then
8600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8601$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8602      fi
8603      # Try to locate tool using the code snippet
8604      for ac_prog in nawk gawk awk
8605do
8606  # Extract the first word of "$ac_prog", so it can be a program name with args.
8607set dummy $ac_prog; ac_word=$2
8608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8609$as_echo_n "checking for $ac_word... " >&6; }
8610if ${ac_cv_path_NAWK+:} false; then :
8611  $as_echo_n "(cached) " >&6
8612else
8613  case $NAWK in
8614  [\\/]* | ?:[\\/]*)
8615  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8616  ;;
8617  *)
8618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8619for as_dir in $PATH
8620do
8621  IFS=$as_save_IFS
8622  test -z "$as_dir" && as_dir=.
8623    for ac_exec_ext in '' $ac_executable_extensions; do
8624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8625    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8627    break 2
8628  fi
8629done
8630  done
8631IFS=$as_save_IFS
8632
8633  ;;
8634esac
8635fi
8636NAWK=$ac_cv_path_NAWK
8637if test -n "$NAWK"; then
8638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8639$as_echo "$NAWK" >&6; }
8640else
8641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8642$as_echo "no" >&6; }
8643fi
8644
8645
8646  test -n "$NAWK" && break
8647done
8648
8649    else
8650      # If it succeeded, then it was overridden by the user. We will use it
8651      # for the tool.
8652
8653      # First remove it from the list of overridden variables, so we can test
8654      # for unknown variables in the end.
8655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8656
8657      # Check if the provided tool contains a complete path.
8658      tool_specified="$NAWK"
8659      tool_basename="${tool_specified##*/}"
8660      if test "x$tool_basename" = "x$tool_specified"; then
8661        # A command without a complete path is provided, search $PATH.
8662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8663$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8664        # Extract the first word of "$tool_basename", so it can be a program name with args.
8665set dummy $tool_basename; ac_word=$2
8666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8667$as_echo_n "checking for $ac_word... " >&6; }
8668if ${ac_cv_path_NAWK+:} false; then :
8669  $as_echo_n "(cached) " >&6
8670else
8671  case $NAWK in
8672  [\\/]* | ?:[\\/]*)
8673  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8674  ;;
8675  *)
8676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8677for as_dir in $PATH
8678do
8679  IFS=$as_save_IFS
8680  test -z "$as_dir" && as_dir=.
8681    for ac_exec_ext in '' $ac_executable_extensions; do
8682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8683    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8685    break 2
8686  fi
8687done
8688  done
8689IFS=$as_save_IFS
8690
8691  ;;
8692esac
8693fi
8694NAWK=$ac_cv_path_NAWK
8695if test -n "$NAWK"; then
8696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8697$as_echo "$NAWK" >&6; }
8698else
8699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8700$as_echo "no" >&6; }
8701fi
8702
8703
8704        if test "x$NAWK" = x; then
8705          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8706        fi
8707      else
8708        # Otherwise we believe it is a complete path. Use it as it is.
8709        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8710$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8712$as_echo_n "checking for NAWK... " >&6; }
8713        if test ! -x "$tool_specified"; then
8714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8715$as_echo "not found" >&6; }
8716          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8717        fi
8718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8719$as_echo "$tool_specified" >&6; }
8720      fi
8721    fi
8722  fi
8723
8724
8725
8726  if test "x$NAWK" = x; then
8727    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8728  fi
8729
8730
8731
8732
8733
8734  # Publish this variable in the help.
8735
8736
8737  if test "x$PRINTF" = x; then
8738    # The variable is not set by user, try to locate tool using the code snippet
8739    for ac_prog in printf
8740do
8741  # Extract the first word of "$ac_prog", so it can be a program name with args.
8742set dummy $ac_prog; ac_word=$2
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8744$as_echo_n "checking for $ac_word... " >&6; }
8745if ${ac_cv_path_PRINTF+:} false; then :
8746  $as_echo_n "(cached) " >&6
8747else
8748  case $PRINTF in
8749  [\\/]* | ?:[\\/]*)
8750  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8751  ;;
8752  *)
8753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8754for as_dir in $PATH
8755do
8756  IFS=$as_save_IFS
8757  test -z "$as_dir" && as_dir=.
8758    for ac_exec_ext in '' $ac_executable_extensions; do
8759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8760    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8762    break 2
8763  fi
8764done
8765  done
8766IFS=$as_save_IFS
8767
8768  ;;
8769esac
8770fi
8771PRINTF=$ac_cv_path_PRINTF
8772if test -n "$PRINTF"; then
8773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8774$as_echo "$PRINTF" >&6; }
8775else
8776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777$as_echo "no" >&6; }
8778fi
8779
8780
8781  test -n "$PRINTF" && break
8782done
8783
8784  else
8785    # The variable is set, but is it from the command line or the environment?
8786
8787    # Try to remove the string !PRINTF! from our list.
8788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8790      # If it failed, the variable was not from the command line. Ignore it,
8791      # but warn the user (except for BASH, which is always set by the calling BASH).
8792      if test "xPRINTF" != xBASH; then
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8794$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8795      fi
8796      # Try to locate tool using the code snippet
8797      for ac_prog in printf
8798do
8799  # Extract the first word of "$ac_prog", so it can be a program name with args.
8800set dummy $ac_prog; ac_word=$2
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802$as_echo_n "checking for $ac_word... " >&6; }
8803if ${ac_cv_path_PRINTF+:} false; then :
8804  $as_echo_n "(cached) " >&6
8805else
8806  case $PRINTF in
8807  [\\/]* | ?:[\\/]*)
8808  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8809  ;;
8810  *)
8811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8812for as_dir in $PATH
8813do
8814  IFS=$as_save_IFS
8815  test -z "$as_dir" && as_dir=.
8816    for ac_exec_ext in '' $ac_executable_extensions; do
8817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8818    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8820    break 2
8821  fi
8822done
8823  done
8824IFS=$as_save_IFS
8825
8826  ;;
8827esac
8828fi
8829PRINTF=$ac_cv_path_PRINTF
8830if test -n "$PRINTF"; then
8831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8832$as_echo "$PRINTF" >&6; }
8833else
8834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
8836fi
8837
8838
8839  test -n "$PRINTF" && break
8840done
8841
8842    else
8843      # If it succeeded, then it was overridden by the user. We will use it
8844      # for the tool.
8845
8846      # First remove it from the list of overridden variables, so we can test
8847      # for unknown variables in the end.
8848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8849
8850      # Check if the provided tool contains a complete path.
8851      tool_specified="$PRINTF"
8852      tool_basename="${tool_specified##*/}"
8853      if test "x$tool_basename" = "x$tool_specified"; then
8854        # A command without a complete path is provided, search $PATH.
8855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8856$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8857        # Extract the first word of "$tool_basename", so it can be a program name with args.
8858set dummy $tool_basename; ac_word=$2
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8860$as_echo_n "checking for $ac_word... " >&6; }
8861if ${ac_cv_path_PRINTF+:} false; then :
8862  $as_echo_n "(cached) " >&6
8863else
8864  case $PRINTF in
8865  [\\/]* | ?:[\\/]*)
8866  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8867  ;;
8868  *)
8869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870for as_dir in $PATH
8871do
8872  IFS=$as_save_IFS
8873  test -z "$as_dir" && as_dir=.
8874    for ac_exec_ext in '' $ac_executable_extensions; do
8875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8876    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8878    break 2
8879  fi
8880done
8881  done
8882IFS=$as_save_IFS
8883
8884  ;;
8885esac
8886fi
8887PRINTF=$ac_cv_path_PRINTF
8888if test -n "$PRINTF"; then
8889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8890$as_echo "$PRINTF" >&6; }
8891else
8892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8893$as_echo "no" >&6; }
8894fi
8895
8896
8897        if test "x$PRINTF" = x; then
8898          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8899        fi
8900      else
8901        # Otherwise we believe it is a complete path. Use it as it is.
8902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8903$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8905$as_echo_n "checking for PRINTF... " >&6; }
8906        if test ! -x "$tool_specified"; then
8907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8908$as_echo "not found" >&6; }
8909          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8910        fi
8911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8912$as_echo "$tool_specified" >&6; }
8913      fi
8914    fi
8915  fi
8916
8917
8918
8919  if test "x$PRINTF" = x; then
8920    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8921  fi
8922
8923
8924
8925
8926
8927  # Publish this variable in the help.
8928
8929
8930  if test "x$RM" = x; then
8931    # The variable is not set by user, try to locate tool using the code snippet
8932    for ac_prog in rm
8933do
8934  # Extract the first word of "$ac_prog", so it can be a program name with args.
8935set dummy $ac_prog; ac_word=$2
8936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8937$as_echo_n "checking for $ac_word... " >&6; }
8938if ${ac_cv_path_RM+:} false; then :
8939  $as_echo_n "(cached) " >&6
8940else
8941  case $RM in
8942  [\\/]* | ?:[\\/]*)
8943  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8944  ;;
8945  *)
8946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8947for as_dir in $PATH
8948do
8949  IFS=$as_save_IFS
8950  test -z "$as_dir" && as_dir=.
8951    for ac_exec_ext in '' $ac_executable_extensions; do
8952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8953    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8955    break 2
8956  fi
8957done
8958  done
8959IFS=$as_save_IFS
8960
8961  ;;
8962esac
8963fi
8964RM=$ac_cv_path_RM
8965if test -n "$RM"; then
8966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8967$as_echo "$RM" >&6; }
8968else
8969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8970$as_echo "no" >&6; }
8971fi
8972
8973
8974  test -n "$RM" && break
8975done
8976
8977  else
8978    # The variable is set, but is it from the command line or the environment?
8979
8980    # Try to remove the string !RM! from our list.
8981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8983      # If it failed, the variable was not from the command line. Ignore it,
8984      # but warn the user (except for BASH, which is always set by the calling BASH).
8985      if test "xRM" != xBASH; then
8986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8987$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8988      fi
8989      # Try to locate tool using the code snippet
8990      for ac_prog in rm
8991do
8992  # Extract the first word of "$ac_prog", so it can be a program name with args.
8993set dummy $ac_prog; ac_word=$2
8994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8995$as_echo_n "checking for $ac_word... " >&6; }
8996if ${ac_cv_path_RM+:} false; then :
8997  $as_echo_n "(cached) " >&6
8998else
8999  case $RM in
9000  [\\/]* | ?:[\\/]*)
9001  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9002  ;;
9003  *)
9004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9005for as_dir in $PATH
9006do
9007  IFS=$as_save_IFS
9008  test -z "$as_dir" && as_dir=.
9009    for ac_exec_ext in '' $ac_executable_extensions; do
9010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9011    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9013    break 2
9014  fi
9015done
9016  done
9017IFS=$as_save_IFS
9018
9019  ;;
9020esac
9021fi
9022RM=$ac_cv_path_RM
9023if test -n "$RM"; then
9024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9025$as_echo "$RM" >&6; }
9026else
9027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028$as_echo "no" >&6; }
9029fi
9030
9031
9032  test -n "$RM" && break
9033done
9034
9035    else
9036      # If it succeeded, then it was overridden by the user. We will use it
9037      # for the tool.
9038
9039      # First remove it from the list of overridden variables, so we can test
9040      # for unknown variables in the end.
9041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9042
9043      # Check if the provided tool contains a complete path.
9044      tool_specified="$RM"
9045      tool_basename="${tool_specified##*/}"
9046      if test "x$tool_basename" = "x$tool_specified"; then
9047        # A command without a complete path is provided, search $PATH.
9048        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9049$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9050        # Extract the first word of "$tool_basename", so it can be a program name with args.
9051set dummy $tool_basename; ac_word=$2
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9053$as_echo_n "checking for $ac_word... " >&6; }
9054if ${ac_cv_path_RM+:} false; then :
9055  $as_echo_n "(cached) " >&6
9056else
9057  case $RM in
9058  [\\/]* | ?:[\\/]*)
9059  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9060  ;;
9061  *)
9062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9063for as_dir in $PATH
9064do
9065  IFS=$as_save_IFS
9066  test -z "$as_dir" && as_dir=.
9067    for ac_exec_ext in '' $ac_executable_extensions; do
9068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9069    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9071    break 2
9072  fi
9073done
9074  done
9075IFS=$as_save_IFS
9076
9077  ;;
9078esac
9079fi
9080RM=$ac_cv_path_RM
9081if test -n "$RM"; then
9082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9083$as_echo "$RM" >&6; }
9084else
9085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9086$as_echo "no" >&6; }
9087fi
9088
9089
9090        if test "x$RM" = x; then
9091          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9092        fi
9093      else
9094        # Otherwise we believe it is a complete path. Use it as it is.
9095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9096$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9098$as_echo_n "checking for RM... " >&6; }
9099        if test ! -x "$tool_specified"; then
9100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9101$as_echo "not found" >&6; }
9102          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9103        fi
9104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9105$as_echo "$tool_specified" >&6; }
9106      fi
9107    fi
9108  fi
9109
9110
9111
9112  if test "x$RM" = x; then
9113    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9114  fi
9115
9116
9117
9118
9119
9120  # Publish this variable in the help.
9121
9122
9123  if test "x$SH" = x; then
9124    # The variable is not set by user, try to locate tool using the code snippet
9125    for ac_prog in sh
9126do
9127  # Extract the first word of "$ac_prog", so it can be a program name with args.
9128set dummy $ac_prog; ac_word=$2
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130$as_echo_n "checking for $ac_word... " >&6; }
9131if ${ac_cv_path_SH+:} false; then :
9132  $as_echo_n "(cached) " >&6
9133else
9134  case $SH in
9135  [\\/]* | ?:[\\/]*)
9136  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9137  ;;
9138  *)
9139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140for as_dir in $PATH
9141do
9142  IFS=$as_save_IFS
9143  test -z "$as_dir" && as_dir=.
9144    for ac_exec_ext in '' $ac_executable_extensions; do
9145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9146    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9148    break 2
9149  fi
9150done
9151  done
9152IFS=$as_save_IFS
9153
9154  ;;
9155esac
9156fi
9157SH=$ac_cv_path_SH
9158if test -n "$SH"; then
9159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9160$as_echo "$SH" >&6; }
9161else
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
9164fi
9165
9166
9167  test -n "$SH" && break
9168done
9169
9170  else
9171    # The variable is set, but is it from the command line or the environment?
9172
9173    # Try to remove the string !SH! from our list.
9174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9176      # If it failed, the variable was not from the command line. Ignore it,
9177      # but warn the user (except for BASH, which is always set by the calling BASH).
9178      if test "xSH" != xBASH; then
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9180$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9181      fi
9182      # Try to locate tool using the code snippet
9183      for ac_prog in sh
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if ${ac_cv_path_SH+:} false; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $SH in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215SH=$ac_cv_path_SH
9216if test -n "$SH"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9218$as_echo "$SH" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$SH" && break
9226done
9227
9228    else
9229      # If it succeeded, then it was overridden by the user. We will use it
9230      # for the tool.
9231
9232      # First remove it from the list of overridden variables, so we can test
9233      # for unknown variables in the end.
9234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9235
9236      # Check if the provided tool contains a complete path.
9237      tool_specified="$SH"
9238      tool_basename="${tool_specified##*/}"
9239      if test "x$tool_basename" = "x$tool_specified"; then
9240        # A command without a complete path is provided, search $PATH.
9241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9242$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9243        # Extract the first word of "$tool_basename", so it can be a program name with args.
9244set dummy $tool_basename; ac_word=$2
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9246$as_echo_n "checking for $ac_word... " >&6; }
9247if ${ac_cv_path_SH+:} false; then :
9248  $as_echo_n "(cached) " >&6
9249else
9250  case $SH in
9251  [\\/]* | ?:[\\/]*)
9252  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9253  ;;
9254  *)
9255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9256for as_dir in $PATH
9257do
9258  IFS=$as_save_IFS
9259  test -z "$as_dir" && as_dir=.
9260    for ac_exec_ext in '' $ac_executable_extensions; do
9261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9262    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9264    break 2
9265  fi
9266done
9267  done
9268IFS=$as_save_IFS
9269
9270  ;;
9271esac
9272fi
9273SH=$ac_cv_path_SH
9274if test -n "$SH"; then
9275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9276$as_echo "$SH" >&6; }
9277else
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
9280fi
9281
9282
9283        if test "x$SH" = x; then
9284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9285        fi
9286      else
9287        # Otherwise we believe it is a complete path. Use it as it is.
9288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9289$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9291$as_echo_n "checking for SH... " >&6; }
9292        if test ! -x "$tool_specified"; then
9293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9294$as_echo "not found" >&6; }
9295          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9296        fi
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9298$as_echo "$tool_specified" >&6; }
9299      fi
9300    fi
9301  fi
9302
9303
9304
9305  if test "x$SH" = x; then
9306    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9307  fi
9308
9309
9310
9311
9312
9313  # Publish this variable in the help.
9314
9315
9316  if test "x$SORT" = x; then
9317    # The variable is not set by user, try to locate tool using the code snippet
9318    for ac_prog in sort
9319do
9320  # Extract the first word of "$ac_prog", so it can be a program name with args.
9321set dummy $ac_prog; ac_word=$2
9322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9323$as_echo_n "checking for $ac_word... " >&6; }
9324if ${ac_cv_path_SORT+:} false; then :
9325  $as_echo_n "(cached) " >&6
9326else
9327  case $SORT in
9328  [\\/]* | ?:[\\/]*)
9329  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9330  ;;
9331  *)
9332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9333for as_dir in $PATH
9334do
9335  IFS=$as_save_IFS
9336  test -z "$as_dir" && as_dir=.
9337    for ac_exec_ext in '' $ac_executable_extensions; do
9338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9339    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9341    break 2
9342  fi
9343done
9344  done
9345IFS=$as_save_IFS
9346
9347  ;;
9348esac
9349fi
9350SORT=$ac_cv_path_SORT
9351if test -n "$SORT"; then
9352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9353$as_echo "$SORT" >&6; }
9354else
9355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9356$as_echo "no" >&6; }
9357fi
9358
9359
9360  test -n "$SORT" && break
9361done
9362
9363  else
9364    # The variable is set, but is it from the command line or the environment?
9365
9366    # Try to remove the string !SORT! from our list.
9367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9369      # If it failed, the variable was not from the command line. Ignore it,
9370      # but warn the user (except for BASH, which is always set by the calling BASH).
9371      if test "xSORT" != xBASH; then
9372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9373$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9374      fi
9375      # Try to locate tool using the code snippet
9376      for ac_prog in sort
9377do
9378  # Extract the first word of "$ac_prog", so it can be a program name with args.
9379set dummy $ac_prog; ac_word=$2
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9381$as_echo_n "checking for $ac_word... " >&6; }
9382if ${ac_cv_path_SORT+:} false; then :
9383  $as_echo_n "(cached) " >&6
9384else
9385  case $SORT in
9386  [\\/]* | ?:[\\/]*)
9387  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9388  ;;
9389  *)
9390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9391for as_dir in $PATH
9392do
9393  IFS=$as_save_IFS
9394  test -z "$as_dir" && as_dir=.
9395    for ac_exec_ext in '' $ac_executable_extensions; do
9396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9397    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9399    break 2
9400  fi
9401done
9402  done
9403IFS=$as_save_IFS
9404
9405  ;;
9406esac
9407fi
9408SORT=$ac_cv_path_SORT
9409if test -n "$SORT"; then
9410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9411$as_echo "$SORT" >&6; }
9412else
9413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414$as_echo "no" >&6; }
9415fi
9416
9417
9418  test -n "$SORT" && break
9419done
9420
9421    else
9422      # If it succeeded, then it was overridden by the user. We will use it
9423      # for the tool.
9424
9425      # First remove it from the list of overridden variables, so we can test
9426      # for unknown variables in the end.
9427      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9428
9429      # Check if the provided tool contains a complete path.
9430      tool_specified="$SORT"
9431      tool_basename="${tool_specified##*/}"
9432      if test "x$tool_basename" = "x$tool_specified"; then
9433        # A command without a complete path is provided, search $PATH.
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9435$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9436        # Extract the first word of "$tool_basename", so it can be a program name with args.
9437set dummy $tool_basename; ac_word=$2
9438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9439$as_echo_n "checking for $ac_word... " >&6; }
9440if ${ac_cv_path_SORT+:} false; then :
9441  $as_echo_n "(cached) " >&6
9442else
9443  case $SORT in
9444  [\\/]* | ?:[\\/]*)
9445  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9446  ;;
9447  *)
9448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9449for as_dir in $PATH
9450do
9451  IFS=$as_save_IFS
9452  test -z "$as_dir" && as_dir=.
9453    for ac_exec_ext in '' $ac_executable_extensions; do
9454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9455    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9457    break 2
9458  fi
9459done
9460  done
9461IFS=$as_save_IFS
9462
9463  ;;
9464esac
9465fi
9466SORT=$ac_cv_path_SORT
9467if test -n "$SORT"; then
9468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9469$as_echo "$SORT" >&6; }
9470else
9471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9472$as_echo "no" >&6; }
9473fi
9474
9475
9476        if test "x$SORT" = x; then
9477          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9478        fi
9479      else
9480        # Otherwise we believe it is a complete path. Use it as it is.
9481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9482$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9484$as_echo_n "checking for SORT... " >&6; }
9485        if test ! -x "$tool_specified"; then
9486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9487$as_echo "not found" >&6; }
9488          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9489        fi
9490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9491$as_echo "$tool_specified" >&6; }
9492      fi
9493    fi
9494  fi
9495
9496
9497
9498  if test "x$SORT" = x; then
9499    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9500  fi
9501
9502
9503
9504
9505
9506  # Publish this variable in the help.
9507
9508
9509  if test "x$TAIL" = x; then
9510    # The variable is not set by user, try to locate tool using the code snippet
9511    for ac_prog in tail
9512do
9513  # Extract the first word of "$ac_prog", so it can be a program name with args.
9514set dummy $ac_prog; ac_word=$2
9515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9516$as_echo_n "checking for $ac_word... " >&6; }
9517if ${ac_cv_path_TAIL+:} false; then :
9518  $as_echo_n "(cached) " >&6
9519else
9520  case $TAIL in
9521  [\\/]* | ?:[\\/]*)
9522  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9523  ;;
9524  *)
9525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9526for as_dir in $PATH
9527do
9528  IFS=$as_save_IFS
9529  test -z "$as_dir" && as_dir=.
9530    for ac_exec_ext in '' $ac_executable_extensions; do
9531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9532    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9534    break 2
9535  fi
9536done
9537  done
9538IFS=$as_save_IFS
9539
9540  ;;
9541esac
9542fi
9543TAIL=$ac_cv_path_TAIL
9544if test -n "$TAIL"; then
9545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9546$as_echo "$TAIL" >&6; }
9547else
9548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9549$as_echo "no" >&6; }
9550fi
9551
9552
9553  test -n "$TAIL" && break
9554done
9555
9556  else
9557    # The variable is set, but is it from the command line or the environment?
9558
9559    # Try to remove the string !TAIL! from our list.
9560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9562      # If it failed, the variable was not from the command line. Ignore it,
9563      # but warn the user (except for BASH, which is always set by the calling BASH).
9564      if test "xTAIL" != xBASH; then
9565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9566$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9567      fi
9568      # Try to locate tool using the code snippet
9569      for ac_prog in tail
9570do
9571  # Extract the first word of "$ac_prog", so it can be a program name with args.
9572set dummy $ac_prog; ac_word=$2
9573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9574$as_echo_n "checking for $ac_word... " >&6; }
9575if ${ac_cv_path_TAIL+:} false; then :
9576  $as_echo_n "(cached) " >&6
9577else
9578  case $TAIL in
9579  [\\/]* | ?:[\\/]*)
9580  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9581  ;;
9582  *)
9583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9584for as_dir in $PATH
9585do
9586  IFS=$as_save_IFS
9587  test -z "$as_dir" && as_dir=.
9588    for ac_exec_ext in '' $ac_executable_extensions; do
9589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9590    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9592    break 2
9593  fi
9594done
9595  done
9596IFS=$as_save_IFS
9597
9598  ;;
9599esac
9600fi
9601TAIL=$ac_cv_path_TAIL
9602if test -n "$TAIL"; then
9603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9604$as_echo "$TAIL" >&6; }
9605else
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607$as_echo "no" >&6; }
9608fi
9609
9610
9611  test -n "$TAIL" && break
9612done
9613
9614    else
9615      # If it succeeded, then it was overridden by the user. We will use it
9616      # for the tool.
9617
9618      # First remove it from the list of overridden variables, so we can test
9619      # for unknown variables in the end.
9620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9621
9622      # Check if the provided tool contains a complete path.
9623      tool_specified="$TAIL"
9624      tool_basename="${tool_specified##*/}"
9625      if test "x$tool_basename" = "x$tool_specified"; then
9626        # A command without a complete path is provided, search $PATH.
9627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9628$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9629        # Extract the first word of "$tool_basename", so it can be a program name with args.
9630set dummy $tool_basename; ac_word=$2
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632$as_echo_n "checking for $ac_word... " >&6; }
9633if ${ac_cv_path_TAIL+:} false; then :
9634  $as_echo_n "(cached) " >&6
9635else
9636  case $TAIL in
9637  [\\/]* | ?:[\\/]*)
9638  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9639  ;;
9640  *)
9641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642for as_dir in $PATH
9643do
9644  IFS=$as_save_IFS
9645  test -z "$as_dir" && as_dir=.
9646    for ac_exec_ext in '' $ac_executable_extensions; do
9647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9648    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9650    break 2
9651  fi
9652done
9653  done
9654IFS=$as_save_IFS
9655
9656  ;;
9657esac
9658fi
9659TAIL=$ac_cv_path_TAIL
9660if test -n "$TAIL"; then
9661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9662$as_echo "$TAIL" >&6; }
9663else
9664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
9666fi
9667
9668
9669        if test "x$TAIL" = x; then
9670          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9671        fi
9672      else
9673        # Otherwise we believe it is a complete path. Use it as it is.
9674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9675$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9677$as_echo_n "checking for TAIL... " >&6; }
9678        if test ! -x "$tool_specified"; then
9679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9680$as_echo "not found" >&6; }
9681          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9682        fi
9683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9684$as_echo "$tool_specified" >&6; }
9685      fi
9686    fi
9687  fi
9688
9689
9690
9691  if test "x$TAIL" = x; then
9692    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9693  fi
9694
9695
9696
9697
9698
9699  # Publish this variable in the help.
9700
9701
9702  if test "x$TAR" = x; then
9703    # The variable is not set by user, try to locate tool using the code snippet
9704    for ac_prog in tar
9705do
9706  # Extract the first word of "$ac_prog", so it can be a program name with args.
9707set dummy $ac_prog; ac_word=$2
9708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9709$as_echo_n "checking for $ac_word... " >&6; }
9710if ${ac_cv_path_TAR+:} false; then :
9711  $as_echo_n "(cached) " >&6
9712else
9713  case $TAR in
9714  [\\/]* | ?:[\\/]*)
9715  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9716  ;;
9717  *)
9718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9719for as_dir in $PATH
9720do
9721  IFS=$as_save_IFS
9722  test -z "$as_dir" && as_dir=.
9723    for ac_exec_ext in '' $ac_executable_extensions; do
9724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9725    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9727    break 2
9728  fi
9729done
9730  done
9731IFS=$as_save_IFS
9732
9733  ;;
9734esac
9735fi
9736TAR=$ac_cv_path_TAR
9737if test -n "$TAR"; then
9738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9739$as_echo "$TAR" >&6; }
9740else
9741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9742$as_echo "no" >&6; }
9743fi
9744
9745
9746  test -n "$TAR" && break
9747done
9748
9749  else
9750    # The variable is set, but is it from the command line or the environment?
9751
9752    # Try to remove the string !TAR! from our list.
9753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9755      # If it failed, the variable was not from the command line. Ignore it,
9756      # but warn the user (except for BASH, which is always set by the calling BASH).
9757      if test "xTAR" != xBASH; then
9758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9759$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9760      fi
9761      # Try to locate tool using the code snippet
9762      for ac_prog in tar
9763do
9764  # Extract the first word of "$ac_prog", so it can be a program name with args.
9765set dummy $ac_prog; ac_word=$2
9766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9767$as_echo_n "checking for $ac_word... " >&6; }
9768if ${ac_cv_path_TAR+:} false; then :
9769  $as_echo_n "(cached) " >&6
9770else
9771  case $TAR in
9772  [\\/]* | ?:[\\/]*)
9773  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9774  ;;
9775  *)
9776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9777for as_dir in $PATH
9778do
9779  IFS=$as_save_IFS
9780  test -z "$as_dir" && as_dir=.
9781    for ac_exec_ext in '' $ac_executable_extensions; do
9782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9783    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9785    break 2
9786  fi
9787done
9788  done
9789IFS=$as_save_IFS
9790
9791  ;;
9792esac
9793fi
9794TAR=$ac_cv_path_TAR
9795if test -n "$TAR"; then
9796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9797$as_echo "$TAR" >&6; }
9798else
9799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800$as_echo "no" >&6; }
9801fi
9802
9803
9804  test -n "$TAR" && break
9805done
9806
9807    else
9808      # If it succeeded, then it was overridden by the user. We will use it
9809      # for the tool.
9810
9811      # First remove it from the list of overridden variables, so we can test
9812      # for unknown variables in the end.
9813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9814
9815      # Check if the provided tool contains a complete path.
9816      tool_specified="$TAR"
9817      tool_basename="${tool_specified##*/}"
9818      if test "x$tool_basename" = "x$tool_specified"; then
9819        # A command without a complete path is provided, search $PATH.
9820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9821$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9822        # Extract the first word of "$tool_basename", so it can be a program name with args.
9823set dummy $tool_basename; ac_word=$2
9824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9825$as_echo_n "checking for $ac_word... " >&6; }
9826if ${ac_cv_path_TAR+:} false; then :
9827  $as_echo_n "(cached) " >&6
9828else
9829  case $TAR in
9830  [\\/]* | ?:[\\/]*)
9831  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9832  ;;
9833  *)
9834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9835for as_dir in $PATH
9836do
9837  IFS=$as_save_IFS
9838  test -z "$as_dir" && as_dir=.
9839    for ac_exec_ext in '' $ac_executable_extensions; do
9840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9841    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9843    break 2
9844  fi
9845done
9846  done
9847IFS=$as_save_IFS
9848
9849  ;;
9850esac
9851fi
9852TAR=$ac_cv_path_TAR
9853if test -n "$TAR"; then
9854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9855$as_echo "$TAR" >&6; }
9856else
9857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9858$as_echo "no" >&6; }
9859fi
9860
9861
9862        if test "x$TAR" = x; then
9863          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9864        fi
9865      else
9866        # Otherwise we believe it is a complete path. Use it as it is.
9867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9868$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9870$as_echo_n "checking for TAR... " >&6; }
9871        if test ! -x "$tool_specified"; then
9872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9873$as_echo "not found" >&6; }
9874          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9875        fi
9876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9877$as_echo "$tool_specified" >&6; }
9878      fi
9879    fi
9880  fi
9881
9882
9883
9884  if test "x$TAR" = x; then
9885    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9886  fi
9887
9888
9889
9890
9891
9892  # Publish this variable in the help.
9893
9894
9895  if test "x$TEE" = x; then
9896    # The variable is not set by user, try to locate tool using the code snippet
9897    for ac_prog in tee
9898do
9899  # Extract the first word of "$ac_prog", so it can be a program name with args.
9900set dummy $ac_prog; ac_word=$2
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902$as_echo_n "checking for $ac_word... " >&6; }
9903if ${ac_cv_path_TEE+:} false; then :
9904  $as_echo_n "(cached) " >&6
9905else
9906  case $TEE in
9907  [\\/]* | ?:[\\/]*)
9908  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9909  ;;
9910  *)
9911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912for as_dir in $PATH
9913do
9914  IFS=$as_save_IFS
9915  test -z "$as_dir" && as_dir=.
9916    for ac_exec_ext in '' $ac_executable_extensions; do
9917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9918    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9920    break 2
9921  fi
9922done
9923  done
9924IFS=$as_save_IFS
9925
9926  ;;
9927esac
9928fi
9929TEE=$ac_cv_path_TEE
9930if test -n "$TEE"; then
9931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9932$as_echo "$TEE" >&6; }
9933else
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935$as_echo "no" >&6; }
9936fi
9937
9938
9939  test -n "$TEE" && break
9940done
9941
9942  else
9943    # The variable is set, but is it from the command line or the environment?
9944
9945    # Try to remove the string !TEE! from our list.
9946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9948      # If it failed, the variable was not from the command line. Ignore it,
9949      # but warn the user (except for BASH, which is always set by the calling BASH).
9950      if test "xTEE" != xBASH; then
9951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9952$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9953      fi
9954      # Try to locate tool using the code snippet
9955      for ac_prog in tee
9956do
9957  # Extract the first word of "$ac_prog", so it can be a program name with args.
9958set dummy $ac_prog; ac_word=$2
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9960$as_echo_n "checking for $ac_word... " >&6; }
9961if ${ac_cv_path_TEE+:} false; then :
9962  $as_echo_n "(cached) " >&6
9963else
9964  case $TEE in
9965  [\\/]* | ?:[\\/]*)
9966  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9967  ;;
9968  *)
9969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9970for as_dir in $PATH
9971do
9972  IFS=$as_save_IFS
9973  test -z "$as_dir" && as_dir=.
9974    for ac_exec_ext in '' $ac_executable_extensions; do
9975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9976    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9978    break 2
9979  fi
9980done
9981  done
9982IFS=$as_save_IFS
9983
9984  ;;
9985esac
9986fi
9987TEE=$ac_cv_path_TEE
9988if test -n "$TEE"; then
9989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9990$as_echo "$TEE" >&6; }
9991else
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993$as_echo "no" >&6; }
9994fi
9995
9996
9997  test -n "$TEE" && break
9998done
9999
10000    else
10001      # If it succeeded, then it was overridden by the user. We will use it
10002      # for the tool.
10003
10004      # First remove it from the list of overridden variables, so we can test
10005      # for unknown variables in the end.
10006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10007
10008      # Check if the provided tool contains a complete path.
10009      tool_specified="$TEE"
10010      tool_basename="${tool_specified##*/}"
10011      if test "x$tool_basename" = "x$tool_specified"; then
10012        # A command without a complete path is provided, search $PATH.
10013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10014$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10015        # Extract the first word of "$tool_basename", so it can be a program name with args.
10016set dummy $tool_basename; ac_word=$2
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10018$as_echo_n "checking for $ac_word... " >&6; }
10019if ${ac_cv_path_TEE+:} false; then :
10020  $as_echo_n "(cached) " >&6
10021else
10022  case $TEE in
10023  [\\/]* | ?:[\\/]*)
10024  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10025  ;;
10026  *)
10027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10028for as_dir in $PATH
10029do
10030  IFS=$as_save_IFS
10031  test -z "$as_dir" && as_dir=.
10032    for ac_exec_ext in '' $ac_executable_extensions; do
10033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10034    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10036    break 2
10037  fi
10038done
10039  done
10040IFS=$as_save_IFS
10041
10042  ;;
10043esac
10044fi
10045TEE=$ac_cv_path_TEE
10046if test -n "$TEE"; then
10047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10048$as_echo "$TEE" >&6; }
10049else
10050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10051$as_echo "no" >&6; }
10052fi
10053
10054
10055        if test "x$TEE" = x; then
10056          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10057        fi
10058      else
10059        # Otherwise we believe it is a complete path. Use it as it is.
10060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10061$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10063$as_echo_n "checking for TEE... " >&6; }
10064        if test ! -x "$tool_specified"; then
10065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10066$as_echo "not found" >&6; }
10067          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10068        fi
10069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10070$as_echo "$tool_specified" >&6; }
10071      fi
10072    fi
10073  fi
10074
10075
10076
10077  if test "x$TEE" = x; then
10078    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10079  fi
10080
10081
10082
10083
10084
10085  # Publish this variable in the help.
10086
10087
10088  if test "x$TOUCH" = x; then
10089    # The variable is not set by user, try to locate tool using the code snippet
10090    for ac_prog in touch
10091do
10092  # Extract the first word of "$ac_prog", so it can be a program name with args.
10093set dummy $ac_prog; ac_word=$2
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10095$as_echo_n "checking for $ac_word... " >&6; }
10096if ${ac_cv_path_TOUCH+:} false; then :
10097  $as_echo_n "(cached) " >&6
10098else
10099  case $TOUCH in
10100  [\\/]* | ?:[\\/]*)
10101  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10102  ;;
10103  *)
10104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10105for as_dir in $PATH
10106do
10107  IFS=$as_save_IFS
10108  test -z "$as_dir" && as_dir=.
10109    for ac_exec_ext in '' $ac_executable_extensions; do
10110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10111    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10113    break 2
10114  fi
10115done
10116  done
10117IFS=$as_save_IFS
10118
10119  ;;
10120esac
10121fi
10122TOUCH=$ac_cv_path_TOUCH
10123if test -n "$TOUCH"; then
10124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10125$as_echo "$TOUCH" >&6; }
10126else
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10128$as_echo "no" >&6; }
10129fi
10130
10131
10132  test -n "$TOUCH" && break
10133done
10134
10135  else
10136    # The variable is set, but is it from the command line or the environment?
10137
10138    # Try to remove the string !TOUCH! from our list.
10139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10141      # If it failed, the variable was not from the command line. Ignore it,
10142      # but warn the user (except for BASH, which is always set by the calling BASH).
10143      if test "xTOUCH" != xBASH; then
10144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10145$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10146      fi
10147      # Try to locate tool using the code snippet
10148      for ac_prog in touch
10149do
10150  # Extract the first word of "$ac_prog", so it can be a program name with args.
10151set dummy $ac_prog; ac_word=$2
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if ${ac_cv_path_TOUCH+:} false; then :
10155  $as_echo_n "(cached) " >&6
10156else
10157  case $TOUCH in
10158  [\\/]* | ?:[\\/]*)
10159  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10160  ;;
10161  *)
10162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  test -z "$as_dir" && as_dir=.
10167    for ac_exec_ext in '' $ac_executable_extensions; do
10168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10169    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10171    break 2
10172  fi
10173done
10174  done
10175IFS=$as_save_IFS
10176
10177  ;;
10178esac
10179fi
10180TOUCH=$ac_cv_path_TOUCH
10181if test -n "$TOUCH"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10183$as_echo "$TOUCH" >&6; }
10184else
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190  test -n "$TOUCH" && break
10191done
10192
10193    else
10194      # If it succeeded, then it was overridden by the user. We will use it
10195      # for the tool.
10196
10197      # First remove it from the list of overridden variables, so we can test
10198      # for unknown variables in the end.
10199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10200
10201      # Check if the provided tool contains a complete path.
10202      tool_specified="$TOUCH"
10203      tool_basename="${tool_specified##*/}"
10204      if test "x$tool_basename" = "x$tool_specified"; then
10205        # A command without a complete path is provided, search $PATH.
10206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10207$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10208        # Extract the first word of "$tool_basename", so it can be a program name with args.
10209set dummy $tool_basename; ac_word=$2
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211$as_echo_n "checking for $ac_word... " >&6; }
10212if ${ac_cv_path_TOUCH+:} false; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  case $TOUCH in
10216  [\\/]* | ?:[\\/]*)
10217  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10218  ;;
10219  *)
10220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221for as_dir in $PATH
10222do
10223  IFS=$as_save_IFS
10224  test -z "$as_dir" && as_dir=.
10225    for ac_exec_ext in '' $ac_executable_extensions; do
10226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10227    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229    break 2
10230  fi
10231done
10232  done
10233IFS=$as_save_IFS
10234
10235  ;;
10236esac
10237fi
10238TOUCH=$ac_cv_path_TOUCH
10239if test -n "$TOUCH"; then
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10241$as_echo "$TOUCH" >&6; }
10242else
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245fi
10246
10247
10248        if test "x$TOUCH" = x; then
10249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10250        fi
10251      else
10252        # Otherwise we believe it is a complete path. Use it as it is.
10253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10254$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10256$as_echo_n "checking for TOUCH... " >&6; }
10257        if test ! -x "$tool_specified"; then
10258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10259$as_echo "not found" >&6; }
10260          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10261        fi
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10263$as_echo "$tool_specified" >&6; }
10264      fi
10265    fi
10266  fi
10267
10268
10269
10270  if test "x$TOUCH" = x; then
10271    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10272  fi
10273
10274
10275
10276
10277
10278  # Publish this variable in the help.
10279
10280
10281  if test "x$TR" = x; then
10282    # The variable is not set by user, try to locate tool using the code snippet
10283    for ac_prog in tr
10284do
10285  # Extract the first word of "$ac_prog", so it can be a program name with args.
10286set dummy $ac_prog; ac_word=$2
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10288$as_echo_n "checking for $ac_word... " >&6; }
10289if ${ac_cv_path_TR+:} false; then :
10290  $as_echo_n "(cached) " >&6
10291else
10292  case $TR in
10293  [\\/]* | ?:[\\/]*)
10294  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10295  ;;
10296  *)
10297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10298for as_dir in $PATH
10299do
10300  IFS=$as_save_IFS
10301  test -z "$as_dir" && as_dir=.
10302    for ac_exec_ext in '' $ac_executable_extensions; do
10303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10304    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10306    break 2
10307  fi
10308done
10309  done
10310IFS=$as_save_IFS
10311
10312  ;;
10313esac
10314fi
10315TR=$ac_cv_path_TR
10316if test -n "$TR"; then
10317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10318$as_echo "$TR" >&6; }
10319else
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
10322fi
10323
10324
10325  test -n "$TR" && break
10326done
10327
10328  else
10329    # The variable is set, but is it from the command line or the environment?
10330
10331    # Try to remove the string !TR! from our list.
10332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10334      # If it failed, the variable was not from the command line. Ignore it,
10335      # but warn the user (except for BASH, which is always set by the calling BASH).
10336      if test "xTR" != xBASH; then
10337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10338$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10339      fi
10340      # Try to locate tool using the code snippet
10341      for ac_prog in tr
10342do
10343  # Extract the first word of "$ac_prog", so it can be a program name with args.
10344set dummy $ac_prog; ac_word=$2
10345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10346$as_echo_n "checking for $ac_word... " >&6; }
10347if ${ac_cv_path_TR+:} false; then :
10348  $as_echo_n "(cached) " >&6
10349else
10350  case $TR in
10351  [\\/]* | ?:[\\/]*)
10352  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10353  ;;
10354  *)
10355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10356for as_dir in $PATH
10357do
10358  IFS=$as_save_IFS
10359  test -z "$as_dir" && as_dir=.
10360    for ac_exec_ext in '' $ac_executable_extensions; do
10361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10362    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10364    break 2
10365  fi
10366done
10367  done
10368IFS=$as_save_IFS
10369
10370  ;;
10371esac
10372fi
10373TR=$ac_cv_path_TR
10374if test -n "$TR"; then
10375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10376$as_echo "$TR" >&6; }
10377else
10378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10379$as_echo "no" >&6; }
10380fi
10381
10382
10383  test -n "$TR" && break
10384done
10385
10386    else
10387      # If it succeeded, then it was overridden by the user. We will use it
10388      # for the tool.
10389
10390      # First remove it from the list of overridden variables, so we can test
10391      # for unknown variables in the end.
10392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10393
10394      # Check if the provided tool contains a complete path.
10395      tool_specified="$TR"
10396      tool_basename="${tool_specified##*/}"
10397      if test "x$tool_basename" = "x$tool_specified"; then
10398        # A command without a complete path is provided, search $PATH.
10399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10400$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10401        # Extract the first word of "$tool_basename", so it can be a program name with args.
10402set dummy $tool_basename; ac_word=$2
10403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10404$as_echo_n "checking for $ac_word... " >&6; }
10405if ${ac_cv_path_TR+:} false; then :
10406  $as_echo_n "(cached) " >&6
10407else
10408  case $TR in
10409  [\\/]* | ?:[\\/]*)
10410  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10411  ;;
10412  *)
10413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10414for as_dir in $PATH
10415do
10416  IFS=$as_save_IFS
10417  test -z "$as_dir" && as_dir=.
10418    for ac_exec_ext in '' $ac_executable_extensions; do
10419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10420    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10422    break 2
10423  fi
10424done
10425  done
10426IFS=$as_save_IFS
10427
10428  ;;
10429esac
10430fi
10431TR=$ac_cv_path_TR
10432if test -n "$TR"; then
10433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10434$as_echo "$TR" >&6; }
10435else
10436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
10438fi
10439
10440
10441        if test "x$TR" = x; then
10442          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10443        fi
10444      else
10445        # Otherwise we believe it is a complete path. Use it as it is.
10446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10447$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10449$as_echo_n "checking for TR... " >&6; }
10450        if test ! -x "$tool_specified"; then
10451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10452$as_echo "not found" >&6; }
10453          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10454        fi
10455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10456$as_echo "$tool_specified" >&6; }
10457      fi
10458    fi
10459  fi
10460
10461
10462
10463  if test "x$TR" = x; then
10464    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10465  fi
10466
10467
10468
10469
10470
10471  # Publish this variable in the help.
10472
10473
10474  if test "x$UNAME" = x; then
10475    # The variable is not set by user, try to locate tool using the code snippet
10476    for ac_prog in uname
10477do
10478  # Extract the first word of "$ac_prog", so it can be a program name with args.
10479set dummy $ac_prog; ac_word=$2
10480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10481$as_echo_n "checking for $ac_word... " >&6; }
10482if ${ac_cv_path_UNAME+:} false; then :
10483  $as_echo_n "(cached) " >&6
10484else
10485  case $UNAME in
10486  [\\/]* | ?:[\\/]*)
10487  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10488  ;;
10489  *)
10490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10491for as_dir in $PATH
10492do
10493  IFS=$as_save_IFS
10494  test -z "$as_dir" && as_dir=.
10495    for ac_exec_ext in '' $ac_executable_extensions; do
10496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10497    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10499    break 2
10500  fi
10501done
10502  done
10503IFS=$as_save_IFS
10504
10505  ;;
10506esac
10507fi
10508UNAME=$ac_cv_path_UNAME
10509if test -n "$UNAME"; then
10510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10511$as_echo "$UNAME" >&6; }
10512else
10513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10514$as_echo "no" >&6; }
10515fi
10516
10517
10518  test -n "$UNAME" && break
10519done
10520
10521  else
10522    # The variable is set, but is it from the command line or the environment?
10523
10524    # Try to remove the string !UNAME! from our list.
10525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10527      # If it failed, the variable was not from the command line. Ignore it,
10528      # but warn the user (except for BASH, which is always set by the calling BASH).
10529      if test "xUNAME" != xBASH; then
10530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10531$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10532      fi
10533      # Try to locate tool using the code snippet
10534      for ac_prog in uname
10535do
10536  # Extract the first word of "$ac_prog", so it can be a program name with args.
10537set dummy $ac_prog; ac_word=$2
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10539$as_echo_n "checking for $ac_word... " >&6; }
10540if ${ac_cv_path_UNAME+:} false; then :
10541  $as_echo_n "(cached) " >&6
10542else
10543  case $UNAME in
10544  [\\/]* | ?:[\\/]*)
10545  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10546  ;;
10547  *)
10548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10549for as_dir in $PATH
10550do
10551  IFS=$as_save_IFS
10552  test -z "$as_dir" && as_dir=.
10553    for ac_exec_ext in '' $ac_executable_extensions; do
10554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10555    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10557    break 2
10558  fi
10559done
10560  done
10561IFS=$as_save_IFS
10562
10563  ;;
10564esac
10565fi
10566UNAME=$ac_cv_path_UNAME
10567if test -n "$UNAME"; then
10568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10569$as_echo "$UNAME" >&6; }
10570else
10571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
10573fi
10574
10575
10576  test -n "$UNAME" && break
10577done
10578
10579    else
10580      # If it succeeded, then it was overridden by the user. We will use it
10581      # for the tool.
10582
10583      # First remove it from the list of overridden variables, so we can test
10584      # for unknown variables in the end.
10585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10586
10587      # Check if the provided tool contains a complete path.
10588      tool_specified="$UNAME"
10589      tool_basename="${tool_specified##*/}"
10590      if test "x$tool_basename" = "x$tool_specified"; then
10591        # A command without a complete path is provided, search $PATH.
10592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10593$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10594        # Extract the first word of "$tool_basename", so it can be a program name with args.
10595set dummy $tool_basename; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_UNAME+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $UNAME in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624UNAME=$ac_cv_path_UNAME
10625if test -n "$UNAME"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10627$as_echo "$UNAME" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634        if test "x$UNAME" = x; then
10635          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10636        fi
10637      else
10638        # Otherwise we believe it is a complete path. Use it as it is.
10639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10640$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10642$as_echo_n "checking for UNAME... " >&6; }
10643        if test ! -x "$tool_specified"; then
10644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10645$as_echo "not found" >&6; }
10646          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10647        fi
10648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10649$as_echo "$tool_specified" >&6; }
10650      fi
10651    fi
10652  fi
10653
10654
10655
10656  if test "x$UNAME" = x; then
10657    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10658  fi
10659
10660
10661
10662
10663
10664  # Publish this variable in the help.
10665
10666
10667  if test "x$UNIQ" = x; then
10668    # The variable is not set by user, try to locate tool using the code snippet
10669    for ac_prog in uniq
10670do
10671  # Extract the first word of "$ac_prog", so it can be a program name with args.
10672set dummy $ac_prog; ac_word=$2
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10674$as_echo_n "checking for $ac_word... " >&6; }
10675if ${ac_cv_path_UNIQ+:} false; then :
10676  $as_echo_n "(cached) " >&6
10677else
10678  case $UNIQ in
10679  [\\/]* | ?:[\\/]*)
10680  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10681  ;;
10682  *)
10683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10684for as_dir in $PATH
10685do
10686  IFS=$as_save_IFS
10687  test -z "$as_dir" && as_dir=.
10688    for ac_exec_ext in '' $ac_executable_extensions; do
10689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10690    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10692    break 2
10693  fi
10694done
10695  done
10696IFS=$as_save_IFS
10697
10698  ;;
10699esac
10700fi
10701UNIQ=$ac_cv_path_UNIQ
10702if test -n "$UNIQ"; then
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10704$as_echo "$UNIQ" >&6; }
10705else
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
10708fi
10709
10710
10711  test -n "$UNIQ" && break
10712done
10713
10714  else
10715    # The variable is set, but is it from the command line or the environment?
10716
10717    # Try to remove the string !UNIQ! from our list.
10718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10720      # If it failed, the variable was not from the command line. Ignore it,
10721      # but warn the user (except for BASH, which is always set by the calling BASH).
10722      if test "xUNIQ" != xBASH; then
10723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10724$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10725      fi
10726      # Try to locate tool using the code snippet
10727      for ac_prog in uniq
10728do
10729  # Extract the first word of "$ac_prog", so it can be a program name with args.
10730set dummy $ac_prog; ac_word=$2
10731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10732$as_echo_n "checking for $ac_word... " >&6; }
10733if ${ac_cv_path_UNIQ+:} false; then :
10734  $as_echo_n "(cached) " >&6
10735else
10736  case $UNIQ in
10737  [\\/]* | ?:[\\/]*)
10738  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10739  ;;
10740  *)
10741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10742for as_dir in $PATH
10743do
10744  IFS=$as_save_IFS
10745  test -z "$as_dir" && as_dir=.
10746    for ac_exec_ext in '' $ac_executable_extensions; do
10747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10748    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10750    break 2
10751  fi
10752done
10753  done
10754IFS=$as_save_IFS
10755
10756  ;;
10757esac
10758fi
10759UNIQ=$ac_cv_path_UNIQ
10760if test -n "$UNIQ"; then
10761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10762$as_echo "$UNIQ" >&6; }
10763else
10764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10765$as_echo "no" >&6; }
10766fi
10767
10768
10769  test -n "$UNIQ" && break
10770done
10771
10772    else
10773      # If it succeeded, then it was overridden by the user. We will use it
10774      # for the tool.
10775
10776      # First remove it from the list of overridden variables, so we can test
10777      # for unknown variables in the end.
10778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10779
10780      # Check if the provided tool contains a complete path.
10781      tool_specified="$UNIQ"
10782      tool_basename="${tool_specified##*/}"
10783      if test "x$tool_basename" = "x$tool_specified"; then
10784        # A command without a complete path is provided, search $PATH.
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10786$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10787        # Extract the first word of "$tool_basename", so it can be a program name with args.
10788set dummy $tool_basename; ac_word=$2
10789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10790$as_echo_n "checking for $ac_word... " >&6; }
10791if ${ac_cv_path_UNIQ+:} false; then :
10792  $as_echo_n "(cached) " >&6
10793else
10794  case $UNIQ in
10795  [\\/]* | ?:[\\/]*)
10796  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10797  ;;
10798  *)
10799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10800for as_dir in $PATH
10801do
10802  IFS=$as_save_IFS
10803  test -z "$as_dir" && as_dir=.
10804    for ac_exec_ext in '' $ac_executable_extensions; do
10805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10806    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10808    break 2
10809  fi
10810done
10811  done
10812IFS=$as_save_IFS
10813
10814  ;;
10815esac
10816fi
10817UNIQ=$ac_cv_path_UNIQ
10818if test -n "$UNIQ"; then
10819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10820$as_echo "$UNIQ" >&6; }
10821else
10822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10823$as_echo "no" >&6; }
10824fi
10825
10826
10827        if test "x$UNIQ" = x; then
10828          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10829        fi
10830      else
10831        # Otherwise we believe it is a complete path. Use it as it is.
10832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10833$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10835$as_echo_n "checking for UNIQ... " >&6; }
10836        if test ! -x "$tool_specified"; then
10837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10838$as_echo "not found" >&6; }
10839          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10840        fi
10841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10842$as_echo "$tool_specified" >&6; }
10843      fi
10844    fi
10845  fi
10846
10847
10848
10849  if test "x$UNIQ" = x; then
10850    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10851  fi
10852
10853
10854
10855
10856
10857  # Publish this variable in the help.
10858
10859
10860  if test "x$WC" = x; then
10861    # The variable is not set by user, try to locate tool using the code snippet
10862    for ac_prog in wc
10863do
10864  # Extract the first word of "$ac_prog", so it can be a program name with args.
10865set dummy $ac_prog; ac_word=$2
10866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10867$as_echo_n "checking for $ac_word... " >&6; }
10868if ${ac_cv_path_WC+:} false; then :
10869  $as_echo_n "(cached) " >&6
10870else
10871  case $WC in
10872  [\\/]* | ?:[\\/]*)
10873  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10874  ;;
10875  *)
10876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10877for as_dir in $PATH
10878do
10879  IFS=$as_save_IFS
10880  test -z "$as_dir" && as_dir=.
10881    for ac_exec_ext in '' $ac_executable_extensions; do
10882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10883    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10885    break 2
10886  fi
10887done
10888  done
10889IFS=$as_save_IFS
10890
10891  ;;
10892esac
10893fi
10894WC=$ac_cv_path_WC
10895if test -n "$WC"; then
10896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10897$as_echo "$WC" >&6; }
10898else
10899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10900$as_echo "no" >&6; }
10901fi
10902
10903
10904  test -n "$WC" && break
10905done
10906
10907  else
10908    # The variable is set, but is it from the command line or the environment?
10909
10910    # Try to remove the string !WC! from our list.
10911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10913      # If it failed, the variable was not from the command line. Ignore it,
10914      # but warn the user (except for BASH, which is always set by the calling BASH).
10915      if test "xWC" != xBASH; then
10916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10917$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10918      fi
10919      # Try to locate tool using the code snippet
10920      for ac_prog in wc
10921do
10922  # Extract the first word of "$ac_prog", so it can be a program name with args.
10923set dummy $ac_prog; ac_word=$2
10924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10925$as_echo_n "checking for $ac_word... " >&6; }
10926if ${ac_cv_path_WC+:} false; then :
10927  $as_echo_n "(cached) " >&6
10928else
10929  case $WC in
10930  [\\/]* | ?:[\\/]*)
10931  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10932  ;;
10933  *)
10934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10935for as_dir in $PATH
10936do
10937  IFS=$as_save_IFS
10938  test -z "$as_dir" && as_dir=.
10939    for ac_exec_ext in '' $ac_executable_extensions; do
10940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10941    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10943    break 2
10944  fi
10945done
10946  done
10947IFS=$as_save_IFS
10948
10949  ;;
10950esac
10951fi
10952WC=$ac_cv_path_WC
10953if test -n "$WC"; then
10954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10955$as_echo "$WC" >&6; }
10956else
10957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10958$as_echo "no" >&6; }
10959fi
10960
10961
10962  test -n "$WC" && break
10963done
10964
10965    else
10966      # If it succeeded, then it was overridden by the user. We will use it
10967      # for the tool.
10968
10969      # First remove it from the list of overridden variables, so we can test
10970      # for unknown variables in the end.
10971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10972
10973      # Check if the provided tool contains a complete path.
10974      tool_specified="$WC"
10975      tool_basename="${tool_specified##*/}"
10976      if test "x$tool_basename" = "x$tool_specified"; then
10977        # A command without a complete path is provided, search $PATH.
10978        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10979$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10980        # Extract the first word of "$tool_basename", so it can be a program name with args.
10981set dummy $tool_basename; ac_word=$2
10982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10983$as_echo_n "checking for $ac_word... " >&6; }
10984if ${ac_cv_path_WC+:} false; then :
10985  $as_echo_n "(cached) " >&6
10986else
10987  case $WC in
10988  [\\/]* | ?:[\\/]*)
10989  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10990  ;;
10991  *)
10992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10993for as_dir in $PATH
10994do
10995  IFS=$as_save_IFS
10996  test -z "$as_dir" && as_dir=.
10997    for ac_exec_ext in '' $ac_executable_extensions; do
10998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10999    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11001    break 2
11002  fi
11003done
11004  done
11005IFS=$as_save_IFS
11006
11007  ;;
11008esac
11009fi
11010WC=$ac_cv_path_WC
11011if test -n "$WC"; then
11012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11013$as_echo "$WC" >&6; }
11014else
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016$as_echo "no" >&6; }
11017fi
11018
11019
11020        if test "x$WC" = x; then
11021          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11022        fi
11023      else
11024        # Otherwise we believe it is a complete path. Use it as it is.
11025        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11026$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11028$as_echo_n "checking for WC... " >&6; }
11029        if test ! -x "$tool_specified"; then
11030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11031$as_echo "not found" >&6; }
11032          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11033        fi
11034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11035$as_echo "$tool_specified" >&6; }
11036      fi
11037    fi
11038  fi
11039
11040
11041
11042  if test "x$WC" = x; then
11043    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11044  fi
11045
11046
11047
11048
11049
11050  # Publish this variable in the help.
11051
11052
11053  if test "x$WHICH" = x; then
11054    # The variable is not set by user, try to locate tool using the code snippet
11055    for ac_prog in which
11056do
11057  # Extract the first word of "$ac_prog", so it can be a program name with args.
11058set dummy $ac_prog; ac_word=$2
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11060$as_echo_n "checking for $ac_word... " >&6; }
11061if ${ac_cv_path_WHICH+:} false; then :
11062  $as_echo_n "(cached) " >&6
11063else
11064  case $WHICH in
11065  [\\/]* | ?:[\\/]*)
11066  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11067  ;;
11068  *)
11069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11070for as_dir in $PATH
11071do
11072  IFS=$as_save_IFS
11073  test -z "$as_dir" && as_dir=.
11074    for ac_exec_ext in '' $ac_executable_extensions; do
11075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11076    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11078    break 2
11079  fi
11080done
11081  done
11082IFS=$as_save_IFS
11083
11084  ;;
11085esac
11086fi
11087WHICH=$ac_cv_path_WHICH
11088if test -n "$WHICH"; then
11089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11090$as_echo "$WHICH" >&6; }
11091else
11092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11093$as_echo "no" >&6; }
11094fi
11095
11096
11097  test -n "$WHICH" && break
11098done
11099
11100  else
11101    # The variable is set, but is it from the command line or the environment?
11102
11103    # Try to remove the string !WHICH! from our list.
11104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11106      # If it failed, the variable was not from the command line. Ignore it,
11107      # but warn the user (except for BASH, which is always set by the calling BASH).
11108      if test "xWHICH" != xBASH; then
11109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11110$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11111      fi
11112      # Try to locate tool using the code snippet
11113      for ac_prog in which
11114do
11115  # Extract the first word of "$ac_prog", so it can be a program name with args.
11116set dummy $ac_prog; ac_word=$2
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11118$as_echo_n "checking for $ac_word... " >&6; }
11119if ${ac_cv_path_WHICH+:} false; then :
11120  $as_echo_n "(cached) " >&6
11121else
11122  case $WHICH in
11123  [\\/]* | ?:[\\/]*)
11124  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11125  ;;
11126  *)
11127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11128for as_dir in $PATH
11129do
11130  IFS=$as_save_IFS
11131  test -z "$as_dir" && as_dir=.
11132    for ac_exec_ext in '' $ac_executable_extensions; do
11133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11134    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11136    break 2
11137  fi
11138done
11139  done
11140IFS=$as_save_IFS
11141
11142  ;;
11143esac
11144fi
11145WHICH=$ac_cv_path_WHICH
11146if test -n "$WHICH"; then
11147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11148$as_echo "$WHICH" >&6; }
11149else
11150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
11152fi
11153
11154
11155  test -n "$WHICH" && break
11156done
11157
11158    else
11159      # If it succeeded, then it was overridden by the user. We will use it
11160      # for the tool.
11161
11162      # First remove it from the list of overridden variables, so we can test
11163      # for unknown variables in the end.
11164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11165
11166      # Check if the provided tool contains a complete path.
11167      tool_specified="$WHICH"
11168      tool_basename="${tool_specified##*/}"
11169      if test "x$tool_basename" = "x$tool_specified"; then
11170        # A command without a complete path is provided, search $PATH.
11171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11172$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11173        # Extract the first word of "$tool_basename", so it can be a program name with args.
11174set dummy $tool_basename; ac_word=$2
11175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11176$as_echo_n "checking for $ac_word... " >&6; }
11177if ${ac_cv_path_WHICH+:} false; then :
11178  $as_echo_n "(cached) " >&6
11179else
11180  case $WHICH in
11181  [\\/]* | ?:[\\/]*)
11182  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11183  ;;
11184  *)
11185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11186for as_dir in $PATH
11187do
11188  IFS=$as_save_IFS
11189  test -z "$as_dir" && as_dir=.
11190    for ac_exec_ext in '' $ac_executable_extensions; do
11191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11192    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11194    break 2
11195  fi
11196done
11197  done
11198IFS=$as_save_IFS
11199
11200  ;;
11201esac
11202fi
11203WHICH=$ac_cv_path_WHICH
11204if test -n "$WHICH"; then
11205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11206$as_echo "$WHICH" >&6; }
11207else
11208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11209$as_echo "no" >&6; }
11210fi
11211
11212
11213        if test "x$WHICH" = x; then
11214          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11215        fi
11216      else
11217        # Otherwise we believe it is a complete path. Use it as it is.
11218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11219$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11221$as_echo_n "checking for WHICH... " >&6; }
11222        if test ! -x "$tool_specified"; then
11223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11224$as_echo "not found" >&6; }
11225          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11226        fi
11227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11228$as_echo "$tool_specified" >&6; }
11229      fi
11230    fi
11231  fi
11232
11233
11234
11235  if test "x$WHICH" = x; then
11236    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11237  fi
11238
11239
11240
11241
11242
11243  # Publish this variable in the help.
11244
11245
11246  if test "x$XARGS" = x; then
11247    # The variable is not set by user, try to locate tool using the code snippet
11248    for ac_prog in xargs
11249do
11250  # Extract the first word of "$ac_prog", so it can be a program name with args.
11251set dummy $ac_prog; ac_word=$2
11252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11253$as_echo_n "checking for $ac_word... " >&6; }
11254if ${ac_cv_path_XARGS+:} false; then :
11255  $as_echo_n "(cached) " >&6
11256else
11257  case $XARGS in
11258  [\\/]* | ?:[\\/]*)
11259  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11260  ;;
11261  *)
11262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11263for as_dir in $PATH
11264do
11265  IFS=$as_save_IFS
11266  test -z "$as_dir" && as_dir=.
11267    for ac_exec_ext in '' $ac_executable_extensions; do
11268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11269    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11271    break 2
11272  fi
11273done
11274  done
11275IFS=$as_save_IFS
11276
11277  ;;
11278esac
11279fi
11280XARGS=$ac_cv_path_XARGS
11281if test -n "$XARGS"; then
11282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11283$as_echo "$XARGS" >&6; }
11284else
11285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
11287fi
11288
11289
11290  test -n "$XARGS" && break
11291done
11292
11293  else
11294    # The variable is set, but is it from the command line or the environment?
11295
11296    # Try to remove the string !XARGS! from our list.
11297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11299      # If it failed, the variable was not from the command line. Ignore it,
11300      # but warn the user (except for BASH, which is always set by the calling BASH).
11301      if test "xXARGS" != xBASH; then
11302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11303$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11304      fi
11305      # Try to locate tool using the code snippet
11306      for ac_prog in xargs
11307do
11308  # Extract the first word of "$ac_prog", so it can be a program name with args.
11309set dummy $ac_prog; ac_word=$2
11310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11311$as_echo_n "checking for $ac_word... " >&6; }
11312if ${ac_cv_path_XARGS+:} false; then :
11313  $as_echo_n "(cached) " >&6
11314else
11315  case $XARGS in
11316  [\\/]* | ?:[\\/]*)
11317  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11318  ;;
11319  *)
11320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11321for as_dir in $PATH
11322do
11323  IFS=$as_save_IFS
11324  test -z "$as_dir" && as_dir=.
11325    for ac_exec_ext in '' $ac_executable_extensions; do
11326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11327    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11329    break 2
11330  fi
11331done
11332  done
11333IFS=$as_save_IFS
11334
11335  ;;
11336esac
11337fi
11338XARGS=$ac_cv_path_XARGS
11339if test -n "$XARGS"; then
11340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11341$as_echo "$XARGS" >&6; }
11342else
11343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
11345fi
11346
11347
11348  test -n "$XARGS" && break
11349done
11350
11351    else
11352      # If it succeeded, then it was overridden by the user. We will use it
11353      # for the tool.
11354
11355      # First remove it from the list of overridden variables, so we can test
11356      # for unknown variables in the end.
11357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11358
11359      # Check if the provided tool contains a complete path.
11360      tool_specified="$XARGS"
11361      tool_basename="${tool_specified##*/}"
11362      if test "x$tool_basename" = "x$tool_specified"; then
11363        # A command without a complete path is provided, search $PATH.
11364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11365$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11366        # Extract the first word of "$tool_basename", so it can be a program name with args.
11367set dummy $tool_basename; ac_word=$2
11368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11369$as_echo_n "checking for $ac_word... " >&6; }
11370if ${ac_cv_path_XARGS+:} false; then :
11371  $as_echo_n "(cached) " >&6
11372else
11373  case $XARGS in
11374  [\\/]* | ?:[\\/]*)
11375  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11376  ;;
11377  *)
11378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11379for as_dir in $PATH
11380do
11381  IFS=$as_save_IFS
11382  test -z "$as_dir" && as_dir=.
11383    for ac_exec_ext in '' $ac_executable_extensions; do
11384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11385    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11387    break 2
11388  fi
11389done
11390  done
11391IFS=$as_save_IFS
11392
11393  ;;
11394esac
11395fi
11396XARGS=$ac_cv_path_XARGS
11397if test -n "$XARGS"; then
11398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11399$as_echo "$XARGS" >&6; }
11400else
11401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402$as_echo "no" >&6; }
11403fi
11404
11405
11406        if test "x$XARGS" = x; then
11407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11408        fi
11409      else
11410        # Otherwise we believe it is a complete path. Use it as it is.
11411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11412$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11414$as_echo_n "checking for XARGS... " >&6; }
11415        if test ! -x "$tool_specified"; then
11416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11417$as_echo "not found" >&6; }
11418          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11419        fi
11420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11421$as_echo "$tool_specified" >&6; }
11422      fi
11423    fi
11424  fi
11425
11426
11427
11428  if test "x$XARGS" = x; then
11429    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11430  fi
11431
11432
11433
11434  # Then required tools that require some special treatment.
11435
11436
11437  # Publish this variable in the help.
11438
11439
11440  if test "x$AWK" = x; then
11441    # The variable is not set by user, try to locate tool using the code snippet
11442    for ac_prog in gawk mawk nawk awk
11443do
11444  # Extract the first word of "$ac_prog", so it can be a program name with args.
11445set dummy $ac_prog; ac_word=$2
11446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11447$as_echo_n "checking for $ac_word... " >&6; }
11448if ${ac_cv_prog_AWK+:} false; then :
11449  $as_echo_n "(cached) " >&6
11450else
11451  if test -n "$AWK"; then
11452  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11453else
11454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11455for as_dir in $PATH
11456do
11457  IFS=$as_save_IFS
11458  test -z "$as_dir" && as_dir=.
11459    for ac_exec_ext in '' $ac_executable_extensions; do
11460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11461    ac_cv_prog_AWK="$ac_prog"
11462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11463    break 2
11464  fi
11465done
11466  done
11467IFS=$as_save_IFS
11468
11469fi
11470fi
11471AWK=$ac_cv_prog_AWK
11472if test -n "$AWK"; then
11473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11474$as_echo "$AWK" >&6; }
11475else
11476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11477$as_echo "no" >&6; }
11478fi
11479
11480
11481  test -n "$AWK" && break
11482done
11483
11484  else
11485    # The variable is set, but is it from the command line or the environment?
11486
11487    # Try to remove the string !AWK! from our list.
11488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11490      # If it failed, the variable was not from the command line. Ignore it,
11491      # but warn the user (except for BASH, which is always set by the calling BASH).
11492      if test "xAWK" != xBASH; then
11493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11494$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11495      fi
11496      # Try to locate tool using the code snippet
11497      for ac_prog in gawk mawk nawk awk
11498do
11499  # Extract the first word of "$ac_prog", so it can be a program name with args.
11500set dummy $ac_prog; ac_word=$2
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11502$as_echo_n "checking for $ac_word... " >&6; }
11503if ${ac_cv_prog_AWK+:} false; then :
11504  $as_echo_n "(cached) " >&6
11505else
11506  if test -n "$AWK"; then
11507  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11508else
11509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11510for as_dir in $PATH
11511do
11512  IFS=$as_save_IFS
11513  test -z "$as_dir" && as_dir=.
11514    for ac_exec_ext in '' $ac_executable_extensions; do
11515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11516    ac_cv_prog_AWK="$ac_prog"
11517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11518    break 2
11519  fi
11520done
11521  done
11522IFS=$as_save_IFS
11523
11524fi
11525fi
11526AWK=$ac_cv_prog_AWK
11527if test -n "$AWK"; then
11528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11529$as_echo "$AWK" >&6; }
11530else
11531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
11533fi
11534
11535
11536  test -n "$AWK" && break
11537done
11538
11539    else
11540      # If it succeeded, then it was overridden by the user. We will use it
11541      # for the tool.
11542
11543      # First remove it from the list of overridden variables, so we can test
11544      # for unknown variables in the end.
11545      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11546
11547      # Check if the provided tool contains a complete path.
11548      tool_specified="$AWK"
11549      tool_basename="${tool_specified##*/}"
11550      if test "x$tool_basename" = "x$tool_specified"; then
11551        # A command without a complete path is provided, search $PATH.
11552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11553$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11554        # Extract the first word of "$tool_basename", so it can be a program name with args.
11555set dummy $tool_basename; ac_word=$2
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11557$as_echo_n "checking for $ac_word... " >&6; }
11558if ${ac_cv_path_AWK+:} false; then :
11559  $as_echo_n "(cached) " >&6
11560else
11561  case $AWK in
11562  [\\/]* | ?:[\\/]*)
11563  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11564  ;;
11565  *)
11566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11567for as_dir in $PATH
11568do
11569  IFS=$as_save_IFS
11570  test -z "$as_dir" && as_dir=.
11571    for ac_exec_ext in '' $ac_executable_extensions; do
11572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11573    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11575    break 2
11576  fi
11577done
11578  done
11579IFS=$as_save_IFS
11580
11581  ;;
11582esac
11583fi
11584AWK=$ac_cv_path_AWK
11585if test -n "$AWK"; then
11586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11587$as_echo "$AWK" >&6; }
11588else
11589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11590$as_echo "no" >&6; }
11591fi
11592
11593
11594        if test "x$AWK" = x; then
11595          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11596        fi
11597      else
11598        # Otherwise we believe it is a complete path. Use it as it is.
11599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11600$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11602$as_echo_n "checking for AWK... " >&6; }
11603        if test ! -x "$tool_specified"; then
11604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11605$as_echo "not found" >&6; }
11606          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11607        fi
11608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11609$as_echo "$tool_specified" >&6; }
11610      fi
11611    fi
11612  fi
11613
11614
11615  if test "x$AWK" = x; then
11616    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11617  fi
11618
11619
11620
11621
11622  # Publish this variable in the help.
11623
11624
11625  if test "x$GREP" = x; then
11626    # The variable is not set by user, try to locate tool using the code snippet
11627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11628$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11629if ${ac_cv_path_GREP+:} false; then :
11630  $as_echo_n "(cached) " >&6
11631else
11632  if test -z "$GREP"; then
11633  ac_path_GREP_found=false
11634  # Loop through the user's path and test for each of PROGNAME-LIST
11635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_prog in grep ggrep; do
11641    for ac_exec_ext in '' $ac_executable_extensions; do
11642      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11643      as_fn_executable_p "$ac_path_GREP" || continue
11644# Check for GNU ac_path_GREP and select it if it is found.
11645  # Check for GNU $ac_path_GREP
11646case `"$ac_path_GREP" --version 2>&1` in
11647*GNU*)
11648  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11649*)
11650  ac_count=0
11651  $as_echo_n 0123456789 >"conftest.in"
11652  while :
11653  do
11654    cat "conftest.in" "conftest.in" >"conftest.tmp"
11655    mv "conftest.tmp" "conftest.in"
11656    cp "conftest.in" "conftest.nl"
11657    $as_echo 'GREP' >> "conftest.nl"
11658    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11659    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11660    as_fn_arith $ac_count + 1 && ac_count=$as_val
11661    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11662      # Best one so far, save it but keep looking for a better one
11663      ac_cv_path_GREP="$ac_path_GREP"
11664      ac_path_GREP_max=$ac_count
11665    fi
11666    # 10*(2^10) chars as input seems more than enough
11667    test $ac_count -gt 10 && break
11668  done
11669  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11670esac
11671
11672      $ac_path_GREP_found && break 3
11673    done
11674  done
11675  done
11676IFS=$as_save_IFS
11677  if test -z "$ac_cv_path_GREP"; then
11678    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11679  fi
11680else
11681  ac_cv_path_GREP=$GREP
11682fi
11683
11684fi
11685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11686$as_echo "$ac_cv_path_GREP" >&6; }
11687 GREP="$ac_cv_path_GREP"
11688
11689
11690  else
11691    # The variable is set, but is it from the command line or the environment?
11692
11693    # Try to remove the string !GREP! from our list.
11694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11696      # If it failed, the variable was not from the command line. Ignore it,
11697      # but warn the user (except for BASH, which is always set by the calling BASH).
11698      if test "xGREP" != xBASH; then
11699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11700$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11701      fi
11702      # Try to locate tool using the code snippet
11703      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11704$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11705if ${ac_cv_path_GREP+:} false; then :
11706  $as_echo_n "(cached) " >&6
11707else
11708  if test -z "$GREP"; then
11709  ac_path_GREP_found=false
11710  # Loop through the user's path and test for each of PROGNAME-LIST
11711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11712for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11713do
11714  IFS=$as_save_IFS
11715  test -z "$as_dir" && as_dir=.
11716    for ac_prog in grep ggrep; do
11717    for ac_exec_ext in '' $ac_executable_extensions; do
11718      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11719      as_fn_executable_p "$ac_path_GREP" || continue
11720# Check for GNU ac_path_GREP and select it if it is found.
11721  # Check for GNU $ac_path_GREP
11722case `"$ac_path_GREP" --version 2>&1` in
11723*GNU*)
11724  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11725*)
11726  ac_count=0
11727  $as_echo_n 0123456789 >"conftest.in"
11728  while :
11729  do
11730    cat "conftest.in" "conftest.in" >"conftest.tmp"
11731    mv "conftest.tmp" "conftest.in"
11732    cp "conftest.in" "conftest.nl"
11733    $as_echo 'GREP' >> "conftest.nl"
11734    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11735    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11736    as_fn_arith $ac_count + 1 && ac_count=$as_val
11737    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11738      # Best one so far, save it but keep looking for a better one
11739      ac_cv_path_GREP="$ac_path_GREP"
11740      ac_path_GREP_max=$ac_count
11741    fi
11742    # 10*(2^10) chars as input seems more than enough
11743    test $ac_count -gt 10 && break
11744  done
11745  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11746esac
11747
11748      $ac_path_GREP_found && break 3
11749    done
11750  done
11751  done
11752IFS=$as_save_IFS
11753  if test -z "$ac_cv_path_GREP"; then
11754    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11755  fi
11756else
11757  ac_cv_path_GREP=$GREP
11758fi
11759
11760fi
11761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11762$as_echo "$ac_cv_path_GREP" >&6; }
11763 GREP="$ac_cv_path_GREP"
11764
11765
11766    else
11767      # If it succeeded, then it was overridden by the user. We will use it
11768      # for the tool.
11769
11770      # First remove it from the list of overridden variables, so we can test
11771      # for unknown variables in the end.
11772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11773
11774      # Check if the provided tool contains a complete path.
11775      tool_specified="$GREP"
11776      tool_basename="${tool_specified##*/}"
11777      if test "x$tool_basename" = "x$tool_specified"; then
11778        # A command without a complete path is provided, search $PATH.
11779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11780$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11781        # Extract the first word of "$tool_basename", so it can be a program name with args.
11782set dummy $tool_basename; ac_word=$2
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11784$as_echo_n "checking for $ac_word... " >&6; }
11785if ${ac_cv_path_GREP+:} false; then :
11786  $as_echo_n "(cached) " >&6
11787else
11788  case $GREP in
11789  [\\/]* | ?:[\\/]*)
11790  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11791  ;;
11792  *)
11793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11794for as_dir in $PATH
11795do
11796  IFS=$as_save_IFS
11797  test -z "$as_dir" && as_dir=.
11798    for ac_exec_ext in '' $ac_executable_extensions; do
11799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11800    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11802    break 2
11803  fi
11804done
11805  done
11806IFS=$as_save_IFS
11807
11808  ;;
11809esac
11810fi
11811GREP=$ac_cv_path_GREP
11812if test -n "$GREP"; then
11813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11814$as_echo "$GREP" >&6; }
11815else
11816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
11818fi
11819
11820
11821        if test "x$GREP" = x; then
11822          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11823        fi
11824      else
11825        # Otherwise we believe it is a complete path. Use it as it is.
11826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11827$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11829$as_echo_n "checking for GREP... " >&6; }
11830        if test ! -x "$tool_specified"; then
11831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11832$as_echo "not found" >&6; }
11833          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11834        fi
11835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11836$as_echo "$tool_specified" >&6; }
11837      fi
11838    fi
11839  fi
11840
11841
11842  if test "x$GREP" = x; then
11843    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11844  fi
11845
11846
11847
11848
11849  # Publish this variable in the help.
11850
11851
11852  if test "x$EGREP" = x; then
11853    # The variable is not set by user, try to locate tool using the code snippet
11854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11855$as_echo_n "checking for egrep... " >&6; }
11856if ${ac_cv_path_EGREP+:} false; then :
11857  $as_echo_n "(cached) " >&6
11858else
11859  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11860   then ac_cv_path_EGREP="$GREP -E"
11861   else
11862     if test -z "$EGREP"; then
11863  ac_path_EGREP_found=false
11864  # Loop through the user's path and test for each of PROGNAME-LIST
11865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11866for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11867do
11868  IFS=$as_save_IFS
11869  test -z "$as_dir" && as_dir=.
11870    for ac_prog in egrep; do
11871    for ac_exec_ext in '' $ac_executable_extensions; do
11872      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11873      as_fn_executable_p "$ac_path_EGREP" || continue
11874# Check for GNU ac_path_EGREP and select it if it is found.
11875  # Check for GNU $ac_path_EGREP
11876case `"$ac_path_EGREP" --version 2>&1` in
11877*GNU*)
11878  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11879*)
11880  ac_count=0
11881  $as_echo_n 0123456789 >"conftest.in"
11882  while :
11883  do
11884    cat "conftest.in" "conftest.in" >"conftest.tmp"
11885    mv "conftest.tmp" "conftest.in"
11886    cp "conftest.in" "conftest.nl"
11887    $as_echo 'EGREP' >> "conftest.nl"
11888    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11889    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11890    as_fn_arith $ac_count + 1 && ac_count=$as_val
11891    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11892      # Best one so far, save it but keep looking for a better one
11893      ac_cv_path_EGREP="$ac_path_EGREP"
11894      ac_path_EGREP_max=$ac_count
11895    fi
11896    # 10*(2^10) chars as input seems more than enough
11897    test $ac_count -gt 10 && break
11898  done
11899  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11900esac
11901
11902      $ac_path_EGREP_found && break 3
11903    done
11904  done
11905  done
11906IFS=$as_save_IFS
11907  if test -z "$ac_cv_path_EGREP"; then
11908    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11909  fi
11910else
11911  ac_cv_path_EGREP=$EGREP
11912fi
11913
11914   fi
11915fi
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11917$as_echo "$ac_cv_path_EGREP" >&6; }
11918 EGREP="$ac_cv_path_EGREP"
11919
11920
11921  else
11922    # The variable is set, but is it from the command line or the environment?
11923
11924    # Try to remove the string !EGREP! from our list.
11925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11927      # If it failed, the variable was not from the command line. Ignore it,
11928      # but warn the user (except for BASH, which is always set by the calling BASH).
11929      if test "xEGREP" != xBASH; then
11930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11931$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11932      fi
11933      # Try to locate tool using the code snippet
11934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11935$as_echo_n "checking for egrep... " >&6; }
11936if ${ac_cv_path_EGREP+:} false; then :
11937  $as_echo_n "(cached) " >&6
11938else
11939  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11940   then ac_cv_path_EGREP="$GREP -E"
11941   else
11942     if test -z "$EGREP"; then
11943  ac_path_EGREP_found=false
11944  # Loop through the user's path and test for each of PROGNAME-LIST
11945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11946for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11947do
11948  IFS=$as_save_IFS
11949  test -z "$as_dir" && as_dir=.
11950    for ac_prog in egrep; do
11951    for ac_exec_ext in '' $ac_executable_extensions; do
11952      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11953      as_fn_executable_p "$ac_path_EGREP" || continue
11954# Check for GNU ac_path_EGREP and select it if it is found.
11955  # Check for GNU $ac_path_EGREP
11956case `"$ac_path_EGREP" --version 2>&1` in
11957*GNU*)
11958  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11959*)
11960  ac_count=0
11961  $as_echo_n 0123456789 >"conftest.in"
11962  while :
11963  do
11964    cat "conftest.in" "conftest.in" >"conftest.tmp"
11965    mv "conftest.tmp" "conftest.in"
11966    cp "conftest.in" "conftest.nl"
11967    $as_echo 'EGREP' >> "conftest.nl"
11968    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11969    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11970    as_fn_arith $ac_count + 1 && ac_count=$as_val
11971    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11972      # Best one so far, save it but keep looking for a better one
11973      ac_cv_path_EGREP="$ac_path_EGREP"
11974      ac_path_EGREP_max=$ac_count
11975    fi
11976    # 10*(2^10) chars as input seems more than enough
11977    test $ac_count -gt 10 && break
11978  done
11979  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11980esac
11981
11982      $ac_path_EGREP_found && break 3
11983    done
11984  done
11985  done
11986IFS=$as_save_IFS
11987  if test -z "$ac_cv_path_EGREP"; then
11988    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11989  fi
11990else
11991  ac_cv_path_EGREP=$EGREP
11992fi
11993
11994   fi
11995fi
11996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11997$as_echo "$ac_cv_path_EGREP" >&6; }
11998 EGREP="$ac_cv_path_EGREP"
11999
12000
12001    else
12002      # If it succeeded, then it was overridden by the user. We will use it
12003      # for the tool.
12004
12005      # First remove it from the list of overridden variables, so we can test
12006      # for unknown variables in the end.
12007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12008
12009      # Check if the provided tool contains a complete path.
12010      tool_specified="$EGREP"
12011      tool_basename="${tool_specified##*/}"
12012      if test "x$tool_basename" = "x$tool_specified"; then
12013        # A command without a complete path is provided, search $PATH.
12014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12015$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12016        # Extract the first word of "$tool_basename", so it can be a program name with args.
12017set dummy $tool_basename; ac_word=$2
12018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12019$as_echo_n "checking for $ac_word... " >&6; }
12020if ${ac_cv_path_EGREP+:} false; then :
12021  $as_echo_n "(cached) " >&6
12022else
12023  case $EGREP in
12024  [\\/]* | ?:[\\/]*)
12025  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12026  ;;
12027  *)
12028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12029for as_dir in $PATH
12030do
12031  IFS=$as_save_IFS
12032  test -z "$as_dir" && as_dir=.
12033    for ac_exec_ext in '' $ac_executable_extensions; do
12034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12035    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12037    break 2
12038  fi
12039done
12040  done
12041IFS=$as_save_IFS
12042
12043  ;;
12044esac
12045fi
12046EGREP=$ac_cv_path_EGREP
12047if test -n "$EGREP"; then
12048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12049$as_echo "$EGREP" >&6; }
12050else
12051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052$as_echo "no" >&6; }
12053fi
12054
12055
12056        if test "x$EGREP" = x; then
12057          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12058        fi
12059      else
12060        # Otherwise we believe it is a complete path. Use it as it is.
12061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12062$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12063        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12064$as_echo_n "checking for EGREP... " >&6; }
12065        if test ! -x "$tool_specified"; then
12066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12067$as_echo "not found" >&6; }
12068          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12069        fi
12070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12071$as_echo "$tool_specified" >&6; }
12072      fi
12073    fi
12074  fi
12075
12076
12077  if test "x$EGREP" = x; then
12078    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12079  fi
12080
12081
12082
12083
12084  # Publish this variable in the help.
12085
12086
12087  if test "x$FGREP" = x; then
12088    # The variable is not set by user, try to locate tool using the code snippet
12089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12090$as_echo_n "checking for fgrep... " >&6; }
12091if ${ac_cv_path_FGREP+:} false; then :
12092  $as_echo_n "(cached) " >&6
12093else
12094  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12095   then ac_cv_path_FGREP="$GREP -F"
12096   else
12097     if test -z "$FGREP"; then
12098  ac_path_FGREP_found=false
12099  # Loop through the user's path and test for each of PROGNAME-LIST
12100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12101for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12102do
12103  IFS=$as_save_IFS
12104  test -z "$as_dir" && as_dir=.
12105    for ac_prog in fgrep; do
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12108      as_fn_executable_p "$ac_path_FGREP" || continue
12109# Check for GNU ac_path_FGREP and select it if it is found.
12110  # Check for GNU $ac_path_FGREP
12111case `"$ac_path_FGREP" --version 2>&1` in
12112*GNU*)
12113  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12114*)
12115  ac_count=0
12116  $as_echo_n 0123456789 >"conftest.in"
12117  while :
12118  do
12119    cat "conftest.in" "conftest.in" >"conftest.tmp"
12120    mv "conftest.tmp" "conftest.in"
12121    cp "conftest.in" "conftest.nl"
12122    $as_echo 'FGREP' >> "conftest.nl"
12123    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12124    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12125    as_fn_arith $ac_count + 1 && ac_count=$as_val
12126    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12127      # Best one so far, save it but keep looking for a better one
12128      ac_cv_path_FGREP="$ac_path_FGREP"
12129      ac_path_FGREP_max=$ac_count
12130    fi
12131    # 10*(2^10) chars as input seems more than enough
12132    test $ac_count -gt 10 && break
12133  done
12134  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12135esac
12136
12137      $ac_path_FGREP_found && break 3
12138    done
12139  done
12140  done
12141IFS=$as_save_IFS
12142  if test -z "$ac_cv_path_FGREP"; then
12143    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12144  fi
12145else
12146  ac_cv_path_FGREP=$FGREP
12147fi
12148
12149   fi
12150fi
12151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12152$as_echo "$ac_cv_path_FGREP" >&6; }
12153 FGREP="$ac_cv_path_FGREP"
12154
12155
12156  else
12157    # The variable is set, but is it from the command line or the environment?
12158
12159    # Try to remove the string !FGREP! from our list.
12160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12162      # If it failed, the variable was not from the command line. Ignore it,
12163      # but warn the user (except for BASH, which is always set by the calling BASH).
12164      if test "xFGREP" != xBASH; then
12165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12166$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12167      fi
12168      # Try to locate tool using the code snippet
12169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12170$as_echo_n "checking for fgrep... " >&6; }
12171if ${ac_cv_path_FGREP+:} false; then :
12172  $as_echo_n "(cached) " >&6
12173else
12174  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12175   then ac_cv_path_FGREP="$GREP -F"
12176   else
12177     if test -z "$FGREP"; then
12178  ac_path_FGREP_found=false
12179  # Loop through the user's path and test for each of PROGNAME-LIST
12180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12182do
12183  IFS=$as_save_IFS
12184  test -z "$as_dir" && as_dir=.
12185    for ac_prog in fgrep; do
12186    for ac_exec_ext in '' $ac_executable_extensions; do
12187      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12188      as_fn_executable_p "$ac_path_FGREP" || continue
12189# Check for GNU ac_path_FGREP and select it if it is found.
12190  # Check for GNU $ac_path_FGREP
12191case `"$ac_path_FGREP" --version 2>&1` in
12192*GNU*)
12193  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12194*)
12195  ac_count=0
12196  $as_echo_n 0123456789 >"conftest.in"
12197  while :
12198  do
12199    cat "conftest.in" "conftest.in" >"conftest.tmp"
12200    mv "conftest.tmp" "conftest.in"
12201    cp "conftest.in" "conftest.nl"
12202    $as_echo 'FGREP' >> "conftest.nl"
12203    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12204    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12205    as_fn_arith $ac_count + 1 && ac_count=$as_val
12206    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12207      # Best one so far, save it but keep looking for a better one
12208      ac_cv_path_FGREP="$ac_path_FGREP"
12209      ac_path_FGREP_max=$ac_count
12210    fi
12211    # 10*(2^10) chars as input seems more than enough
12212    test $ac_count -gt 10 && break
12213  done
12214  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12215esac
12216
12217      $ac_path_FGREP_found && break 3
12218    done
12219  done
12220  done
12221IFS=$as_save_IFS
12222  if test -z "$ac_cv_path_FGREP"; then
12223    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12224  fi
12225else
12226  ac_cv_path_FGREP=$FGREP
12227fi
12228
12229   fi
12230fi
12231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12232$as_echo "$ac_cv_path_FGREP" >&6; }
12233 FGREP="$ac_cv_path_FGREP"
12234
12235
12236    else
12237      # If it succeeded, then it was overridden by the user. We will use it
12238      # for the tool.
12239
12240      # First remove it from the list of overridden variables, so we can test
12241      # for unknown variables in the end.
12242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12243
12244      # Check if the provided tool contains a complete path.
12245      tool_specified="$FGREP"
12246      tool_basename="${tool_specified##*/}"
12247      if test "x$tool_basename" = "x$tool_specified"; then
12248        # A command without a complete path is provided, search $PATH.
12249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12250$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12251        # Extract the first word of "$tool_basename", so it can be a program name with args.
12252set dummy $tool_basename; ac_word=$2
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12254$as_echo_n "checking for $ac_word... " >&6; }
12255if ${ac_cv_path_FGREP+:} false; then :
12256  $as_echo_n "(cached) " >&6
12257else
12258  case $FGREP in
12259  [\\/]* | ?:[\\/]*)
12260  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12261  ;;
12262  *)
12263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12264for as_dir in $PATH
12265do
12266  IFS=$as_save_IFS
12267  test -z "$as_dir" && as_dir=.
12268    for ac_exec_ext in '' $ac_executable_extensions; do
12269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12270    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12272    break 2
12273  fi
12274done
12275  done
12276IFS=$as_save_IFS
12277
12278  ;;
12279esac
12280fi
12281FGREP=$ac_cv_path_FGREP
12282if test -n "$FGREP"; then
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12284$as_echo "$FGREP" >&6; }
12285else
12286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12287$as_echo "no" >&6; }
12288fi
12289
12290
12291        if test "x$FGREP" = x; then
12292          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12293        fi
12294      else
12295        # Otherwise we believe it is a complete path. Use it as it is.
12296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12297$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12299$as_echo_n "checking for FGREP... " >&6; }
12300        if test ! -x "$tool_specified"; then
12301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12302$as_echo "not found" >&6; }
12303          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12304        fi
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12306$as_echo "$tool_specified" >&6; }
12307      fi
12308    fi
12309  fi
12310
12311
12312  if test "x$FGREP" = x; then
12313    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12314  fi
12315
12316
12317
12318
12319  # Publish this variable in the help.
12320
12321
12322  if test "x$SED" = x; then
12323    # The variable is not set by user, try to locate tool using the code snippet
12324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12325$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12326if ${ac_cv_path_SED+:} false; then :
12327  $as_echo_n "(cached) " >&6
12328else
12329            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12330     for ac_i in 1 2 3 4 5 6 7; do
12331       ac_script="$ac_script$as_nl$ac_script"
12332     done
12333     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12334     { ac_script=; unset ac_script;}
12335     if test -z "$SED"; then
12336  ac_path_SED_found=false
12337  # Loop through the user's path and test for each of PROGNAME-LIST
12338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12339for as_dir in $PATH
12340do
12341  IFS=$as_save_IFS
12342  test -z "$as_dir" && as_dir=.
12343    for ac_prog in sed gsed; do
12344    for ac_exec_ext in '' $ac_executable_extensions; do
12345      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12346      as_fn_executable_p "$ac_path_SED" || continue
12347# Check for GNU ac_path_SED and select it if it is found.
12348  # Check for GNU $ac_path_SED
12349case `"$ac_path_SED" --version 2>&1` in
12350*GNU*)
12351  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12352*)
12353  ac_count=0
12354  $as_echo_n 0123456789 >"conftest.in"
12355  while :
12356  do
12357    cat "conftest.in" "conftest.in" >"conftest.tmp"
12358    mv "conftest.tmp" "conftest.in"
12359    cp "conftest.in" "conftest.nl"
12360    $as_echo '' >> "conftest.nl"
12361    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12362    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12363    as_fn_arith $ac_count + 1 && ac_count=$as_val
12364    if test $ac_count -gt ${ac_path_SED_max-0}; then
12365      # Best one so far, save it but keep looking for a better one
12366      ac_cv_path_SED="$ac_path_SED"
12367      ac_path_SED_max=$ac_count
12368    fi
12369    # 10*(2^10) chars as input seems more than enough
12370    test $ac_count -gt 10 && break
12371  done
12372  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12373esac
12374
12375      $ac_path_SED_found && break 3
12376    done
12377  done
12378  done
12379IFS=$as_save_IFS
12380  if test -z "$ac_cv_path_SED"; then
12381    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12382  fi
12383else
12384  ac_cv_path_SED=$SED
12385fi
12386
12387fi
12388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12389$as_echo "$ac_cv_path_SED" >&6; }
12390 SED="$ac_cv_path_SED"
12391  rm -f conftest.sed
12392
12393  else
12394    # The variable is set, but is it from the command line or the environment?
12395
12396    # Try to remove the string !SED! from our list.
12397    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12398    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12399      # If it failed, the variable was not from the command line. Ignore it,
12400      # but warn the user (except for BASH, which is always set by the calling BASH).
12401      if test "xSED" != xBASH; then
12402        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12403$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12404      fi
12405      # Try to locate tool using the code snippet
12406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12407$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12408if ${ac_cv_path_SED+:} false; then :
12409  $as_echo_n "(cached) " >&6
12410else
12411            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12412     for ac_i in 1 2 3 4 5 6 7; do
12413       ac_script="$ac_script$as_nl$ac_script"
12414     done
12415     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12416     { ac_script=; unset ac_script;}
12417     if test -z "$SED"; then
12418  ac_path_SED_found=false
12419  # Loop through the user's path and test for each of PROGNAME-LIST
12420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12421for as_dir in $PATH
12422do
12423  IFS=$as_save_IFS
12424  test -z "$as_dir" && as_dir=.
12425    for ac_prog in sed gsed; do
12426    for ac_exec_ext in '' $ac_executable_extensions; do
12427      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12428      as_fn_executable_p "$ac_path_SED" || continue
12429# Check for GNU ac_path_SED and select it if it is found.
12430  # Check for GNU $ac_path_SED
12431case `"$ac_path_SED" --version 2>&1` in
12432*GNU*)
12433  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12434*)
12435  ac_count=0
12436  $as_echo_n 0123456789 >"conftest.in"
12437  while :
12438  do
12439    cat "conftest.in" "conftest.in" >"conftest.tmp"
12440    mv "conftest.tmp" "conftest.in"
12441    cp "conftest.in" "conftest.nl"
12442    $as_echo '' >> "conftest.nl"
12443    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12444    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12445    as_fn_arith $ac_count + 1 && ac_count=$as_val
12446    if test $ac_count -gt ${ac_path_SED_max-0}; then
12447      # Best one so far, save it but keep looking for a better one
12448      ac_cv_path_SED="$ac_path_SED"
12449      ac_path_SED_max=$ac_count
12450    fi
12451    # 10*(2^10) chars as input seems more than enough
12452    test $ac_count -gt 10 && break
12453  done
12454  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12455esac
12456
12457      $ac_path_SED_found && break 3
12458    done
12459  done
12460  done
12461IFS=$as_save_IFS
12462  if test -z "$ac_cv_path_SED"; then
12463    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12464  fi
12465else
12466  ac_cv_path_SED=$SED
12467fi
12468
12469fi
12470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12471$as_echo "$ac_cv_path_SED" >&6; }
12472 SED="$ac_cv_path_SED"
12473  rm -f conftest.sed
12474
12475    else
12476      # If it succeeded, then it was overridden by the user. We will use it
12477      # for the tool.
12478
12479      # First remove it from the list of overridden variables, so we can test
12480      # for unknown variables in the end.
12481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12482
12483      # Check if the provided tool contains a complete path.
12484      tool_specified="$SED"
12485      tool_basename="${tool_specified##*/}"
12486      if test "x$tool_basename" = "x$tool_specified"; then
12487        # A command without a complete path is provided, search $PATH.
12488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12489$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12490        # Extract the first word of "$tool_basename", so it can be a program name with args.
12491set dummy $tool_basename; ac_word=$2
12492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12493$as_echo_n "checking for $ac_word... " >&6; }
12494if ${ac_cv_path_SED+:} false; then :
12495  $as_echo_n "(cached) " >&6
12496else
12497  case $SED in
12498  [\\/]* | ?:[\\/]*)
12499  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12500  ;;
12501  *)
12502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12503for as_dir in $PATH
12504do
12505  IFS=$as_save_IFS
12506  test -z "$as_dir" && as_dir=.
12507    for ac_exec_ext in '' $ac_executable_extensions; do
12508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12509    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12511    break 2
12512  fi
12513done
12514  done
12515IFS=$as_save_IFS
12516
12517  ;;
12518esac
12519fi
12520SED=$ac_cv_path_SED
12521if test -n "$SED"; then
12522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12523$as_echo "$SED" >&6; }
12524else
12525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12526$as_echo "no" >&6; }
12527fi
12528
12529
12530        if test "x$SED" = x; then
12531          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12532        fi
12533      else
12534        # Otherwise we believe it is a complete path. Use it as it is.
12535        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12536$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12537        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12538$as_echo_n "checking for SED... " >&6; }
12539        if test ! -x "$tool_specified"; then
12540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12541$as_echo "not found" >&6; }
12542          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12543        fi
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12545$as_echo "$tool_specified" >&6; }
12546      fi
12547    fi
12548  fi
12549
12550
12551  if test "x$SED" = x; then
12552    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12553  fi
12554
12555
12556
12557  # Always force rm.
12558  RM="$RM -f"
12559
12560  # pwd behaves differently on various platforms and some don't support the -L flag.
12561  # Always use the bash builtin pwd to get uniform behavior.
12562  THEPWDCMD=pwd
12563
12564  # These are not required on all platforms
12565
12566
12567  # Publish this variable in the help.
12568
12569
12570  if test "x$CYGPATH" = x; then
12571    # The variable is not set by user, try to locate tool using the code snippet
12572    for ac_prog in cygpath
12573do
12574  # Extract the first word of "$ac_prog", so it can be a program name with args.
12575set dummy $ac_prog; ac_word=$2
12576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12577$as_echo_n "checking for $ac_word... " >&6; }
12578if ${ac_cv_path_CYGPATH+:} false; then :
12579  $as_echo_n "(cached) " >&6
12580else
12581  case $CYGPATH in
12582  [\\/]* | ?:[\\/]*)
12583  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12584  ;;
12585  *)
12586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12587for as_dir in $PATH
12588do
12589  IFS=$as_save_IFS
12590  test -z "$as_dir" && as_dir=.
12591    for ac_exec_ext in '' $ac_executable_extensions; do
12592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12593    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12595    break 2
12596  fi
12597done
12598  done
12599IFS=$as_save_IFS
12600
12601  ;;
12602esac
12603fi
12604CYGPATH=$ac_cv_path_CYGPATH
12605if test -n "$CYGPATH"; then
12606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12607$as_echo "$CYGPATH" >&6; }
12608else
12609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12610$as_echo "no" >&6; }
12611fi
12612
12613
12614  test -n "$CYGPATH" && break
12615done
12616
12617  else
12618    # The variable is set, but is it from the command line or the environment?
12619
12620    # Try to remove the string !CYGPATH! from our list.
12621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12623      # If it failed, the variable was not from the command line. Ignore it,
12624      # but warn the user (except for BASH, which is always set by the calling BASH).
12625      if test "xCYGPATH" != xBASH; then
12626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12627$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12628      fi
12629      # Try to locate tool using the code snippet
12630      for ac_prog in cygpath
12631do
12632  # Extract the first word of "$ac_prog", so it can be a program name with args.
12633set dummy $ac_prog; ac_word=$2
12634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12635$as_echo_n "checking for $ac_word... " >&6; }
12636if ${ac_cv_path_CYGPATH+:} false; then :
12637  $as_echo_n "(cached) " >&6
12638else
12639  case $CYGPATH in
12640  [\\/]* | ?:[\\/]*)
12641  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12642  ;;
12643  *)
12644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12645for as_dir in $PATH
12646do
12647  IFS=$as_save_IFS
12648  test -z "$as_dir" && as_dir=.
12649    for ac_exec_ext in '' $ac_executable_extensions; do
12650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12651    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12653    break 2
12654  fi
12655done
12656  done
12657IFS=$as_save_IFS
12658
12659  ;;
12660esac
12661fi
12662CYGPATH=$ac_cv_path_CYGPATH
12663if test -n "$CYGPATH"; then
12664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12665$as_echo "$CYGPATH" >&6; }
12666else
12667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12668$as_echo "no" >&6; }
12669fi
12670
12671
12672  test -n "$CYGPATH" && break
12673done
12674
12675    else
12676      # If it succeeded, then it was overridden by the user. We will use it
12677      # for the tool.
12678
12679      # First remove it from the list of overridden variables, so we can test
12680      # for unknown variables in the end.
12681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12682
12683      # Check if the provided tool contains a complete path.
12684      tool_specified="$CYGPATH"
12685      tool_basename="${tool_specified##*/}"
12686      if test "x$tool_basename" = "x$tool_specified"; then
12687        # A command without a complete path is provided, search $PATH.
12688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12689$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12690        # Extract the first word of "$tool_basename", so it can be a program name with args.
12691set dummy $tool_basename; ac_word=$2
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12693$as_echo_n "checking for $ac_word... " >&6; }
12694if ${ac_cv_path_CYGPATH+:} false; then :
12695  $as_echo_n "(cached) " >&6
12696else
12697  case $CYGPATH in
12698  [\\/]* | ?:[\\/]*)
12699  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12700  ;;
12701  *)
12702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12703for as_dir in $PATH
12704do
12705  IFS=$as_save_IFS
12706  test -z "$as_dir" && as_dir=.
12707    for ac_exec_ext in '' $ac_executable_extensions; do
12708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12709    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12711    break 2
12712  fi
12713done
12714  done
12715IFS=$as_save_IFS
12716
12717  ;;
12718esac
12719fi
12720CYGPATH=$ac_cv_path_CYGPATH
12721if test -n "$CYGPATH"; then
12722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12723$as_echo "$CYGPATH" >&6; }
12724else
12725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12726$as_echo "no" >&6; }
12727fi
12728
12729
12730        if test "x$CYGPATH" = x; then
12731          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12732        fi
12733      else
12734        # Otherwise we believe it is a complete path. Use it as it is.
12735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12736$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12738$as_echo_n "checking for CYGPATH... " >&6; }
12739        if test ! -x "$tool_specified"; then
12740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12741$as_echo "not found" >&6; }
12742          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12743        fi
12744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12745$as_echo "$tool_specified" >&6; }
12746      fi
12747    fi
12748  fi
12749
12750
12751
12752
12753  # Publish this variable in the help.
12754
12755
12756  if test "x$READLINK" = x; then
12757    # The variable is not set by user, try to locate tool using the code snippet
12758    for ac_prog in greadlink readlink
12759do
12760  # Extract the first word of "$ac_prog", so it can be a program name with args.
12761set dummy $ac_prog; ac_word=$2
12762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12763$as_echo_n "checking for $ac_word... " >&6; }
12764if ${ac_cv_path_READLINK+:} false; then :
12765  $as_echo_n "(cached) " >&6
12766else
12767  case $READLINK in
12768  [\\/]* | ?:[\\/]*)
12769  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12770  ;;
12771  *)
12772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12773for as_dir in $PATH
12774do
12775  IFS=$as_save_IFS
12776  test -z "$as_dir" && as_dir=.
12777    for ac_exec_ext in '' $ac_executable_extensions; do
12778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12779    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12781    break 2
12782  fi
12783done
12784  done
12785IFS=$as_save_IFS
12786
12787  ;;
12788esac
12789fi
12790READLINK=$ac_cv_path_READLINK
12791if test -n "$READLINK"; then
12792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12793$as_echo "$READLINK" >&6; }
12794else
12795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12796$as_echo "no" >&6; }
12797fi
12798
12799
12800  test -n "$READLINK" && break
12801done
12802
12803  else
12804    # The variable is set, but is it from the command line or the environment?
12805
12806    # Try to remove the string !READLINK! from our list.
12807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12809      # If it failed, the variable was not from the command line. Ignore it,
12810      # but warn the user (except for BASH, which is always set by the calling BASH).
12811      if test "xREADLINK" != xBASH; then
12812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12813$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12814      fi
12815      # Try to locate tool using the code snippet
12816      for ac_prog in greadlink readlink
12817do
12818  # Extract the first word of "$ac_prog", so it can be a program name with args.
12819set dummy $ac_prog; ac_word=$2
12820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12821$as_echo_n "checking for $ac_word... " >&6; }
12822if ${ac_cv_path_READLINK+:} false; then :
12823  $as_echo_n "(cached) " >&6
12824else
12825  case $READLINK in
12826  [\\/]* | ?:[\\/]*)
12827  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12828  ;;
12829  *)
12830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12831for as_dir in $PATH
12832do
12833  IFS=$as_save_IFS
12834  test -z "$as_dir" && as_dir=.
12835    for ac_exec_ext in '' $ac_executable_extensions; do
12836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12837    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12839    break 2
12840  fi
12841done
12842  done
12843IFS=$as_save_IFS
12844
12845  ;;
12846esac
12847fi
12848READLINK=$ac_cv_path_READLINK
12849if test -n "$READLINK"; then
12850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12851$as_echo "$READLINK" >&6; }
12852else
12853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12854$as_echo "no" >&6; }
12855fi
12856
12857
12858  test -n "$READLINK" && break
12859done
12860
12861    else
12862      # If it succeeded, then it was overridden by the user. We will use it
12863      # for the tool.
12864
12865      # First remove it from the list of overridden variables, so we can test
12866      # for unknown variables in the end.
12867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12868
12869      # Check if the provided tool contains a complete path.
12870      tool_specified="$READLINK"
12871      tool_basename="${tool_specified##*/}"
12872      if test "x$tool_basename" = "x$tool_specified"; then
12873        # A command without a complete path is provided, search $PATH.
12874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12875$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12876        # Extract the first word of "$tool_basename", so it can be a program name with args.
12877set dummy $tool_basename; ac_word=$2
12878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12879$as_echo_n "checking for $ac_word... " >&6; }
12880if ${ac_cv_path_READLINK+:} false; then :
12881  $as_echo_n "(cached) " >&6
12882else
12883  case $READLINK in
12884  [\\/]* | ?:[\\/]*)
12885  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12886  ;;
12887  *)
12888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12889for as_dir in $PATH
12890do
12891  IFS=$as_save_IFS
12892  test -z "$as_dir" && as_dir=.
12893    for ac_exec_ext in '' $ac_executable_extensions; do
12894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12895    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12897    break 2
12898  fi
12899done
12900  done
12901IFS=$as_save_IFS
12902
12903  ;;
12904esac
12905fi
12906READLINK=$ac_cv_path_READLINK
12907if test -n "$READLINK"; then
12908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12909$as_echo "$READLINK" >&6; }
12910else
12911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12912$as_echo "no" >&6; }
12913fi
12914
12915
12916        if test "x$READLINK" = x; then
12917          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12918        fi
12919      else
12920        # Otherwise we believe it is a complete path. Use it as it is.
12921        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12922$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12924$as_echo_n "checking for READLINK... " >&6; }
12925        if test ! -x "$tool_specified"; then
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12927$as_echo "not found" >&6; }
12928          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12929        fi
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12931$as_echo "$tool_specified" >&6; }
12932      fi
12933    fi
12934  fi
12935
12936
12937
12938
12939  # Publish this variable in the help.
12940
12941
12942  if test "x$DF" = x; then
12943    # The variable is not set by user, try to locate tool using the code snippet
12944    for ac_prog in df
12945do
12946  # Extract the first word of "$ac_prog", so it can be a program name with args.
12947set dummy $ac_prog; ac_word=$2
12948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12949$as_echo_n "checking for $ac_word... " >&6; }
12950if ${ac_cv_path_DF+:} false; then :
12951  $as_echo_n "(cached) " >&6
12952else
12953  case $DF in
12954  [\\/]* | ?:[\\/]*)
12955  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12956  ;;
12957  *)
12958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12959for as_dir in $PATH
12960do
12961  IFS=$as_save_IFS
12962  test -z "$as_dir" && as_dir=.
12963    for ac_exec_ext in '' $ac_executable_extensions; do
12964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12965    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12967    break 2
12968  fi
12969done
12970  done
12971IFS=$as_save_IFS
12972
12973  ;;
12974esac
12975fi
12976DF=$ac_cv_path_DF
12977if test -n "$DF"; then
12978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12979$as_echo "$DF" >&6; }
12980else
12981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12982$as_echo "no" >&6; }
12983fi
12984
12985
12986  test -n "$DF" && break
12987done
12988
12989  else
12990    # The variable is set, but is it from the command line or the environment?
12991
12992    # Try to remove the string !DF! from our list.
12993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12995      # If it failed, the variable was not from the command line. Ignore it,
12996      # but warn the user (except for BASH, which is always set by the calling BASH).
12997      if test "xDF" != xBASH; then
12998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12999$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13000      fi
13001      # Try to locate tool using the code snippet
13002      for ac_prog in df
13003do
13004  # Extract the first word of "$ac_prog", so it can be a program name with args.
13005set dummy $ac_prog; ac_word=$2
13006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13007$as_echo_n "checking for $ac_word... " >&6; }
13008if ${ac_cv_path_DF+:} false; then :
13009  $as_echo_n "(cached) " >&6
13010else
13011  case $DF in
13012  [\\/]* | ?:[\\/]*)
13013  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13014  ;;
13015  *)
13016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13017for as_dir in $PATH
13018do
13019  IFS=$as_save_IFS
13020  test -z "$as_dir" && as_dir=.
13021    for ac_exec_ext in '' $ac_executable_extensions; do
13022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13023    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13025    break 2
13026  fi
13027done
13028  done
13029IFS=$as_save_IFS
13030
13031  ;;
13032esac
13033fi
13034DF=$ac_cv_path_DF
13035if test -n "$DF"; then
13036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13037$as_echo "$DF" >&6; }
13038else
13039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13040$as_echo "no" >&6; }
13041fi
13042
13043
13044  test -n "$DF" && break
13045done
13046
13047    else
13048      # If it succeeded, then it was overridden by the user. We will use it
13049      # for the tool.
13050
13051      # First remove it from the list of overridden variables, so we can test
13052      # for unknown variables in the end.
13053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13054
13055      # Check if the provided tool contains a complete path.
13056      tool_specified="$DF"
13057      tool_basename="${tool_specified##*/}"
13058      if test "x$tool_basename" = "x$tool_specified"; then
13059        # A command without a complete path is provided, search $PATH.
13060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13061$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13062        # Extract the first word of "$tool_basename", so it can be a program name with args.
13063set dummy $tool_basename; ac_word=$2
13064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13065$as_echo_n "checking for $ac_word... " >&6; }
13066if ${ac_cv_path_DF+:} false; then :
13067  $as_echo_n "(cached) " >&6
13068else
13069  case $DF in
13070  [\\/]* | ?:[\\/]*)
13071  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13072  ;;
13073  *)
13074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13075for as_dir in $PATH
13076do
13077  IFS=$as_save_IFS
13078  test -z "$as_dir" && as_dir=.
13079    for ac_exec_ext in '' $ac_executable_extensions; do
13080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13081    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13083    break 2
13084  fi
13085done
13086  done
13087IFS=$as_save_IFS
13088
13089  ;;
13090esac
13091fi
13092DF=$ac_cv_path_DF
13093if test -n "$DF"; then
13094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13095$as_echo "$DF" >&6; }
13096else
13097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13098$as_echo "no" >&6; }
13099fi
13100
13101
13102        if test "x$DF" = x; then
13103          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13104        fi
13105      else
13106        # Otherwise we believe it is a complete path. Use it as it is.
13107        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13108$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13110$as_echo_n "checking for DF... " >&6; }
13111        if test ! -x "$tool_specified"; then
13112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13113$as_echo "not found" >&6; }
13114          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13115        fi
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13117$as_echo "$tool_specified" >&6; }
13118      fi
13119    fi
13120  fi
13121
13122
13123
13124
13125  # Publish this variable in the help.
13126
13127
13128  if test "x$CPIO" = x; then
13129    # The variable is not set by user, try to locate tool using the code snippet
13130    for ac_prog in cpio bsdcpio
13131do
13132  # Extract the first word of "$ac_prog", so it can be a program name with args.
13133set dummy $ac_prog; ac_word=$2
13134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13135$as_echo_n "checking for $ac_word... " >&6; }
13136if ${ac_cv_path_CPIO+:} false; then :
13137  $as_echo_n "(cached) " >&6
13138else
13139  case $CPIO in
13140  [\\/]* | ?:[\\/]*)
13141  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13142  ;;
13143  *)
13144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13145for as_dir in $PATH
13146do
13147  IFS=$as_save_IFS
13148  test -z "$as_dir" && as_dir=.
13149    for ac_exec_ext in '' $ac_executable_extensions; do
13150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13151    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13153    break 2
13154  fi
13155done
13156  done
13157IFS=$as_save_IFS
13158
13159  ;;
13160esac
13161fi
13162CPIO=$ac_cv_path_CPIO
13163if test -n "$CPIO"; then
13164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13165$as_echo "$CPIO" >&6; }
13166else
13167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13168$as_echo "no" >&6; }
13169fi
13170
13171
13172  test -n "$CPIO" && break
13173done
13174
13175  else
13176    # The variable is set, but is it from the command line or the environment?
13177
13178    # Try to remove the string !CPIO! from our list.
13179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13181      # If it failed, the variable was not from the command line. Ignore it,
13182      # but warn the user (except for BASH, which is always set by the calling BASH).
13183      if test "xCPIO" != xBASH; then
13184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13185$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13186      fi
13187      # Try to locate tool using the code snippet
13188      for ac_prog in cpio bsdcpio
13189do
13190  # Extract the first word of "$ac_prog", so it can be a program name with args.
13191set dummy $ac_prog; ac_word=$2
13192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13193$as_echo_n "checking for $ac_word... " >&6; }
13194if ${ac_cv_path_CPIO+:} false; then :
13195  $as_echo_n "(cached) " >&6
13196else
13197  case $CPIO in
13198  [\\/]* | ?:[\\/]*)
13199  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13200  ;;
13201  *)
13202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13203for as_dir in $PATH
13204do
13205  IFS=$as_save_IFS
13206  test -z "$as_dir" && as_dir=.
13207    for ac_exec_ext in '' $ac_executable_extensions; do
13208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13209    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13211    break 2
13212  fi
13213done
13214  done
13215IFS=$as_save_IFS
13216
13217  ;;
13218esac
13219fi
13220CPIO=$ac_cv_path_CPIO
13221if test -n "$CPIO"; then
13222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13223$as_echo "$CPIO" >&6; }
13224else
13225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13226$as_echo "no" >&6; }
13227fi
13228
13229
13230  test -n "$CPIO" && break
13231done
13232
13233    else
13234      # If it succeeded, then it was overridden by the user. We will use it
13235      # for the tool.
13236
13237      # First remove it from the list of overridden variables, so we can test
13238      # for unknown variables in the end.
13239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13240
13241      # Check if the provided tool contains a complete path.
13242      tool_specified="$CPIO"
13243      tool_basename="${tool_specified##*/}"
13244      if test "x$tool_basename" = "x$tool_specified"; then
13245        # A command without a complete path is provided, search $PATH.
13246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13247$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13248        # Extract the first word of "$tool_basename", so it can be a program name with args.
13249set dummy $tool_basename; ac_word=$2
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13251$as_echo_n "checking for $ac_word... " >&6; }
13252if ${ac_cv_path_CPIO+:} false; then :
13253  $as_echo_n "(cached) " >&6
13254else
13255  case $CPIO in
13256  [\\/]* | ?:[\\/]*)
13257  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13258  ;;
13259  *)
13260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13261for as_dir in $PATH
13262do
13263  IFS=$as_save_IFS
13264  test -z "$as_dir" && as_dir=.
13265    for ac_exec_ext in '' $ac_executable_extensions; do
13266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13267    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13269    break 2
13270  fi
13271done
13272  done
13273IFS=$as_save_IFS
13274
13275  ;;
13276esac
13277fi
13278CPIO=$ac_cv_path_CPIO
13279if test -n "$CPIO"; then
13280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13281$as_echo "$CPIO" >&6; }
13282else
13283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13284$as_echo "no" >&6; }
13285fi
13286
13287
13288        if test "x$CPIO" = x; then
13289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13290        fi
13291      else
13292        # Otherwise we believe it is a complete path. Use it as it is.
13293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13294$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13296$as_echo_n "checking for CPIO... " >&6; }
13297        if test ! -x "$tool_specified"; then
13298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13299$as_echo "not found" >&6; }
13300          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13301        fi
13302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13303$as_echo "$tool_specified" >&6; }
13304      fi
13305    fi
13306  fi
13307
13308
13309
13310
13311# Now we can determine OpenJDK build and target platforms. This is required to
13312# have early on.
13313# Make sure we can run config.sub.
13314$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13315  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13316
13317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13318$as_echo_n "checking build system type... " >&6; }
13319if ${ac_cv_build+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  ac_build_alias=$build_alias
13323test "x$ac_build_alias" = x &&
13324  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13325test "x$ac_build_alias" = x &&
13326  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13327ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13328  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13329
13330fi
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13332$as_echo "$ac_cv_build" >&6; }
13333case $ac_cv_build in
13334*-*-*) ;;
13335*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13336esac
13337build=$ac_cv_build
13338ac_save_IFS=$IFS; IFS='-'
13339set x $ac_cv_build
13340shift
13341build_cpu=$1
13342build_vendor=$2
13343shift; shift
13344# Remember, the first character of IFS is used to create $*,
13345# except with old shells:
13346build_os=$*
13347IFS=$ac_save_IFS
13348case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13349
13350
13351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13352$as_echo_n "checking host system type... " >&6; }
13353if ${ac_cv_host+:} false; then :
13354  $as_echo_n "(cached) " >&6
13355else
13356  if test "x$host_alias" = x; then
13357  ac_cv_host=$ac_cv_build
13358else
13359  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13360    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13361fi
13362
13363fi
13364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13365$as_echo "$ac_cv_host" >&6; }
13366case $ac_cv_host in
13367*-*-*) ;;
13368*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13369esac
13370host=$ac_cv_host
13371ac_save_IFS=$IFS; IFS='-'
13372set x $ac_cv_host
13373shift
13374host_cpu=$1
13375host_vendor=$2
13376shift; shift
13377# Remember, the first character of IFS is used to create $*,
13378# except with old shells:
13379host_os=$*
13380IFS=$ac_save_IFS
13381case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13382
13383
13384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13385$as_echo_n "checking target system type... " >&6; }
13386if ${ac_cv_target+:} false; then :
13387  $as_echo_n "(cached) " >&6
13388else
13389  if test "x$target_alias" = x; then
13390  ac_cv_target=$ac_cv_host
13391else
13392  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13393    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13394fi
13395
13396fi
13397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13398$as_echo "$ac_cv_target" >&6; }
13399case $ac_cv_target in
13400*-*-*) ;;
13401*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13402esac
13403target=$ac_cv_target
13404ac_save_IFS=$IFS; IFS='-'
13405set x $ac_cv_target
13406shift
13407target_cpu=$1
13408target_vendor=$2
13409shift; shift
13410# Remember, the first character of IFS is used to create $*,
13411# except with old shells:
13412target_os=$*
13413IFS=$ac_save_IFS
13414case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13415
13416
13417# The aliases save the names the user supplied, while $host etc.
13418# will get canonicalized.
13419test -n "$target_alias" &&
13420  test "$program_prefix$program_suffix$program_transform_name" = \
13421    NONENONEs,x,x, &&
13422  program_prefix=${target_alias}-
13423
13424  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13425  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13426  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13427  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13428  # to use the configure naming style.
13429
13430
13431
13432
13433
13434  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13435  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13436  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13437  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13438  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13439  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13440
13441
13442
13443  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13444
13445  case "$build_os" in
13446    *linux*)
13447      VAR_OS=linux
13448      VAR_OS_TYPE=unix
13449      ;;
13450    *solaris*)
13451      VAR_OS=solaris
13452      VAR_OS_TYPE=unix
13453      ;;
13454    *darwin*)
13455      VAR_OS=macosx
13456      VAR_OS_TYPE=unix
13457      ;;
13458    *bsd*)
13459      VAR_OS=bsd
13460      VAR_OS_TYPE=unix
13461      ;;
13462    *cygwin*)
13463      VAR_OS=windows
13464      VAR_OS_ENV=windows.cygwin
13465      ;;
13466    *mingw*)
13467      VAR_OS=windows
13468      VAR_OS_ENV=windows.msys
13469      ;;
13470    *aix*)
13471      VAR_OS=aix
13472      VAR_OS_TYPE=unix
13473      ;;
13474    *)
13475      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13476      ;;
13477  esac
13478
13479
13480  # First argument is the cpu name from the trip/quad
13481  case "$build_cpu" in
13482    x86_64)
13483      VAR_CPU=x86_64
13484      VAR_CPU_ARCH=x86
13485      VAR_CPU_BITS=64
13486      VAR_CPU_ENDIAN=little
13487      ;;
13488    i?86)
13489      VAR_CPU=x86
13490      VAR_CPU_ARCH=x86
13491      VAR_CPU_BITS=32
13492      VAR_CPU_ENDIAN=little
13493      ;;
13494    arm*)
13495      VAR_CPU=arm
13496      VAR_CPU_ARCH=arm
13497      VAR_CPU_BITS=32
13498      VAR_CPU_ENDIAN=little
13499      ;;
13500    aarch64)
13501      VAR_CPU=aarch64
13502      VAR_CPU_ARCH=aarch64
13503      VAR_CPU_BITS=64
13504      VAR_CPU_ENDIAN=little
13505      ;;
13506    powerpc)
13507      VAR_CPU=ppc
13508      VAR_CPU_ARCH=ppc
13509      VAR_CPU_BITS=32
13510      VAR_CPU_ENDIAN=big
13511      ;;
13512    powerpc64)
13513      VAR_CPU=ppc64
13514      VAR_CPU_ARCH=ppc
13515      VAR_CPU_BITS=64
13516      VAR_CPU_ENDIAN=big
13517      ;;
13518    powerpc64le)
13519      VAR_CPU=ppc64
13520      VAR_CPU_ARCH=ppc
13521      VAR_CPU_BITS=64
13522      VAR_CPU_ENDIAN=little
13523      ;;
13524    s390)
13525      VAR_CPU=s390
13526      VAR_CPU_ARCH=s390
13527      VAR_CPU_BITS=32
13528      VAR_CPU_ENDIAN=big
13529      ;;
13530    s390x)
13531      VAR_CPU=s390x
13532      VAR_CPU_ARCH=s390
13533      VAR_CPU_BITS=64
13534      VAR_CPU_ENDIAN=big
13535      ;;
13536    sparc)
13537      VAR_CPU=sparc
13538      VAR_CPU_ARCH=sparc
13539      VAR_CPU_BITS=32
13540      VAR_CPU_ENDIAN=big
13541      ;;
13542    sparcv9|sparc64)
13543      VAR_CPU=sparcv9
13544      VAR_CPU_ARCH=sparc
13545      VAR_CPU_BITS=64
13546      VAR_CPU_ENDIAN=big
13547      ;;
13548    *)
13549      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13550      ;;
13551  esac
13552
13553  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13554  OPENJDK_BUILD_OS="$VAR_OS"
13555  if test "x$VAR_OS_TYPE" != x; then
13556    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13557  else
13558    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13559  fi
13560  if test "x$VAR_OS_ENV" != x; then
13561    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13562  else
13563    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13564  fi
13565  OPENJDK_BUILD_CPU="$VAR_CPU"
13566  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13567  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13568  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13569
13570
13571
13572
13573
13574
13575
13576
13577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13578$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13580$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13581
13582  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13583
13584  case "$host_os" in
13585    *linux*)
13586      VAR_OS=linux
13587      VAR_OS_TYPE=unix
13588      ;;
13589    *solaris*)
13590      VAR_OS=solaris
13591      VAR_OS_TYPE=unix
13592      ;;
13593    *darwin*)
13594      VAR_OS=macosx
13595      VAR_OS_TYPE=unix
13596      ;;
13597    *bsd*)
13598      VAR_OS=bsd
13599      VAR_OS_TYPE=unix
13600      ;;
13601    *cygwin*)
13602      VAR_OS=windows
13603      VAR_OS_ENV=windows.cygwin
13604      ;;
13605    *mingw*)
13606      VAR_OS=windows
13607      VAR_OS_ENV=windows.msys
13608      ;;
13609    *aix*)
13610      VAR_OS=aix
13611      VAR_OS_TYPE=unix
13612      ;;
13613    *)
13614      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13615      ;;
13616  esac
13617
13618
13619  # First argument is the cpu name from the trip/quad
13620  case "$host_cpu" in
13621    x86_64)
13622      VAR_CPU=x86_64
13623      VAR_CPU_ARCH=x86
13624      VAR_CPU_BITS=64
13625      VAR_CPU_ENDIAN=little
13626      ;;
13627    i?86)
13628      VAR_CPU=x86
13629      VAR_CPU_ARCH=x86
13630      VAR_CPU_BITS=32
13631      VAR_CPU_ENDIAN=little
13632      ;;
13633    arm*)
13634      VAR_CPU=arm
13635      VAR_CPU_ARCH=arm
13636      VAR_CPU_BITS=32
13637      VAR_CPU_ENDIAN=little
13638      ;;
13639    aarch64)
13640      VAR_CPU=aarch64
13641      VAR_CPU_ARCH=aarch64
13642      VAR_CPU_BITS=64
13643      VAR_CPU_ENDIAN=little
13644      ;;
13645    powerpc)
13646      VAR_CPU=ppc
13647      VAR_CPU_ARCH=ppc
13648      VAR_CPU_BITS=32
13649      VAR_CPU_ENDIAN=big
13650      ;;
13651    powerpc64)
13652      VAR_CPU=ppc64
13653      VAR_CPU_ARCH=ppc
13654      VAR_CPU_BITS=64
13655      VAR_CPU_ENDIAN=big
13656      ;;
13657    powerpc64le)
13658      VAR_CPU=ppc64
13659      VAR_CPU_ARCH=ppc
13660      VAR_CPU_BITS=64
13661      VAR_CPU_ENDIAN=little
13662      ;;
13663    s390)
13664      VAR_CPU=s390
13665      VAR_CPU_ARCH=s390
13666      VAR_CPU_BITS=32
13667      VAR_CPU_ENDIAN=big
13668      ;;
13669    s390x)
13670      VAR_CPU=s390x
13671      VAR_CPU_ARCH=s390
13672      VAR_CPU_BITS=64
13673      VAR_CPU_ENDIAN=big
13674      ;;
13675    sparc)
13676      VAR_CPU=sparc
13677      VAR_CPU_ARCH=sparc
13678      VAR_CPU_BITS=32
13679      VAR_CPU_ENDIAN=big
13680      ;;
13681    sparcv9|sparc64)
13682      VAR_CPU=sparcv9
13683      VAR_CPU_ARCH=sparc
13684      VAR_CPU_BITS=64
13685      VAR_CPU_ENDIAN=big
13686      ;;
13687    *)
13688      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13689      ;;
13690  esac
13691
13692  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13693  OPENJDK_TARGET_OS="$VAR_OS"
13694  if test "x$VAR_OS_TYPE" != x; then
13695    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13696  else
13697    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13698  fi
13699  if test "x$VAR_OS_ENV" != x; then
13700    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13701  else
13702    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13703  fi
13704  OPENJDK_TARGET_CPU="$VAR_CPU"
13705  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13706  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13707  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13708
13709
13710
13711
13712
13713
13714
13715
13716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13717$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13719$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13720
13721
13722
13723# Check whether --with-target-bits was given.
13724if test "${with_target_bits+set}" = set; then :
13725  withval=$with_target_bits;
13726fi
13727
13728
13729  # We have three types of compiles:
13730  # native  == normal compilation, target system == build system
13731  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13732  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13733  #
13734  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13735    # We're doing a proper cross-compilation
13736    COMPILE_TYPE="cross"
13737  else
13738    COMPILE_TYPE="native"
13739  fi
13740
13741  if test "x$with_target_bits" != x; then
13742    if test "x$COMPILE_TYPE" = "xcross"; then
13743      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13744    fi
13745
13746    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13747      # A reduced build is requested
13748      COMPILE_TYPE="reduced"
13749      OPENJDK_TARGET_CPU_BITS=32
13750      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13751        OPENJDK_TARGET_CPU=x86
13752      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13753        OPENJDK_TARGET_CPU=sparc
13754      else
13755        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13756      fi
13757    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13758      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
13759    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13760      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13761$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13762    else
13763      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13764    fi
13765  fi
13766
13767
13768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13769$as_echo_n "checking compilation type... " >&6; }
13770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13771$as_echo "$COMPILE_TYPE" >&6; }
13772
13773
13774  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13775    REQUIRED_OS_NAME=SunOS
13776    REQUIRED_OS_VERSION=5.10
13777  fi
13778  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13779    REQUIRED_OS_NAME=Linux
13780    REQUIRED_OS_VERSION=2.6
13781  fi
13782  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13783    REQUIRED_OS_NAME=Windows
13784    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13785      REQUIRED_OS_VERSION=5.2
13786    else
13787      REQUIRED_OS_VERSION=5.1
13788    fi
13789  fi
13790  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13791    REQUIRED_OS_NAME=Darwin
13792    REQUIRED_OS_VERSION=11.2
13793  fi
13794
13795
13796
13797
13798
13799  # Also store the legacy naming of the cpu.
13800  # Ie i586 and amd64 instead of x86 and x86_64
13801  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13802  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13803    OPENJDK_TARGET_CPU_LEGACY="i586"
13804  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13805    # On all platforms except MacOSX replace x86_64 with amd64.
13806    OPENJDK_TARGET_CPU_LEGACY="amd64"
13807  fi
13808
13809
13810  # And the second legacy naming of the cpu.
13811  # Ie i386 and amd64 instead of x86 and x86_64.
13812  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13813  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13814    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13815  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13816    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13817  fi
13818
13819
13820  # This is the name of the cpu (but using i386 and amd64 instead of
13821  # x86 and x86_64, respectively), preceeded by a /, to be used when
13822  # locating libraries. On macosx, it's empty, though.
13823  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13824  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13825    OPENJDK_TARGET_CPU_LIBDIR=""
13826  fi
13827
13828
13829  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13830  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13831  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13832  OPENJDK_TARGET_CPU_ISADIR=""
13833  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13834    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13835      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13836    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13837      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13838    fi
13839  fi
13840
13841
13842  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13843  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13844  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13845    # On linux only, we replace x86 with i386.
13846    OPENJDK_TARGET_CPU_OSARCH="i386"
13847  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13848    # On all platforms except macosx, we replace x86_64 with amd64.
13849    OPENJDK_TARGET_CPU_OSARCH="amd64"
13850  fi
13851
13852
13853  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13854  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13855    OPENJDK_TARGET_CPU_JLI="i386"
13856  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13857    # On all platforms except macosx, we replace x86_64 with amd64.
13858    OPENJDK_TARGET_CPU_JLI="amd64"
13859  fi
13860  # Now setup the -D flags for building libjli.
13861  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13862  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13863    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13864      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13865    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13866      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13867    fi
13868  fi
13869
13870
13871  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13872      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13873  else
13874      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13875  fi
13876
13877
13878  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13879    A_LP64="LP64:="
13880    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13881    # unpack200.exe
13882    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13883      ADD_LP64="-D_LP64=1"
13884    fi
13885  fi
13886  LP64=$A_LP64
13887
13888
13889  if test "x$COMPILE_TYPE" = "xcross"; then
13890    # FIXME: ... or should this include reduced builds..?
13891    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13892  else
13893    DEFINE_CROSS_COMPILE_ARCH=""
13894  fi
13895
13896
13897  # ZERO_ARCHDEF is used to enable architecture-specific code
13898  case "${OPENJDK_TARGET_CPU}" in
13899    ppc)     ZERO_ARCHDEF=PPC32 ;;
13900    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13901    s390*)   ZERO_ARCHDEF=S390  ;;
13902    sparc*)  ZERO_ARCHDEF=SPARC ;;
13903    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13904    x86)     ZERO_ARCHDEF=IA32  ;;
13905    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13906  esac
13907
13908
13909
13910
13911# Continue setting up basic stuff. Most remaining code require fundamental tools.
13912
13913  # Save the current directory this script was started from
13914  CURDIR="$PWD"
13915
13916  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
13917  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
13918  # was not available at that time.
13919  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
13920  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
13921    ORIGINAL_PATH="$REWRITTEN_PATH"
13922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
13923$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
13924  fi
13925
13926  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13927    PATH_SEP=";"
13928
13929  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13930  if test $SRC_ROOT_LENGTH -gt 100; then
13931    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13932  fi
13933
13934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13936$as_echo_n "checking cygwin release... " >&6; }
13937    CYGWIN_VERSION=`$UNAME -r`
13938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13939$as_echo "$CYGWIN_VERSION" >&6; }
13940    WINDOWS_ENV_VENDOR='cygwin'
13941    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13942
13943    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13944    if test "x$CYGWIN_VERSION_OLD" != x; then
13945      { $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
13946$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;}
13947      as_fn_error $? "Cannot continue" "$LINENO" 5
13948    fi
13949    if test "x$CYGPATH" = x; then
13950      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13951    fi
13952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13953$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13954    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13955    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13956    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13957    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13959$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13960    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13961    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13962    if test "x$test_cygdrive_prefix" = x; then
13963      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13964    fi
13965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13967$as_echo_n "checking msys release... " >&6; }
13968    MSYS_VERSION=`$UNAME -r`
13969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13970$as_echo "$MSYS_VERSION" >&6; }
13971
13972    WINDOWS_ENV_VENDOR='msys'
13973    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13974
13975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13976$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13977    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13978    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13979
13980  windows_path="$MSYS_ROOT_PATH"
13981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13982    unix_path=`$CYGPATH -u "$windows_path"`
13983    MSYS_ROOT_PATH="$unix_path"
13984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13986    MSYS_ROOT_PATH="$unix_path"
13987  fi
13988
13989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13990$as_echo "$MSYS_ROOT_PATH" >&6; }
13991    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13992  else
13993    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13994  fi
13995
13996  # Test if windows or unix (cygwin/msys) find is first in path.
13997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13998$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13999  FIND_BINARY_OUTPUT=`find --version 2>&1`
14000  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14002$as_echo "unix style" >&6; }
14003  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14005$as_echo "Windows" >&6; }
14006    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14007$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14008    { $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
14009$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14010    as_fn_error $? "Cannot continue" "$LINENO" 5
14011  else
14012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14013$as_echo "unknown" >&6; }
14014    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14015$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14016  fi
14017
14018  else
14019    PATH_SEP=":"
14020  fi
14021
14022
14023  # We get the top-level directory from the supporting wrappers.
14024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14025$as_echo_n "checking for top-level directory... " >&6; }
14026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14027$as_echo "$TOPDIR" >&6; }
14028
14029
14030  # Save the original version of TOPDIR for string comparisons
14031  ORIGINAL_TOPDIR="$TOPDIR"
14032
14033
14034  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14035
14036  # Only process if variable expands to non-empty
14037
14038  if test "x$CURDIR" != x; then
14039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14040
14041  # Input might be given as Windows format, start by converting to
14042  # unix format.
14043  path="$CURDIR"
14044  new_path=`$CYGPATH -u "$path"`
14045
14046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14049  # "foo.exe" is OK but "foo" is an error.
14050  #
14051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14052  # It is also a way to make sure we got the proper file name for the real test later on.
14053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14054  if test "x$test_shortpath" = x; then
14055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14056$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14057    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14058  fi
14059
14060  # Call helper function which possibly converts this using DOS-style short mode.
14061  # If so, the updated path is stored in $new_path.
14062
14063  input_path="$new_path"
14064  # Check if we need to convert this using DOS-style short mode. If the path
14065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14066  # take no chances and rewrite it.
14067  # Note: m4 eats our [], so we need to use [ and ] instead.
14068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14069  if test "x$has_forbidden_chars" != x; then
14070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14074      # Going to short mode and back again did indeed matter. Since short mode is
14075      # case insensitive, let's make it lowercase to improve readability.
14076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14077      # Now convert it back to Unix-style (cygpath)
14078      input_path=`$CYGPATH -u "$shortmode_path"`
14079      new_path="$input_path"
14080    fi
14081  fi
14082
14083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14084  if test "x$test_cygdrive_prefix" = x; then
14085    # As a simple fix, exclude /usr/bin since it's not a real path.
14086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14088      # a path prefixed by /cygdrive for fixpath to work.
14089      new_path="$CYGWIN_ROOT_PATH$input_path"
14090    fi
14091  fi
14092
14093
14094  if test "x$path" != "x$new_path"; then
14095    CURDIR="$new_path"
14096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14097$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14098  fi
14099
14100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14101
14102  path="$CURDIR"
14103  has_colon=`$ECHO $path | $GREP ^.:`
14104  new_path="$path"
14105  if test "x$has_colon" = x; then
14106    # Not in mixed or Windows style, start by that.
14107    new_path=`cmd //c echo $path`
14108  fi
14109
14110
14111  input_path="$new_path"
14112  # Check if we need to convert this using DOS-style short mode. If the path
14113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14114  # take no chances and rewrite it.
14115  # Note: m4 eats our [], so we need to use [ and ] instead.
14116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14117  if test "x$has_forbidden_chars" != x; then
14118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14120  fi
14121
14122
14123  windows_path="$new_path"
14124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14125    unix_path=`$CYGPATH -u "$windows_path"`
14126    new_path="$unix_path"
14127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14129    new_path="$unix_path"
14130  fi
14131
14132  if test "x$path" != "x$new_path"; then
14133    CURDIR="$new_path"
14134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14135$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14136  fi
14137
14138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14140
14141    else
14142      # We're on a unix platform. Hooray! :)
14143      path="$CURDIR"
14144      has_space=`$ECHO "$path" | $GREP " "`
14145      if test "x$has_space" != x; then
14146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14147$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14149      fi
14150
14151      # Use eval to expand a potential ~
14152      eval path="$path"
14153      if test ! -f "$path" && test ! -d "$path"; then
14154        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14155      fi
14156
14157      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14158    fi
14159  fi
14160
14161
14162  # Only process if variable expands to non-empty
14163
14164  if test "x$TOPDIR" != x; then
14165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14166
14167  # Input might be given as Windows format, start by converting to
14168  # unix format.
14169  path="$TOPDIR"
14170  new_path=`$CYGPATH -u "$path"`
14171
14172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14175  # "foo.exe" is OK but "foo" is an error.
14176  #
14177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14178  # It is also a way to make sure we got the proper file name for the real test later on.
14179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14180  if test "x$test_shortpath" = x; then
14181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14182$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14183    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14184  fi
14185
14186  # Call helper function which possibly converts this using DOS-style short mode.
14187  # If so, the updated path is stored in $new_path.
14188
14189  input_path="$new_path"
14190  # Check if we need to convert this using DOS-style short mode. If the path
14191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14192  # take no chances and rewrite it.
14193  # Note: m4 eats our [], so we need to use [ and ] instead.
14194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14195  if test "x$has_forbidden_chars" != x; then
14196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14200      # Going to short mode and back again did indeed matter. Since short mode is
14201      # case insensitive, let's make it lowercase to improve readability.
14202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14203      # Now convert it back to Unix-style (cygpath)
14204      input_path=`$CYGPATH -u "$shortmode_path"`
14205      new_path="$input_path"
14206    fi
14207  fi
14208
14209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14210  if test "x$test_cygdrive_prefix" = x; then
14211    # As a simple fix, exclude /usr/bin since it's not a real path.
14212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14214      # a path prefixed by /cygdrive for fixpath to work.
14215      new_path="$CYGWIN_ROOT_PATH$input_path"
14216    fi
14217  fi
14218
14219
14220  if test "x$path" != "x$new_path"; then
14221    TOPDIR="$new_path"
14222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14223$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14224  fi
14225
14226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14227
14228  path="$TOPDIR"
14229  has_colon=`$ECHO $path | $GREP ^.:`
14230  new_path="$path"
14231  if test "x$has_colon" = x; then
14232    # Not in mixed or Windows style, start by that.
14233    new_path=`cmd //c echo $path`
14234  fi
14235
14236
14237  input_path="$new_path"
14238  # Check if we need to convert this using DOS-style short mode. If the path
14239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14240  # take no chances and rewrite it.
14241  # Note: m4 eats our [], so we need to use [ and ] instead.
14242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14243  if test "x$has_forbidden_chars" != x; then
14244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14246  fi
14247
14248
14249  windows_path="$new_path"
14250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14251    unix_path=`$CYGPATH -u "$windows_path"`
14252    new_path="$unix_path"
14253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14255    new_path="$unix_path"
14256  fi
14257
14258  if test "x$path" != "x$new_path"; then
14259    TOPDIR="$new_path"
14260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14261$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14262  fi
14263
14264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14266
14267    else
14268      # We're on a unix platform. Hooray! :)
14269      path="$TOPDIR"
14270      has_space=`$ECHO "$path" | $GREP " "`
14271      if test "x$has_space" != x; then
14272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14273$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14275      fi
14276
14277      # Use eval to expand a potential ~
14278      eval path="$path"
14279      if test ! -f "$path" && test ! -d "$path"; then
14280        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14281      fi
14282
14283      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14284    fi
14285  fi
14286
14287  # SRC_ROOT is a traditional alias for TOPDIR.
14288  SRC_ROOT=$TOPDIR
14289
14290  # Calculate a canonical version of TOPDIR for string comparisons
14291  CANONICAL_TOPDIR=$TOPDIR
14292
14293  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14294    # Follow a chain of symbolic links. Use readlink
14295    # where it exists, else fall back to horribly
14296    # complicated shell code.
14297    if test "x$READLINK_TESTED" != yes; then
14298      # On MacOSX there is a readlink tool with a different
14299      # purpose than the GNU readlink tool. Check the found readlink.
14300      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14301      if test "x$ISGNU" = x; then
14302        # A readlink that we do not know how to use.
14303        # Are there other non-GNU readlinks out there?
14304        READLINK_TESTED=yes
14305        READLINK=
14306      fi
14307    fi
14308
14309    if test "x$READLINK" != x; then
14310      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14311    else
14312      # Save the current directory for restoring afterwards
14313      STARTDIR=$PWD
14314      COUNTER=0
14315      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14316      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14317      cd $sym_link_dir
14318      # Use -P flag to resolve symlinks in directories.
14319      cd `$THEPWDCMD -P`
14320      sym_link_dir=`$THEPWDCMD -P`
14321      # Resolve file symlinks
14322      while test $COUNTER -lt 20; do
14323        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14324        if test "x$ISLINK" == x; then
14325          # This is not a symbolic link! We are done!
14326          break
14327        fi
14328        # Again resolve directory symlinks since the target of the just found
14329        # link could be in a different directory
14330        cd `$DIRNAME $ISLINK`
14331        sym_link_dir=`$THEPWDCMD -P`
14332        sym_link_file=`$BASENAME $ISLINK`
14333        let COUNTER=COUNTER+1
14334      done
14335      cd $STARTDIR
14336      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14337    fi
14338  fi
14339
14340
14341
14342  # Locate the directory of this script.
14343  AUTOCONF_DIR=$TOPDIR/common/autoconf
14344
14345
14346# Check if it's a pure open build or if custom sources are to be used.
14347
14348  # Check whether --enable-openjdk-only was given.
14349if test "${enable_openjdk_only+set}" = set; then :
14350  enableval=$enable_openjdk_only;
14351else
14352  enable_openjdk_only="no"
14353fi
14354
14355
14356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14357$as_echo_n "checking for presence of closed sources... " >&6; }
14358  if test -d "$SRC_ROOT/jdk/src/closed"; then
14359    CLOSED_SOURCE_PRESENT=yes
14360  else
14361    CLOSED_SOURCE_PRESENT=no
14362  fi
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14364$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14365
14366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14367$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14368  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14370$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14371
14372  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14373    OPENJDK=true
14374    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14375      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14376$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14377    fi
14378  else
14379    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14380      OPENJDK=true
14381    else
14382      OPENJDK=false
14383    fi
14384  fi
14385
14386  if test "x$OPENJDK" = "xtrue"; then
14387    SET_OPENJDK="OPENJDK=true"
14388  fi
14389
14390
14391
14392  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14393  # the IncludeCustomExtension macro.
14394
14395
14396# Check whether --with-custom-make-dir was given.
14397if test "${with_custom_make_dir+set}" = set; then :
14398  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
14399$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14400fi
14401
14402
14403
14404
14405# These are needed to be able to create a configuration name (and thus the output directory)
14406
14407  ###############################################################################
14408  #
14409  # Check which variant of the JDK that we want to build.
14410  # Currently we have:
14411  #    normal:   standard edition
14412  # but the custom make system may add other variants
14413  #
14414  # Effectively the JDK variant gives a name to a specific set of
14415  # modules to compile into the JDK. In the future, these modules
14416  # might even be Jigsaw modules.
14417  #
14418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14419$as_echo_n "checking which variant of the JDK to build... " >&6; }
14420
14421# Check whether --with-jdk-variant was given.
14422if test "${with_jdk_variant+set}" = set; then :
14423  withval=$with_jdk_variant;
14424fi
14425
14426
14427  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14428    JDK_VARIANT="normal"
14429  else
14430    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14431  fi
14432
14433
14434
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14436$as_echo "$JDK_VARIANT" >&6; }
14437
14438
14439###############################################################################
14440#
14441# Check which interpreter of the JVM we want to build.
14442# Currently we have:
14443#    template: Template interpreter (the default)
14444#    cpp     : C++ interpreter
14445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14446$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14447
14448# Check whether --with-jvm-interpreter was given.
14449if test "${with_jvm_interpreter+set}" = set; then :
14450  withval=$with_jvm_interpreter;
14451fi
14452
14453
14454if test "x$with_jvm_interpreter" = x; then
14455     with_jvm_interpreter="template"
14456fi
14457
14458JVM_INTERPRETER="$with_jvm_interpreter"
14459
14460if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14461   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14462fi
14463
14464
14465
14466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14467$as_echo "$with_jvm_interpreter" >&6; }
14468
14469
14470
14471  ###############################################################################
14472  #
14473  # Check which variants of the JVM that we want to build.
14474  # Currently we have:
14475  #    server: normal interpreter and a tiered C1/C2 compiler
14476  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14477  #    minimal1: reduced form of client with optional VM services and features stripped out
14478  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14479  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14480  #    zero: no machine code interpreter, no compiler
14481  #    zeroshark: zero interpreter and shark/llvm compiler backend
14482#    core: interpreter only, no compiler (only works on some platforms)
14483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14484$as_echo_n "checking which variants of the JVM to build... " >&6; }
14485
14486# Check whether --with-jvm-variants was given.
14487if test "${with_jvm_variants+set}" = set; then :
14488  withval=$with_jvm_variants;
14489fi
14490
14491
14492  if test "x$with_jvm_variants" = x; then
14493    with_jvm_variants="server"
14494  fi
14495
14496  JVM_VARIANTS=",$with_jvm_variants,"
14497  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,//'`
14498
14499  if test "x$TEST_VARIANTS" != "x,"; then
14500     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14501  fi
14502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14503$as_echo "$with_jvm_variants" >&6; }
14504
14505  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14506  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14507  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14508  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14509  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14510  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14511  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14512
14513  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14514    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14515      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14516    fi
14517  fi
14518  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14519    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14520      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14521    fi
14522  fi
14523  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14524    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14525      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14526    fi
14527  fi
14528
14529  # Replace the commas with AND for use in the build directory name.
14530  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14531  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/'`
14532  if test "x$COUNT_VARIANTS" != "x,1"; then
14533    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14534  else
14535    BUILDING_MULTIPLE_JVM_VARIANTS=no
14536  fi
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547  INCLUDE_SA=true
14548  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14549    INCLUDE_SA=false
14550  fi
14551  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14552    INCLUDE_SA=false
14553  fi
14554  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14555    INCLUDE_SA=false
14556  fi
14557  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14558    INCLUDE_SA=false
14559  fi
14560
14561
14562  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14563    MACOSX_UNIVERSAL="true"
14564  fi
14565
14566
14567
14568
14569  ###############################################################################
14570  #
14571  # Set the debug level
14572  #    release: no debug information, all optimizations, no asserts.
14573  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14574  #    fastdebug: debug information (-g), all optimizations, all asserts
14575  #    slowdebug: debug information (-g), no optimizations, all asserts
14576  #
14577  DEBUG_LEVEL="release"
14578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14579$as_echo_n "checking which debug level to use... " >&6; }
14580  # Check whether --enable-debug was given.
14581if test "${enable_debug+set}" = set; then :
14582  enableval=$enable_debug;
14583        ENABLE_DEBUG="${enableval}"
14584        DEBUG_LEVEL="fastdebug"
14585
14586else
14587  ENABLE_DEBUG="no"
14588fi
14589
14590
14591
14592# Check whether --with-debug-level was given.
14593if test "${with_debug_level+set}" = set; then :
14594  withval=$with_debug_level;
14595        DEBUG_LEVEL="${withval}"
14596        if test "x$ENABLE_DEBUG" = xyes; then
14597          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14598        fi
14599
14600fi
14601
14602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14603$as_echo "$DEBUG_LEVEL" >&6; }
14604
14605  if test "x$DEBUG_LEVEL" != xrelease && \
14606      test "x$DEBUG_LEVEL" != xoptimized && \
14607      test "x$DEBUG_LEVEL" != xfastdebug && \
14608      test "x$DEBUG_LEVEL" != xslowdebug; then
14609    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14610  fi
14611
14612
14613  ###############################################################################
14614  #
14615  # Setup legacy vars/targets and new vars to deal with different debug levels.
14616  #
14617
14618  case $DEBUG_LEVEL in
14619    release )
14620      VARIANT="OPT"
14621      FASTDEBUG="false"
14622      DEBUG_CLASSFILES="false"
14623      BUILD_VARIANT_RELEASE=""
14624      HOTSPOT_DEBUG_LEVEL="product"
14625      HOTSPOT_EXPORT="product"
14626      ;;
14627    fastdebug )
14628      VARIANT="DBG"
14629      FASTDEBUG="true"
14630      DEBUG_CLASSFILES="true"
14631      BUILD_VARIANT_RELEASE="-fastdebug"
14632      HOTSPOT_DEBUG_LEVEL="fastdebug"
14633      HOTSPOT_EXPORT="fastdebug"
14634      ;;
14635    slowdebug )
14636      VARIANT="DBG"
14637      FASTDEBUG="false"
14638      DEBUG_CLASSFILES="true"
14639      BUILD_VARIANT_RELEASE="-debug"
14640      HOTSPOT_DEBUG_LEVEL="debug"
14641      HOTSPOT_EXPORT="debug"
14642      ;;
14643    optimized )
14644      VARIANT="OPT"
14645      FASTDEBUG="false"
14646      DEBUG_CLASSFILES="false"
14647      BUILD_VARIANT_RELEASE="-optimized"
14648      HOTSPOT_DEBUG_LEVEL="optimized"
14649      HOTSPOT_EXPORT="optimized"
14650      ;;
14651  esac
14652
14653  # The debug level 'optimized' is a little special because it is currently only
14654  # applicable to the HotSpot build where it means to build a completely
14655  # optimized version of the VM without any debugging code (like for the
14656  # 'release' debug level which is called 'product' in the HotSpot build) but
14657  # with the exception that it can contain additional code which is otherwise
14658  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14659  # test new and/or experimental features which are not intended for customer
14660  # shipment. Because these new features need to be tested and benchmarked in
14661  # real world scenarios, we want to build the containing JDK at the 'release'
14662  # debug level.
14663  if test "x$DEBUG_LEVEL" = xoptimized; then
14664    DEBUG_LEVEL="release"
14665  fi
14666
14667  #####
14668  # Generate the legacy makefile targets for hotspot.
14669  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14670  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14671  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14672  # But until then ...
14673  HOTSPOT_TARGET=""
14674
14675  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14676    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14677  fi
14678
14679  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14680    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14681  fi
14682
14683  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14684    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14685  fi
14686
14687  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14688    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14689  fi
14690
14691  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14692    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14693  fi
14694
14695  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14696    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14697  fi
14698
14699  if test "x$JVM_VARIANT_CORE" = xtrue; then
14700    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14701  fi
14702
14703  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14704
14705  # On Macosx universal binaries are produced, but they only contain
14706  # 64 bit intel. This invalidates control of which jvms are built
14707  # from configure, but only server is valid anyway. Fix this
14708  # when hotspot makefiles are rewritten.
14709  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14710    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14711  fi
14712
14713  #####
14714
14715
14716
14717
14718
14719
14720
14721
14722# With basic setup done, call the custom early hook.
14723
14724
14725# Check if we have devkits, extra paths or sysroot set.
14726
14727
14728# Check whether --with-devkit was given.
14729if test "${with_devkit+set}" = set; then :
14730  withval=$with_devkit;
14731
14732  # Only process if variable expands to non-empty
14733
14734  if test "x$with_devkit" != x; then
14735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14736
14737  # Input might be given as Windows format, start by converting to
14738  # unix format.
14739  path="$with_devkit"
14740  new_path=`$CYGPATH -u "$path"`
14741
14742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14745  # "foo.exe" is OK but "foo" is an error.
14746  #
14747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14748  # It is also a way to make sure we got the proper file name for the real test later on.
14749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14750  if test "x$test_shortpath" = x; then
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14752$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14753    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14754  fi
14755
14756  # Call helper function which possibly converts this using DOS-style short mode.
14757  # If so, the updated path is stored in $new_path.
14758
14759  input_path="$new_path"
14760  # Check if we need to convert this using DOS-style short mode. If the path
14761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14762  # take no chances and rewrite it.
14763  # Note: m4 eats our [], so we need to use [ and ] instead.
14764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14765  if test "x$has_forbidden_chars" != x; then
14766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14770      # Going to short mode and back again did indeed matter. Since short mode is
14771      # case insensitive, let's make it lowercase to improve readability.
14772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14773      # Now convert it back to Unix-style (cygpath)
14774      input_path=`$CYGPATH -u "$shortmode_path"`
14775      new_path="$input_path"
14776    fi
14777  fi
14778
14779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14780  if test "x$test_cygdrive_prefix" = x; then
14781    # As a simple fix, exclude /usr/bin since it's not a real path.
14782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14784      # a path prefixed by /cygdrive for fixpath to work.
14785      new_path="$CYGWIN_ROOT_PATH$input_path"
14786    fi
14787  fi
14788
14789
14790  if test "x$path" != "x$new_path"; then
14791    with_devkit="$new_path"
14792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14793$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14794  fi
14795
14796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14797
14798  path="$with_devkit"
14799  has_colon=`$ECHO $path | $GREP ^.:`
14800  new_path="$path"
14801  if test "x$has_colon" = x; then
14802    # Not in mixed or Windows style, start by that.
14803    new_path=`cmd //c echo $path`
14804  fi
14805
14806
14807  input_path="$new_path"
14808  # Check if we need to convert this using DOS-style short mode. If the path
14809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14810  # take no chances and rewrite it.
14811  # Note: m4 eats our [], so we need to use [ and ] instead.
14812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14813  if test "x$has_forbidden_chars" != x; then
14814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14816  fi
14817
14818
14819  windows_path="$new_path"
14820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14821    unix_path=`$CYGPATH -u "$windows_path"`
14822    new_path="$unix_path"
14823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14825    new_path="$unix_path"
14826  fi
14827
14828  if test "x$path" != "x$new_path"; then
14829    with_devkit="$new_path"
14830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14831$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14832  fi
14833
14834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14836
14837    else
14838      # We're on a unix platform. Hooray! :)
14839      path="$with_devkit"
14840      has_space=`$ECHO "$path" | $GREP " "`
14841      if test "x$has_space" != x; then
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14843$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14844        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14845      fi
14846
14847      # Use eval to expand a potential ~
14848      eval path="$path"
14849      if test ! -f "$path" && test ! -d "$path"; then
14850        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14851      fi
14852
14853      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14854    fi
14855  fi
14856
14857        DEVKIT_ROOT="$with_devkit"
14858        # Check for a meta data info file in the root of the devkit
14859        if test -f "$DEVKIT_ROOT/devkit.info"; then
14860          . $DEVKIT_ROOT/devkit.info
14861          # This potentially sets the following:
14862          # A descriptive name of the devkit
14863
14864  if test "x$DEVKIT_NAME" = x; then
14865    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14866  fi
14867
14868          # Corresponds to --with-extra-path
14869
14870  if test "x$DEVKIT_EXTRA_PATH" = x; then
14871    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14872  fi
14873
14874          # Corresponds to --with-toolchain-path
14875
14876  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14877    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14878  fi
14879
14880          # Corresponds to --with-sysroot
14881
14882  if test "x$DEVKIT_SYSROOT" = x; then
14883    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14884  fi
14885
14886
14887          # Identifies the Visual Studio version in the devkit
14888
14889  if test "x$DEVKIT_VS_VERSION" = x; then
14890    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14891  fi
14892
14893          # The Visual Studio include environment variable
14894
14895  if test "x$DEVKIT_VS_INCLUDE" = x; then
14896    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14897  fi
14898
14899          # The Visual Studio lib environment variable
14900
14901  if test "x$DEVKIT_VS_LIB" = x; then
14902    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14903  fi
14904
14905          # Corresponds to --with-msvcr-dll
14906
14907  if test "x$DEVKIT_MSVCR_DLL" = x; then
14908    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14909  fi
14910
14911          # Corresponds to --with-msvcp-dll
14912
14913  if test "x$DEVKIT_MSVCP_DLL" = x; then
14914    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14915  fi
14916
14917        fi
14918
14919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14920$as_echo_n "checking for devkit... " >&6; }
14921        if test "x$DEVKIT_NAME" != x; then
14922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14923$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14924        else
14925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14926$as_echo "$DEVKIT_ROOT" >&6; }
14927        fi
14928
14929
14930  if test "x$DEVKIT_EXTRA_PATH" != x; then
14931    if test "x$EXTRA_PATH" = x; then
14932      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14933    else
14934      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14935    fi
14936  fi
14937
14938
14939        # Fallback default of just /bin if DEVKIT_PATH is not defined
14940        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14941          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14942        fi
14943
14944  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14945    if test "x$TOOLCHAIN_PATH" = x; then
14946      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14947    else
14948      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14949    fi
14950  fi
14951
14952
14953        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14954        # places for backwards compatiblity.
14955        if test "x$DEVKIT_SYSROOT" != x; then
14956          SYSROOT="$DEVKIT_SYSROOT"
14957        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14958          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14959        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14960          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14961        fi
14962
14963
14964fi
14965
14966
14967  # You can force the sysroot if the sysroot encoded into the compiler tools
14968  # is not correct.
14969
14970# Check whether --with-sys-root was given.
14971if test "${with_sys_root+set}" = set; then :
14972  withval=$with_sys_root; SYSROOT=$with_sys_root
14973
14974fi
14975
14976
14977
14978# Check whether --with-sysroot was given.
14979if test "${with_sysroot+set}" = set; then :
14980  withval=$with_sysroot; SYSROOT=$with_sysroot
14981
14982fi
14983
14984
14985
14986# Check whether --with-tools-dir was given.
14987if test "${with_tools_dir+set}" = set; then :
14988  withval=$with_tools_dir;
14989  if test "x$with_tools_dir" != x; then
14990    if test "x$TOOLCHAIN_PATH" = x; then
14991      TOOLCHAIN_PATH="$with_tools_dir"
14992    else
14993      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14994    fi
14995  fi
14996
14997
14998fi
14999
15000
15001
15002# Check whether --with-toolchain-path was given.
15003if test "${with_toolchain_path+set}" = set; then :
15004  withval=$with_toolchain_path;
15005  if test "x$with_toolchain_path" != x; then
15006    if test "x$TOOLCHAIN_PATH" = x; then
15007      TOOLCHAIN_PATH="$with_toolchain_path"
15008    else
15009      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15010    fi
15011  fi
15012
15013
15014fi
15015
15016
15017
15018# Check whether --with-extra-path was given.
15019if test "${with_extra_path+set}" = set; then :
15020  withval=$with_extra_path;
15021  if test "x$with_extra_path" != x; then
15022    if test "x$EXTRA_PATH" = x; then
15023      EXTRA_PATH="$with_extra_path"
15024    else
15025      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15026    fi
15027  fi
15028
15029
15030fi
15031
15032
15033  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15034    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
15035    # If not, detect if Xcode is installed by running xcodebuild -version
15036    # if no Xcode installed, xcodebuild exits with 1
15037    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15038    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15039      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15040      # fall back on the stub binary in /usr/bin/xcodebuild
15041      # Extract the first word of "xcodebuild", so it can be a program name with args.
15042set dummy xcodebuild; ac_word=$2
15043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15044$as_echo_n "checking for $ac_word... " >&6; }
15045if ${ac_cv_path_XCODEBUILD+:} false; then :
15046  $as_echo_n "(cached) " >&6
15047else
15048  case $XCODEBUILD in
15049  [\\/]* | ?:[\\/]*)
15050  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15051  ;;
15052  *)
15053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15054for as_dir in $TOOLCHAIN_PATH
15055do
15056  IFS=$as_save_IFS
15057  test -z "$as_dir" && as_dir=.
15058    for ac_exec_ext in '' $ac_executable_extensions; do
15059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15060    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15062    break 2
15063  fi
15064done
15065  done
15066IFS=$as_save_IFS
15067
15068  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15069  ;;
15070esac
15071fi
15072XCODEBUILD=$ac_cv_path_XCODEBUILD
15073if test -n "$XCODEBUILD"; then
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15075$as_echo "$XCODEBUILD" >&6; }
15076else
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15078$as_echo "no" >&6; }
15079fi
15080
15081
15082    else
15083      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15084      # when only the command line tools are installed there are no SDKs, so headers
15085      # are copied into the system frameworks
15086      XCODEBUILD=
15087
15088    fi
15089
15090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15091$as_echo_n "checking for sdk name... " >&6; }
15092
15093# Check whether --with-sdk-name was given.
15094if test "${with_sdk_name+set}" = set; then :
15095  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15096
15097fi
15098
15099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15100$as_echo "$SDKNAME" >&6; }
15101
15102    # if toolchain path is specified then don't rely on system headers, they may not compile
15103    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15104    test -z "$TOOLCHAIN_PATH" && \
15105      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15106
15107    if test -z "$SYSROOT"; then
15108      if test -n "$XCODEBUILD"; then
15109        # if we don't have system headers, use default SDK name (last resort)
15110        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15111          SDKNAME=${SDKNAME:-macosx}
15112        fi
15113
15114        if test -n "$SDKNAME"; then
15115          # Call xcodebuild to determine SYSROOT
15116          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15117        fi
15118      else
15119        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15120          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
15121        fi
15122      fi
15123    else
15124      # warn user if --with-sdk-name was also set
15125      if test -n "$with_sdk_name"; then
15126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15127$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15128      fi
15129    fi
15130
15131    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15132      # If no system framework headers, then SYSROOT must be set, or we won't build
15133      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
15134    fi
15135
15136    # Perform a basic sanity test
15137    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15138      if test -z "$SYSROOT"; then
15139        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
15140      else
15141        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15142      fi
15143    fi
15144
15145    # set SDKROOT too, Xcode tools will pick it up
15146    SDKROOT=$SYSROOT
15147
15148  fi
15149
15150  # Prepend the extra path to the global path
15151
15152  if test "x$EXTRA_PATH" != x; then
15153    if test "x$PATH" = x; then
15154      PATH="$EXTRA_PATH"
15155    else
15156      PATH="$EXTRA_PATH:$PATH"
15157    fi
15158  fi
15159
15160
15161  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15162    # Add extra search paths on solaris for utilities like ar and as etc...
15163    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15164  fi
15165
15166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15167$as_echo_n "checking for sysroot... " >&6; }
15168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15169$as_echo "$SYSROOT" >&6; }
15170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15171$as_echo_n "checking for toolchain path... " >&6; }
15172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15173$as_echo "$TOOLCHAIN_PATH" >&6; }
15174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15175$as_echo_n "checking for extra path... " >&6; }
15176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15177$as_echo "$EXTRA_PATH" >&6; }
15178
15179
15180# To properly create a configuration name, we need to have the OpenJDK target
15181# and options (variants and debug level) parsed.
15182
15183
15184
15185# Check whether --with-conf-name was given.
15186if test "${with_conf_name+set}" = set; then :
15187  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15188fi
15189
15190
15191  # Test from where we are running configure, in or outside of src root.
15192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15193$as_echo_n "checking where to store configuration... " >&6; }
15194  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15195      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15196      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15197    # We are running configure from the src root.
15198    # Create a default ./build/target-variant-debuglevel output root.
15199    if test "x${CONF_NAME}" = x; then
15200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15201$as_echo "in default location" >&6; }
15202      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15203    else
15204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15205$as_echo "in build directory with custom name" >&6; }
15206    fi
15207    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15208    $MKDIR -p "$OUTPUT_ROOT"
15209    if test ! -d "$OUTPUT_ROOT"; then
15210      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15211    fi
15212  else
15213    # We are running configure from outside of the src dir.
15214    # Then use the current directory as output dir!
15215    # If configuration is situated in normal build directory, just use the build
15216    # directory name as configuration name, otherwise use the complete path.
15217    if test "x${CONF_NAME}" = x; then
15218      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15219    fi
15220    OUTPUT_ROOT="$CURDIR"
15221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15222$as_echo "in current directory" >&6; }
15223
15224    # WARNING: This might be a bad thing to do. You need to be sure you want to
15225    # have a configuration in this directory. Do some sanity checks!
15226
15227    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15228      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15229      # other files
15230      files_present=`$LS $OUTPUT_ROOT`
15231      # Configure has already touched config.log and confdefs.h in the current dir when this check
15232      # is performed.
15233      filtered_files=`$ECHO "$files_present" \
15234          | $SED -e 's/config.log//g' \
15235              -e 's/configure.log//g' \
15236              -e 's/confdefs.h//g' \
15237              -e 's/ //g' \
15238          | $TR -d '\n'`
15239      if test "x$filtered_files" != x; then
15240        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15241$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15242        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15243$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15244        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15245$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15246        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15247$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15248        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15249$as_echo "$as_me: seriously mess up just about everything." >&6;}
15250        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15251$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15252        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15253$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15254        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15255      fi
15256    fi
15257  fi
15258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15259$as_echo_n "checking what configuration name to use... " >&6; }
15260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15261$as_echo "$CONF_NAME" >&6; }
15262
15263
15264  # Only process if variable expands to non-empty
15265
15266  if test "x$OUTPUT_ROOT" != x; then
15267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15268
15269  # Input might be given as Windows format, start by converting to
15270  # unix format.
15271  path="$OUTPUT_ROOT"
15272  new_path=`$CYGPATH -u "$path"`
15273
15274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15277  # "foo.exe" is OK but "foo" is an error.
15278  #
15279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15280  # It is also a way to make sure we got the proper file name for the real test later on.
15281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15282  if test "x$test_shortpath" = x; then
15283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15284$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15285    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15286  fi
15287
15288  # Call helper function which possibly converts this using DOS-style short mode.
15289  # If so, the updated path is stored in $new_path.
15290
15291  input_path="$new_path"
15292  # Check if we need to convert this using DOS-style short mode. If the path
15293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15294  # take no chances and rewrite it.
15295  # Note: m4 eats our [], so we need to use [ and ] instead.
15296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15297  if test "x$has_forbidden_chars" != x; then
15298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15302      # Going to short mode and back again did indeed matter. Since short mode is
15303      # case insensitive, let's make it lowercase to improve readability.
15304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15305      # Now convert it back to Unix-style (cygpath)
15306      input_path=`$CYGPATH -u "$shortmode_path"`
15307      new_path="$input_path"
15308    fi
15309  fi
15310
15311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15312  if test "x$test_cygdrive_prefix" = x; then
15313    # As a simple fix, exclude /usr/bin since it's not a real path.
15314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15316      # a path prefixed by /cygdrive for fixpath to work.
15317      new_path="$CYGWIN_ROOT_PATH$input_path"
15318    fi
15319  fi
15320
15321
15322  if test "x$path" != "x$new_path"; then
15323    OUTPUT_ROOT="$new_path"
15324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15325$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15326  fi
15327
15328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15329
15330  path="$OUTPUT_ROOT"
15331  has_colon=`$ECHO $path | $GREP ^.:`
15332  new_path="$path"
15333  if test "x$has_colon" = x; then
15334    # Not in mixed or Windows style, start by that.
15335    new_path=`cmd //c echo $path`
15336  fi
15337
15338
15339  input_path="$new_path"
15340  # Check if we need to convert this using DOS-style short mode. If the path
15341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15342  # take no chances and rewrite it.
15343  # Note: m4 eats our [], so we need to use [ and ] instead.
15344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15345  if test "x$has_forbidden_chars" != x; then
15346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15348  fi
15349
15350
15351  windows_path="$new_path"
15352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15353    unix_path=`$CYGPATH -u "$windows_path"`
15354    new_path="$unix_path"
15355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15357    new_path="$unix_path"
15358  fi
15359
15360  if test "x$path" != "x$new_path"; then
15361    OUTPUT_ROOT="$new_path"
15362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15363$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15364  fi
15365
15366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15368
15369    else
15370      # We're on a unix platform. Hooray! :)
15371      path="$OUTPUT_ROOT"
15372      has_space=`$ECHO "$path" | $GREP " "`
15373      if test "x$has_space" != x; then
15374        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15375$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15376        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15377      fi
15378
15379      # Use eval to expand a potential ~
15380      eval path="$path"
15381      if test ! -f "$path" && test ! -d "$path"; then
15382        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15383      fi
15384
15385      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15386    fi
15387  fi
15388
15389
15390  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15391  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15392
15393  SPEC=$OUTPUT_ROOT/spec.gmk
15394
15395  CONF_NAME=$CONF_NAME
15396
15397  OUTPUT_ROOT=$OUTPUT_ROOT
15398
15399
15400
15401  # The spec.gmk file contains all variables for the make system.
15402  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15403
15404  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15405  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15406
15407  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15408  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15409
15410  # The compare.sh is used to compare the build output to other builds.
15411  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15412
15413  # The generated Makefile knows where the spec.gmk is and where the source is.
15414  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15415  # which will look for generated configurations
15416  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15417
15418
15419
15420# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15421
15422  for ac_prog in apt-get yum port pkgutil pkgadd
15423do
15424  # Extract the first word of "$ac_prog", so it can be a program name with args.
15425set dummy $ac_prog; ac_word=$2
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15427$as_echo_n "checking for $ac_word... " >&6; }
15428if ${ac_cv_prog_PKGHANDLER+:} false; then :
15429  $as_echo_n "(cached) " >&6
15430else
15431  if test -n "$PKGHANDLER"; then
15432  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15433else
15434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15435for as_dir in $PATH
15436do
15437  IFS=$as_save_IFS
15438  test -z "$as_dir" && as_dir=.
15439    for ac_exec_ext in '' $ac_executable_extensions; do
15440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15441    ac_cv_prog_PKGHANDLER="$ac_prog"
15442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15443    break 2
15444  fi
15445done
15446  done
15447IFS=$as_save_IFS
15448
15449fi
15450fi
15451PKGHANDLER=$ac_cv_prog_PKGHANDLER
15452if test -n "$PKGHANDLER"; then
15453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15454$as_echo "$PKGHANDLER" >&6; }
15455else
15456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15457$as_echo "no" >&6; }
15458fi
15459
15460
15461  test -n "$PKGHANDLER" && break
15462done
15463
15464
15465
15466# Setup tools that requires more complex handling, or that is not needed by the configure script.
15467
15468
15469  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15470  if test "x$MAKE" != x; then
15471    # User has supplied a make, test it.
15472    if test ! -f "$MAKE"; then
15473      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15474    fi
15475
15476  MAKE_CANDIDATE=""$MAKE""
15477  DESCRIPTION="user supplied MAKE=$MAKE"
15478
15479  # On Cygwin, we require a newer version of make than on other platforms
15480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15481    MAKE_VERSION_EXPR="-e 4\."
15482    MAKE_REQUIRED_VERSION="4.0"
15483   else
15484    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15485    MAKE_REQUIRED_VERSION="3.81"
15486  fi
15487
15488  if test "x$MAKE_CANDIDATE" != x; then
15489    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15490$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15491    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15492    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15493    if test "x$IS_GNU_MAKE" = x; then
15494      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15495$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15496    else
15497      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15498      if test "x$IS_MODERN_MAKE" = x; then
15499        { $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
15500$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;}
15501      else
15502        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15503          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15504            MAKE_EXPECTED_ENV='cygwin'
15505          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15506            MAKE_EXPECTED_ENV='msys'
15507          else
15508            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15509          fi
15510          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15511          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15512        else
15513          # Not relevant for non-Windows
15514          IS_MAKE_CORRECT_ENV=true
15515        fi
15516        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15517          { $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
15518$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;}
15519        else
15520          FOUND_MAKE=$MAKE_CANDIDATE
15521
15522  # Only process if variable expands to non-empty
15523
15524  if test "x$FOUND_MAKE" != x; then
15525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15526
15527  # First separate the path from the arguments. This will split at the first
15528  # space.
15529  complete="$FOUND_MAKE"
15530  path="${complete%% *}"
15531  tmp="$complete EOL"
15532  arguments="${tmp#* }"
15533
15534  # Input might be given as Windows format, start by converting to
15535  # unix format.
15536  new_path=`$CYGPATH -u "$path"`
15537
15538  # Now try to locate executable using which
15539  new_path=`$WHICH "$new_path" 2> /dev/null`
15540  # bat and cmd files are not always considered executable in cygwin causing which
15541  # to not find them
15542  if test "x$new_path" = x \
15543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15545    new_path=`$CYGPATH -u "$path"`
15546  fi
15547  if test "x$new_path" = x; then
15548    # Oops. Which didn't find the executable.
15549    # The splitting of arguments from the executable at a space might have been incorrect,
15550    # since paths with space are more likely in Windows. Give it another try with the whole
15551    # argument.
15552    path="$complete"
15553    arguments="EOL"
15554    new_path=`$CYGPATH -u "$path"`
15555    new_path=`$WHICH "$new_path" 2> /dev/null`
15556    # bat and cmd files are not always considered executable in cygwin causing which
15557    # to not find them
15558    if test "x$new_path" = x \
15559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15561      new_path=`$CYGPATH -u "$path"`
15562    fi
15563    if test "x$new_path" = x; then
15564      # It's still not found. Now this is an unrecoverable error.
15565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15566$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15567      has_space=`$ECHO "$complete" | $GREP " "`
15568      if test "x$has_space" != x; then
15569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15571      fi
15572      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15573    fi
15574  fi
15575
15576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15579  # "foo.exe" is OK but "foo" is an error.
15580  #
15581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15582  # It is also a way to make sure we got the proper file name for the real test later on.
15583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15584  if test "x$test_shortpath" = x; then
15585    # Short path failed, file does not exist as specified.
15586    # Try adding .exe or .cmd
15587    if test -f "${new_path}.exe"; then
15588      input_to_shortpath="${new_path}.exe"
15589    elif test -f "${new_path}.cmd"; then
15590      input_to_shortpath="${new_path}.cmd"
15591    else
15592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15597    fi
15598  else
15599    input_to_shortpath="$new_path"
15600  fi
15601
15602  # Call helper function which possibly converts this using DOS-style short mode.
15603  # If so, the updated path is stored in $new_path.
15604  new_path="$input_to_shortpath"
15605
15606  input_path="$input_to_shortpath"
15607  # Check if we need to convert this using DOS-style short mode. If the path
15608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15609  # take no chances and rewrite it.
15610  # Note: m4 eats our [], so we need to use [ and ] instead.
15611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15612  if test "x$has_forbidden_chars" != x; then
15613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15617      # Going to short mode and back again did indeed matter. Since short mode is
15618      # case insensitive, let's make it lowercase to improve readability.
15619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15620      # Now convert it back to Unix-style (cygpath)
15621      input_path=`$CYGPATH -u "$shortmode_path"`
15622      new_path="$input_path"
15623    fi
15624  fi
15625
15626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15627  if test "x$test_cygdrive_prefix" = x; then
15628    # As a simple fix, exclude /usr/bin since it's not a real path.
15629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15631      # a path prefixed by /cygdrive for fixpath to work.
15632      new_path="$CYGWIN_ROOT_PATH$input_path"
15633    fi
15634  fi
15635
15636  # remove trailing .exe if any
15637  new_path="${new_path/%.exe/}"
15638
15639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15640
15641  # First separate the path from the arguments. This will split at the first
15642  # space.
15643  complete="$FOUND_MAKE"
15644  path="${complete%% *}"
15645  tmp="$complete EOL"
15646  arguments="${tmp#* }"
15647
15648  # Input might be given as Windows format, start by converting to
15649  # unix format.
15650  new_path="$path"
15651
15652  windows_path="$new_path"
15653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15654    unix_path=`$CYGPATH -u "$windows_path"`
15655    new_path="$unix_path"
15656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15658    new_path="$unix_path"
15659  fi
15660
15661
15662  # Now try to locate executable using which
15663  new_path=`$WHICH "$new_path" 2> /dev/null`
15664
15665  if test "x$new_path" = x; then
15666    # Oops. Which didn't find the executable.
15667    # The splitting of arguments from the executable at a space might have been incorrect,
15668    # since paths with space are more likely in Windows. Give it another try with the whole
15669    # argument.
15670    path="$complete"
15671    arguments="EOL"
15672    new_path="$path"
15673
15674  windows_path="$new_path"
15675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15676    unix_path=`$CYGPATH -u "$windows_path"`
15677    new_path="$unix_path"
15678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15680    new_path="$unix_path"
15681  fi
15682
15683
15684    new_path=`$WHICH "$new_path" 2> /dev/null`
15685    # bat and cmd files are not always considered executable in MSYS causing which
15686    # to not find them
15687    if test "x$new_path" = x \
15688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15690      new_path="$path"
15691
15692  windows_path="$new_path"
15693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15694    unix_path=`$CYGPATH -u "$windows_path"`
15695    new_path="$unix_path"
15696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15698    new_path="$unix_path"
15699  fi
15700
15701    fi
15702
15703    if test "x$new_path" = x; then
15704      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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 new_path has a complete unix path to the binary
15717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15718    # Keep paths in /bin as-is, but remove trailing .exe if any
15719    new_path="${new_path/%.exe/}"
15720    # Do not save /bin paths to all_fixpath_prefixes!
15721  else
15722    # Not in mixed or Windows style, start by that.
15723    new_path=`cmd //c echo $new_path`
15724
15725  input_path="$new_path"
15726  # Check if we need to convert this using DOS-style short mode. If the path
15727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15728  # take no chances and rewrite it.
15729  # Note: m4 eats our [], so we need to use [ and ] instead.
15730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15731  if test "x$has_forbidden_chars" != x; then
15732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15734  fi
15735
15736    # Output is in $new_path
15737
15738  windows_path="$new_path"
15739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15740    unix_path=`$CYGPATH -u "$windows_path"`
15741    new_path="$unix_path"
15742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15744    new_path="$unix_path"
15745  fi
15746
15747    # remove trailing .exe if any
15748    new_path="${new_path/%.exe/}"
15749
15750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15752  fi
15753
15754    else
15755      # We're on a unix platform. Hooray! :)
15756      # First separate the path from the arguments. This will split at the first
15757      # space.
15758      complete="$FOUND_MAKE"
15759      path="${complete%% *}"
15760      tmp="$complete EOL"
15761      arguments="${tmp#* }"
15762
15763      # Cannot rely on the command "which" here since it doesn't always work.
15764      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15765      if test -z "$is_absolute_path"; then
15766        # Path to executable is not absolute. Find it.
15767        IFS_save="$IFS"
15768        IFS=:
15769        for p in $PATH; do
15770          if test -f "$p/$path" && test -x "$p/$path"; then
15771            new_path="$p/$path"
15772            break
15773          fi
15774        done
15775        IFS="$IFS_save"
15776      else
15777        # This is an absolute path, we can use it without further modifications.
15778        new_path="$path"
15779      fi
15780
15781      if test "x$new_path" = x; then
15782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15783$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15784        has_space=`$ECHO "$complete" | $GREP " "`
15785        if test "x$has_space" != x; then
15786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15788        fi
15789        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15790      fi
15791    fi
15792
15793    # Now join together the path and the arguments once again
15794    if test "x$arguments" != xEOL; then
15795      new_complete="$new_path ${arguments% *}"
15796    else
15797      new_complete="$new_path"
15798    fi
15799
15800    if test "x$complete" != "x$new_complete"; then
15801      FOUND_MAKE="$new_complete"
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15803$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15804    fi
15805  fi
15806
15807        fi
15808      fi
15809    fi
15810  fi
15811
15812    if test "x$FOUND_MAKE" = x; then
15813      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15814    fi
15815  else
15816    # Try our hardest to locate a correct version of GNU make
15817    for ac_prog in gmake
15818do
15819  # Extract the first word of "$ac_prog", so it can be a program name with args.
15820set dummy $ac_prog; ac_word=$2
15821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15822$as_echo_n "checking for $ac_word... " >&6; }
15823if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15824  $as_echo_n "(cached) " >&6
15825else
15826  case $CHECK_GMAKE in
15827  [\\/]* | ?:[\\/]*)
15828  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15829  ;;
15830  *)
15831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15832for as_dir in $PATH
15833do
15834  IFS=$as_save_IFS
15835  test -z "$as_dir" && as_dir=.
15836    for ac_exec_ext in '' $ac_executable_extensions; do
15837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15838    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15840    break 2
15841  fi
15842done
15843  done
15844IFS=$as_save_IFS
15845
15846  ;;
15847esac
15848fi
15849CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15850if test -n "$CHECK_GMAKE"; then
15851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15852$as_echo "$CHECK_GMAKE" >&6; }
15853else
15854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15855$as_echo "no" >&6; }
15856fi
15857
15858
15859  test -n "$CHECK_GMAKE" && break
15860done
15861
15862
15863  MAKE_CANDIDATE=""$CHECK_GMAKE""
15864  DESCRIPTION="gmake in PATH"
15865
15866  # On Cygwin, we require a newer version of make than on other platforms
15867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15868    MAKE_VERSION_EXPR="-e 4\."
15869    MAKE_REQUIRED_VERSION="4.0"
15870   else
15871    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15872    MAKE_REQUIRED_VERSION="3.81"
15873  fi
15874
15875  if test "x$MAKE_CANDIDATE" != x; then
15876    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15877$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15878    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15879    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15880    if test "x$IS_GNU_MAKE" = x; then
15881      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15882$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15883    else
15884      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15885      if test "x$IS_MODERN_MAKE" = x; then
15886        { $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
15887$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;}
15888      else
15889        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15890          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15891            MAKE_EXPECTED_ENV='cygwin'
15892          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15893            MAKE_EXPECTED_ENV='msys'
15894          else
15895            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15896          fi
15897          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15898          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15899        else
15900          # Not relevant for non-Windows
15901          IS_MAKE_CORRECT_ENV=true
15902        fi
15903        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15904          { $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
15905$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;}
15906        else
15907          FOUND_MAKE=$MAKE_CANDIDATE
15908
15909  # Only process if variable expands to non-empty
15910
15911  if test "x$FOUND_MAKE" != x; then
15912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15913
15914  # First separate the path from the arguments. This will split at the first
15915  # space.
15916  complete="$FOUND_MAKE"
15917  path="${complete%% *}"
15918  tmp="$complete EOL"
15919  arguments="${tmp#* }"
15920
15921  # Input might be given as Windows format, start by converting to
15922  # unix format.
15923  new_path=`$CYGPATH -u "$path"`
15924
15925  # Now try to locate executable using which
15926  new_path=`$WHICH "$new_path" 2> /dev/null`
15927  # bat and cmd files are not always considered executable in cygwin causing which
15928  # to not find them
15929  if test "x$new_path" = x \
15930      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15931      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15932    new_path=`$CYGPATH -u "$path"`
15933  fi
15934  if test "x$new_path" = x; then
15935    # Oops. Which didn't find the executable.
15936    # The splitting of arguments from the executable at a space might have been incorrect,
15937    # since paths with space are more likely in Windows. Give it another try with the whole
15938    # argument.
15939    path="$complete"
15940    arguments="EOL"
15941    new_path=`$CYGPATH -u "$path"`
15942    new_path=`$WHICH "$new_path" 2> /dev/null`
15943    # bat and cmd files are not always considered executable in cygwin causing which
15944    # to not find them
15945    if test "x$new_path" = x \
15946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15948      new_path=`$CYGPATH -u "$path"`
15949    fi
15950    if test "x$new_path" = x; then
15951      # It's still not found. Now this is an unrecoverable error.
15952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15953$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15954      has_space=`$ECHO "$complete" | $GREP " "`
15955      if test "x$has_space" != x; then
15956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15958      fi
15959      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15960    fi
15961  fi
15962
15963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15966  # "foo.exe" is OK but "foo" is an error.
15967  #
15968  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15969  # It is also a way to make sure we got the proper file name for the real test later on.
15970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15971  if test "x$test_shortpath" = x; then
15972    # Short path failed, file does not exist as specified.
15973    # Try adding .exe or .cmd
15974    if test -f "${new_path}.exe"; then
15975      input_to_shortpath="${new_path}.exe"
15976    elif test -f "${new_path}.cmd"; then
15977      input_to_shortpath="${new_path}.cmd"
15978    else
15979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15980$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15981      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15982$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15984    fi
15985  else
15986    input_to_shortpath="$new_path"
15987  fi
15988
15989  # Call helper function which possibly converts this using DOS-style short mode.
15990  # If so, the updated path is stored in $new_path.
15991  new_path="$input_to_shortpath"
15992
15993  input_path="$input_to_shortpath"
15994  # Check if we need to convert this using DOS-style short mode. If the path
15995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15996  # take no chances and rewrite it.
15997  # Note: m4 eats our [], so we need to use [ and ] instead.
15998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15999  if test "x$has_forbidden_chars" != x; then
16000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16004      # Going to short mode and back again did indeed matter. Since short mode is
16005      # case insensitive, let's make it lowercase to improve readability.
16006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16007      # Now convert it back to Unix-style (cygpath)
16008      input_path=`$CYGPATH -u "$shortmode_path"`
16009      new_path="$input_path"
16010    fi
16011  fi
16012
16013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16014  if test "x$test_cygdrive_prefix" = x; then
16015    # As a simple fix, exclude /usr/bin since it's not a real path.
16016    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16018      # a path prefixed by /cygdrive for fixpath to work.
16019      new_path="$CYGWIN_ROOT_PATH$input_path"
16020    fi
16021  fi
16022
16023  # remove trailing .exe if any
16024  new_path="${new_path/%.exe/}"
16025
16026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16027
16028  # First separate the path from the arguments. This will split at the first
16029  # space.
16030  complete="$FOUND_MAKE"
16031  path="${complete%% *}"
16032  tmp="$complete EOL"
16033  arguments="${tmp#* }"
16034
16035  # Input might be given as Windows format, start by converting to
16036  # unix format.
16037  new_path="$path"
16038
16039  windows_path="$new_path"
16040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16041    unix_path=`$CYGPATH -u "$windows_path"`
16042    new_path="$unix_path"
16043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16045    new_path="$unix_path"
16046  fi
16047
16048
16049  # Now try to locate executable using which
16050  new_path=`$WHICH "$new_path" 2> /dev/null`
16051
16052  if test "x$new_path" = x; then
16053    # Oops. Which didn't find the executable.
16054    # The splitting of arguments from the executable at a space might have been incorrect,
16055    # since paths with space are more likely in Windows. Give it another try with the whole
16056    # argument.
16057    path="$complete"
16058    arguments="EOL"
16059    new_path="$path"
16060
16061  windows_path="$new_path"
16062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16063    unix_path=`$CYGPATH -u "$windows_path"`
16064    new_path="$unix_path"
16065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16067    new_path="$unix_path"
16068  fi
16069
16070
16071    new_path=`$WHICH "$new_path" 2> /dev/null`
16072    # bat and cmd files are not always considered executable in MSYS causing which
16073    # to not find them
16074    if test "x$new_path" = x \
16075        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16076        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16077      new_path="$path"
16078
16079  windows_path="$new_path"
16080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16081    unix_path=`$CYGPATH -u "$windows_path"`
16082    new_path="$unix_path"
16083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16085    new_path="$unix_path"
16086  fi
16087
16088    fi
16089
16090    if test "x$new_path" = x; then
16091      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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 new_path has a complete unix path to the binary
16104  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16105    # Keep paths in /bin as-is, but remove trailing .exe if any
16106    new_path="${new_path/%.exe/}"
16107    # Do not save /bin paths to all_fixpath_prefixes!
16108  else
16109    # Not in mixed or Windows style, start by that.
16110    new_path=`cmd //c echo $new_path`
16111
16112  input_path="$new_path"
16113  # Check if we need to convert this using DOS-style short mode. If the path
16114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16115  # take no chances and rewrite it.
16116  # Note: m4 eats our [], so we need to use [ and ] instead.
16117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16118  if test "x$has_forbidden_chars" != x; then
16119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16121  fi
16122
16123    # Output is in $new_path
16124
16125  windows_path="$new_path"
16126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16127    unix_path=`$CYGPATH -u "$windows_path"`
16128    new_path="$unix_path"
16129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16131    new_path="$unix_path"
16132  fi
16133
16134    # remove trailing .exe if any
16135    new_path="${new_path/%.exe/}"
16136
16137    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16138    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16139  fi
16140
16141    else
16142      # We're on a unix platform. Hooray! :)
16143      # First separate the path from the arguments. This will split at the first
16144      # space.
16145      complete="$FOUND_MAKE"
16146      path="${complete%% *}"
16147      tmp="$complete EOL"
16148      arguments="${tmp#* }"
16149
16150      # Cannot rely on the command "which" here since it doesn't always work.
16151      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16152      if test -z "$is_absolute_path"; then
16153        # Path to executable is not absolute. Find it.
16154        IFS_save="$IFS"
16155        IFS=:
16156        for p in $PATH; do
16157          if test -f "$p/$path" && test -x "$p/$path"; then
16158            new_path="$p/$path"
16159            break
16160          fi
16161        done
16162        IFS="$IFS_save"
16163      else
16164        # This is an absolute path, we can use it without further modifications.
16165        new_path="$path"
16166      fi
16167
16168      if test "x$new_path" = x; then
16169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16170$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16171        has_space=`$ECHO "$complete" | $GREP " "`
16172        if test "x$has_space" != x; then
16173          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16174$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16175        fi
16176        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16177      fi
16178    fi
16179
16180    # Now join together the path and the arguments once again
16181    if test "x$arguments" != xEOL; then
16182      new_complete="$new_path ${arguments% *}"
16183    else
16184      new_complete="$new_path"
16185    fi
16186
16187    if test "x$complete" != "x$new_complete"; then
16188      FOUND_MAKE="$new_complete"
16189      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16190$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16191    fi
16192  fi
16193
16194        fi
16195      fi
16196    fi
16197  fi
16198
16199
16200    if test "x$FOUND_MAKE" = x; then
16201      for ac_prog in make
16202do
16203  # Extract the first word of "$ac_prog", so it can be a program name with args.
16204set dummy $ac_prog; ac_word=$2
16205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16206$as_echo_n "checking for $ac_word... " >&6; }
16207if ${ac_cv_path_CHECK_MAKE+:} false; then :
16208  $as_echo_n "(cached) " >&6
16209else
16210  case $CHECK_MAKE in
16211  [\\/]* | ?:[\\/]*)
16212  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16213  ;;
16214  *)
16215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16216for as_dir in $PATH
16217do
16218  IFS=$as_save_IFS
16219  test -z "$as_dir" && as_dir=.
16220    for ac_exec_ext in '' $ac_executable_extensions; do
16221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16222    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16224    break 2
16225  fi
16226done
16227  done
16228IFS=$as_save_IFS
16229
16230  ;;
16231esac
16232fi
16233CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16234if test -n "$CHECK_MAKE"; then
16235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16236$as_echo "$CHECK_MAKE" >&6; }
16237else
16238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16239$as_echo "no" >&6; }
16240fi
16241
16242
16243  test -n "$CHECK_MAKE" && break
16244done
16245
16246
16247  MAKE_CANDIDATE=""$CHECK_MAKE""
16248  DESCRIPTION="make in PATH"
16249
16250  # On Cygwin, we require a newer version of make than on other platforms
16251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16252    MAKE_VERSION_EXPR="-e 4\."
16253    MAKE_REQUIRED_VERSION="4.0"
16254   else
16255    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16256    MAKE_REQUIRED_VERSION="3.81"
16257  fi
16258
16259  if test "x$MAKE_CANDIDATE" != x; then
16260    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16261$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16262    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16263    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16264    if test "x$IS_GNU_MAKE" = x; then
16265      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16266$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16267    else
16268      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16269      if test "x$IS_MODERN_MAKE" = x; then
16270        { $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
16271$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;}
16272      else
16273        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16274          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16275            MAKE_EXPECTED_ENV='cygwin'
16276          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16277            MAKE_EXPECTED_ENV='msys'
16278          else
16279            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16280          fi
16281          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16282          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16283        else
16284          # Not relevant for non-Windows
16285          IS_MAKE_CORRECT_ENV=true
16286        fi
16287        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16288          { $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
16289$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;}
16290        else
16291          FOUND_MAKE=$MAKE_CANDIDATE
16292
16293  # Only process if variable expands to non-empty
16294
16295  if test "x$FOUND_MAKE" != x; then
16296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16297
16298  # First separate the path from the arguments. This will split at the first
16299  # space.
16300  complete="$FOUND_MAKE"
16301  path="${complete%% *}"
16302  tmp="$complete EOL"
16303  arguments="${tmp#* }"
16304
16305  # Input might be given as Windows format, start by converting to
16306  # unix format.
16307  new_path=`$CYGPATH -u "$path"`
16308
16309  # Now try to locate executable using which
16310  new_path=`$WHICH "$new_path" 2> /dev/null`
16311  # bat and cmd files are not always considered executable in cygwin causing which
16312  # to not find them
16313  if test "x$new_path" = x \
16314      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16315      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16316    new_path=`$CYGPATH -u "$path"`
16317  fi
16318  if test "x$new_path" = x; then
16319    # Oops. Which didn't find the executable.
16320    # The splitting of arguments from the executable at a space might have been incorrect,
16321    # since paths with space are more likely in Windows. Give it another try with the whole
16322    # argument.
16323    path="$complete"
16324    arguments="EOL"
16325    new_path=`$CYGPATH -u "$path"`
16326    new_path=`$WHICH "$new_path" 2> /dev/null`
16327    # bat and cmd files are not always considered executable in cygwin causing which
16328    # to not find them
16329    if test "x$new_path" = x \
16330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16332      new_path=`$CYGPATH -u "$path"`
16333    fi
16334    if test "x$new_path" = x; then
16335      # It's still not found. Now this is an unrecoverable error.
16336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16337$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16338      has_space=`$ECHO "$complete" | $GREP " "`
16339      if test "x$has_space" != x; then
16340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16342      fi
16343      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16344    fi
16345  fi
16346
16347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16350  # "foo.exe" is OK but "foo" is an error.
16351  #
16352  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16353  # It is also a way to make sure we got the proper file name for the real test later on.
16354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16355  if test "x$test_shortpath" = x; then
16356    # Short path failed, file does not exist as specified.
16357    # Try adding .exe or .cmd
16358    if test -f "${new_path}.exe"; then
16359      input_to_shortpath="${new_path}.exe"
16360    elif test -f "${new_path}.cmd"; then
16361      input_to_shortpath="${new_path}.cmd"
16362    else
16363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16364$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16365      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16366$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16367      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16368    fi
16369  else
16370    input_to_shortpath="$new_path"
16371  fi
16372
16373  # Call helper function which possibly converts this using DOS-style short mode.
16374  # If so, the updated path is stored in $new_path.
16375  new_path="$input_to_shortpath"
16376
16377  input_path="$input_to_shortpath"
16378  # Check if we need to convert this using DOS-style short mode. If the path
16379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16380  # take no chances and rewrite it.
16381  # Note: m4 eats our [], so we need to use [ and ] instead.
16382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16383  if test "x$has_forbidden_chars" != x; then
16384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16388      # Going to short mode and back again did indeed matter. Since short mode is
16389      # case insensitive, let's make it lowercase to improve readability.
16390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16391      # Now convert it back to Unix-style (cygpath)
16392      input_path=`$CYGPATH -u "$shortmode_path"`
16393      new_path="$input_path"
16394    fi
16395  fi
16396
16397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16398  if test "x$test_cygdrive_prefix" = x; then
16399    # As a simple fix, exclude /usr/bin since it's not a real path.
16400    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16402      # a path prefixed by /cygdrive for fixpath to work.
16403      new_path="$CYGWIN_ROOT_PATH$input_path"
16404    fi
16405  fi
16406
16407  # remove trailing .exe if any
16408  new_path="${new_path/%.exe/}"
16409
16410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16411
16412  # First separate the path from the arguments. This will split at the first
16413  # space.
16414  complete="$FOUND_MAKE"
16415  path="${complete%% *}"
16416  tmp="$complete EOL"
16417  arguments="${tmp#* }"
16418
16419  # Input might be given as Windows format, start by converting to
16420  # unix format.
16421  new_path="$path"
16422
16423  windows_path="$new_path"
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425    unix_path=`$CYGPATH -u "$windows_path"`
16426    new_path="$unix_path"
16427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16429    new_path="$unix_path"
16430  fi
16431
16432
16433  # Now try to locate executable using which
16434  new_path=`$WHICH "$new_path" 2> /dev/null`
16435
16436  if test "x$new_path" = x; then
16437    # Oops. Which didn't find the executable.
16438    # The splitting of arguments from the executable at a space might have been incorrect,
16439    # since paths with space are more likely in Windows. Give it another try with the whole
16440    # argument.
16441    path="$complete"
16442    arguments="EOL"
16443    new_path="$path"
16444
16445  windows_path="$new_path"
16446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16447    unix_path=`$CYGPATH -u "$windows_path"`
16448    new_path="$unix_path"
16449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16451    new_path="$unix_path"
16452  fi
16453
16454
16455    new_path=`$WHICH "$new_path" 2> /dev/null`
16456    # bat and cmd files are not always considered executable in MSYS causing which
16457    # to not find them
16458    if test "x$new_path" = x \
16459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16461      new_path="$path"
16462
16463  windows_path="$new_path"
16464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16465    unix_path=`$CYGPATH -u "$windows_path"`
16466    new_path="$unix_path"
16467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16469    new_path="$unix_path"
16470  fi
16471
16472    fi
16473
16474    if test "x$new_path" = x; then
16475      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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 new_path has a complete unix path to the binary
16488  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16489    # Keep paths in /bin as-is, but remove trailing .exe if any
16490    new_path="${new_path/%.exe/}"
16491    # Do not save /bin paths to all_fixpath_prefixes!
16492  else
16493    # Not in mixed or Windows style, start by that.
16494    new_path=`cmd //c echo $new_path`
16495
16496  input_path="$new_path"
16497  # Check if we need to convert this using DOS-style short mode. If the path
16498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16499  # take no chances and rewrite it.
16500  # Note: m4 eats our [], so we need to use [ and ] instead.
16501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16502  if test "x$has_forbidden_chars" != x; then
16503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16505  fi
16506
16507    # Output is in $new_path
16508
16509  windows_path="$new_path"
16510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16511    unix_path=`$CYGPATH -u "$windows_path"`
16512    new_path="$unix_path"
16513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16515    new_path="$unix_path"
16516  fi
16517
16518    # remove trailing .exe if any
16519    new_path="${new_path/%.exe/}"
16520
16521    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16522    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16523  fi
16524
16525    else
16526      # We're on a unix platform. Hooray! :)
16527      # First separate the path from the arguments. This will split at the first
16528      # space.
16529      complete="$FOUND_MAKE"
16530      path="${complete%% *}"
16531      tmp="$complete EOL"
16532      arguments="${tmp#* }"
16533
16534      # Cannot rely on the command "which" here since it doesn't always work.
16535      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16536      if test -z "$is_absolute_path"; then
16537        # Path to executable is not absolute. Find it.
16538        IFS_save="$IFS"
16539        IFS=:
16540        for p in $PATH; do
16541          if test -f "$p/$path" && test -x "$p/$path"; then
16542            new_path="$p/$path"
16543            break
16544          fi
16545        done
16546        IFS="$IFS_save"
16547      else
16548        # This is an absolute path, we can use it without further modifications.
16549        new_path="$path"
16550      fi
16551
16552      if test "x$new_path" = x; then
16553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16554$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16555        has_space=`$ECHO "$complete" | $GREP " "`
16556        if test "x$has_space" != x; then
16557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16559        fi
16560        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16561      fi
16562    fi
16563
16564    # Now join together the path and the arguments once again
16565    if test "x$arguments" != xEOL; then
16566      new_complete="$new_path ${arguments% *}"
16567    else
16568      new_complete="$new_path"
16569    fi
16570
16571    if test "x$complete" != "x$new_complete"; then
16572      FOUND_MAKE="$new_complete"
16573      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16574$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16575    fi
16576  fi
16577
16578        fi
16579      fi
16580    fi
16581  fi
16582
16583    fi
16584
16585    if test "x$FOUND_MAKE" = x; then
16586      if test "x$TOOLCHAIN_PATH" != x; then
16587        # We have a toolchain path, check that as well before giving up.
16588        OLD_PATH=$PATH
16589        PATH=$TOOLCHAIN_PATH:$PATH
16590        for ac_prog in gmake
16591do
16592  # Extract the first word of "$ac_prog", so it can be a program name with args.
16593set dummy $ac_prog; ac_word=$2
16594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16595$as_echo_n "checking for $ac_word... " >&6; }
16596if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16597  $as_echo_n "(cached) " >&6
16598else
16599  case $CHECK_TOOLSDIR_GMAKE in
16600  [\\/]* | ?:[\\/]*)
16601  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16602  ;;
16603  *)
16604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16605for as_dir in $PATH
16606do
16607  IFS=$as_save_IFS
16608  test -z "$as_dir" && as_dir=.
16609    for ac_exec_ext in '' $ac_executable_extensions; do
16610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16611    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16613    break 2
16614  fi
16615done
16616  done
16617IFS=$as_save_IFS
16618
16619  ;;
16620esac
16621fi
16622CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16623if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16625$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16626else
16627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16628$as_echo "no" >&6; }
16629fi
16630
16631
16632  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16633done
16634
16635
16636  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16637  DESCRIPTION="gmake in tools-dir"
16638
16639  # On Cygwin, we require a newer version of make than on other platforms
16640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16641    MAKE_VERSION_EXPR="-e 4\."
16642    MAKE_REQUIRED_VERSION="4.0"
16643   else
16644    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16645    MAKE_REQUIRED_VERSION="3.81"
16646  fi
16647
16648  if test "x$MAKE_CANDIDATE" != x; then
16649    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16650$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16651    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16652    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16653    if test "x$IS_GNU_MAKE" = x; then
16654      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16655$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16656    else
16657      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16658      if test "x$IS_MODERN_MAKE" = x; then
16659        { $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
16660$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;}
16661      else
16662        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16663          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16664            MAKE_EXPECTED_ENV='cygwin'
16665          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16666            MAKE_EXPECTED_ENV='msys'
16667          else
16668            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16669          fi
16670          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16671          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16672        else
16673          # Not relevant for non-Windows
16674          IS_MAKE_CORRECT_ENV=true
16675        fi
16676        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16677          { $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
16678$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;}
16679        else
16680          FOUND_MAKE=$MAKE_CANDIDATE
16681
16682  # Only process if variable expands to non-empty
16683
16684  if test "x$FOUND_MAKE" != x; then
16685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16686
16687  # First separate the path from the arguments. This will split at the first
16688  # space.
16689  complete="$FOUND_MAKE"
16690  path="${complete%% *}"
16691  tmp="$complete EOL"
16692  arguments="${tmp#* }"
16693
16694  # Input might be given as Windows format, start by converting to
16695  # unix format.
16696  new_path=`$CYGPATH -u "$path"`
16697
16698  # Now try to locate executable using which
16699  new_path=`$WHICH "$new_path" 2> /dev/null`
16700  # bat and cmd files are not always considered executable in cygwin causing which
16701  # to not find them
16702  if test "x$new_path" = x \
16703      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16704      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16705    new_path=`$CYGPATH -u "$path"`
16706  fi
16707  if test "x$new_path" = x; then
16708    # Oops. Which didn't find the executable.
16709    # The splitting of arguments from the executable at a space might have been incorrect,
16710    # since paths with space are more likely in Windows. Give it another try with the whole
16711    # argument.
16712    path="$complete"
16713    arguments="EOL"
16714    new_path=`$CYGPATH -u "$path"`
16715    new_path=`$WHICH "$new_path" 2> /dev/null`
16716    # bat and cmd files are not always considered executable in cygwin causing which
16717    # to not find them
16718    if test "x$new_path" = x \
16719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16721      new_path=`$CYGPATH -u "$path"`
16722    fi
16723    if test "x$new_path" = x; then
16724      # It's still not found. Now this is an unrecoverable error.
16725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16726$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16727      has_space=`$ECHO "$complete" | $GREP " "`
16728      if test "x$has_space" != x; then
16729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16731      fi
16732      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16733    fi
16734  fi
16735
16736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16739  # "foo.exe" is OK but "foo" is an error.
16740  #
16741  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16742  # It is also a way to make sure we got the proper file name for the real test later on.
16743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16744  if test "x$test_shortpath" = x; then
16745    # Short path failed, file does not exist as specified.
16746    # Try adding .exe or .cmd
16747    if test -f "${new_path}.exe"; then
16748      input_to_shortpath="${new_path}.exe"
16749    elif test -f "${new_path}.cmd"; then
16750      input_to_shortpath="${new_path}.cmd"
16751    else
16752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16757    fi
16758  else
16759    input_to_shortpath="$new_path"
16760  fi
16761
16762  # Call helper function which possibly converts this using DOS-style short mode.
16763  # If so, the updated path is stored in $new_path.
16764  new_path="$input_to_shortpath"
16765
16766  input_path="$input_to_shortpath"
16767  # Check if we need to convert this using DOS-style short mode. If the path
16768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16769  # take no chances and rewrite it.
16770  # Note: m4 eats our [], so we need to use [ and ] instead.
16771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16772  if test "x$has_forbidden_chars" != x; then
16773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16777      # Going to short mode and back again did indeed matter. Since short mode is
16778      # case insensitive, let's make it lowercase to improve readability.
16779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16780      # Now convert it back to Unix-style (cygpath)
16781      input_path=`$CYGPATH -u "$shortmode_path"`
16782      new_path="$input_path"
16783    fi
16784  fi
16785
16786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16787  if test "x$test_cygdrive_prefix" = x; then
16788    # As a simple fix, exclude /usr/bin since it's not a real path.
16789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16791      # a path prefixed by /cygdrive for fixpath to work.
16792      new_path="$CYGWIN_ROOT_PATH$input_path"
16793    fi
16794  fi
16795
16796  # remove trailing .exe if any
16797  new_path="${new_path/%.exe/}"
16798
16799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16800
16801  # First separate the path from the arguments. This will split at the first
16802  # space.
16803  complete="$FOUND_MAKE"
16804  path="${complete%% *}"
16805  tmp="$complete EOL"
16806  arguments="${tmp#* }"
16807
16808  # Input might be given as Windows format, start by converting to
16809  # unix format.
16810  new_path="$path"
16811
16812  windows_path="$new_path"
16813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16814    unix_path=`$CYGPATH -u "$windows_path"`
16815    new_path="$unix_path"
16816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16818    new_path="$unix_path"
16819  fi
16820
16821
16822  # Now try to locate executable using which
16823  new_path=`$WHICH "$new_path" 2> /dev/null`
16824
16825  if test "x$new_path" = x; then
16826    # Oops. Which didn't find the executable.
16827    # The splitting of arguments from the executable at a space might have been incorrect,
16828    # since paths with space are more likely in Windows. Give it another try with the whole
16829    # argument.
16830    path="$complete"
16831    arguments="EOL"
16832    new_path="$path"
16833
16834  windows_path="$new_path"
16835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16836    unix_path=`$CYGPATH -u "$windows_path"`
16837    new_path="$unix_path"
16838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16840    new_path="$unix_path"
16841  fi
16842
16843
16844    new_path=`$WHICH "$new_path" 2> /dev/null`
16845    # bat and cmd files are not always considered executable in MSYS causing which
16846    # to not find them
16847    if test "x$new_path" = x \
16848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16850      new_path="$path"
16851
16852  windows_path="$new_path"
16853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16854    unix_path=`$CYGPATH -u "$windows_path"`
16855    new_path="$unix_path"
16856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16858    new_path="$unix_path"
16859  fi
16860
16861    fi
16862
16863    if test "x$new_path" = x; then
16864      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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 new_path has a complete unix path to the binary
16877  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16878    # Keep paths in /bin as-is, but remove trailing .exe if any
16879    new_path="${new_path/%.exe/}"
16880    # Do not save /bin paths to all_fixpath_prefixes!
16881  else
16882    # Not in mixed or Windows style, start by that.
16883    new_path=`cmd //c echo $new_path`
16884
16885  input_path="$new_path"
16886  # Check if we need to convert this using DOS-style short mode. If the path
16887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16888  # take no chances and rewrite it.
16889  # Note: m4 eats our [], so we need to use [ and ] instead.
16890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16891  if test "x$has_forbidden_chars" != x; then
16892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16894  fi
16895
16896    # Output is in $new_path
16897
16898  windows_path="$new_path"
16899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16900    unix_path=`$CYGPATH -u "$windows_path"`
16901    new_path="$unix_path"
16902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16904    new_path="$unix_path"
16905  fi
16906
16907    # remove trailing .exe if any
16908    new_path="${new_path/%.exe/}"
16909
16910    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16911    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16912  fi
16913
16914    else
16915      # We're on a unix platform. Hooray! :)
16916      # First separate the path from the arguments. This will split at the first
16917      # space.
16918      complete="$FOUND_MAKE"
16919      path="${complete%% *}"
16920      tmp="$complete EOL"
16921      arguments="${tmp#* }"
16922
16923      # Cannot rely on the command "which" here since it doesn't always work.
16924      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16925      if test -z "$is_absolute_path"; then
16926        # Path to executable is not absolute. Find it.
16927        IFS_save="$IFS"
16928        IFS=:
16929        for p in $PATH; do
16930          if test -f "$p/$path" && test -x "$p/$path"; then
16931            new_path="$p/$path"
16932            break
16933          fi
16934        done
16935        IFS="$IFS_save"
16936      else
16937        # This is an absolute path, we can use it without further modifications.
16938        new_path="$path"
16939      fi
16940
16941      if test "x$new_path" = x; then
16942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16943$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16944        has_space=`$ECHO "$complete" | $GREP " "`
16945        if test "x$has_space" != x; then
16946          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16947$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16948        fi
16949        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16950      fi
16951    fi
16952
16953    # Now join together the path and the arguments once again
16954    if test "x$arguments" != xEOL; then
16955      new_complete="$new_path ${arguments% *}"
16956    else
16957      new_complete="$new_path"
16958    fi
16959
16960    if test "x$complete" != "x$new_complete"; then
16961      FOUND_MAKE="$new_complete"
16962      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16963$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16964    fi
16965  fi
16966
16967        fi
16968      fi
16969    fi
16970  fi
16971
16972        if test "x$FOUND_MAKE" = x; then
16973          for ac_prog in make
16974do
16975  # Extract the first word of "$ac_prog", so it can be a program name with args.
16976set dummy $ac_prog; ac_word=$2
16977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16978$as_echo_n "checking for $ac_word... " >&6; }
16979if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16980  $as_echo_n "(cached) " >&6
16981else
16982  case $CHECK_TOOLSDIR_MAKE in
16983  [\\/]* | ?:[\\/]*)
16984  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16985  ;;
16986  *)
16987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16988for as_dir in $PATH
16989do
16990  IFS=$as_save_IFS
16991  test -z "$as_dir" && as_dir=.
16992    for ac_exec_ext in '' $ac_executable_extensions; do
16993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16994    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16996    break 2
16997  fi
16998done
16999  done
17000IFS=$as_save_IFS
17001
17002  ;;
17003esac
17004fi
17005CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17006if test -n "$CHECK_TOOLSDIR_MAKE"; then
17007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17008$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17009else
17010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17011$as_echo "no" >&6; }
17012fi
17013
17014
17015  test -n "$CHECK_TOOLSDIR_MAKE" && break
17016done
17017
17018
17019  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17020  DESCRIPTION="make in tools-dir"
17021
17022  # On Cygwin, we require a newer version of make than on other platforms
17023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17024    MAKE_VERSION_EXPR="-e 4\."
17025    MAKE_REQUIRED_VERSION="4.0"
17026   else
17027    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17028    MAKE_REQUIRED_VERSION="3.81"
17029  fi
17030
17031  if test "x$MAKE_CANDIDATE" != x; then
17032    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17033$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17034    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17035    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17036    if test "x$IS_GNU_MAKE" = x; then
17037      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17038$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17039    else
17040      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17041      if test "x$IS_MODERN_MAKE" = x; then
17042        { $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
17043$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;}
17044      else
17045        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17046          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17047            MAKE_EXPECTED_ENV='cygwin'
17048          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17049            MAKE_EXPECTED_ENV='msys'
17050          else
17051            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17052          fi
17053          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17054          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17055        else
17056          # Not relevant for non-Windows
17057          IS_MAKE_CORRECT_ENV=true
17058        fi
17059        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17060          { $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
17061$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;}
17062        else
17063          FOUND_MAKE=$MAKE_CANDIDATE
17064
17065  # Only process if variable expands to non-empty
17066
17067  if test "x$FOUND_MAKE" != x; then
17068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17069
17070  # First separate the path from the arguments. This will split at the first
17071  # space.
17072  complete="$FOUND_MAKE"
17073  path="${complete%% *}"
17074  tmp="$complete EOL"
17075  arguments="${tmp#* }"
17076
17077  # Input might be given as Windows format, start by converting to
17078  # unix format.
17079  new_path=`$CYGPATH -u "$path"`
17080
17081  # Now try to locate executable using which
17082  new_path=`$WHICH "$new_path" 2> /dev/null`
17083  # bat and cmd files are not always considered executable in cygwin causing which
17084  # to not find them
17085  if test "x$new_path" = x \
17086      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17087      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17088    new_path=`$CYGPATH -u "$path"`
17089  fi
17090  if test "x$new_path" = x; then
17091    # Oops. Which didn't find the executable.
17092    # The splitting of arguments from the executable at a space might have been incorrect,
17093    # since paths with space are more likely in Windows. Give it another try with the whole
17094    # argument.
17095    path="$complete"
17096    arguments="EOL"
17097    new_path=`$CYGPATH -u "$path"`
17098    new_path=`$WHICH "$new_path" 2> /dev/null`
17099    # bat and cmd files are not always considered executable in cygwin causing which
17100    # to not find them
17101    if test "x$new_path" = x \
17102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17104      new_path=`$CYGPATH -u "$path"`
17105    fi
17106    if test "x$new_path" = x; then
17107      # It's still not found. Now this is an unrecoverable error.
17108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17110      has_space=`$ECHO "$complete" | $GREP " "`
17111      if test "x$has_space" != x; then
17112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17114      fi
17115      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17116    fi
17117  fi
17118
17119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17122  # "foo.exe" is OK but "foo" is an error.
17123  #
17124  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17125  # It is also a way to make sure we got the proper file name for the real test later on.
17126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17127  if test "x$test_shortpath" = x; then
17128    # Short path failed, file does not exist as specified.
17129    # Try adding .exe or .cmd
17130    if test -f "${new_path}.exe"; then
17131      input_to_shortpath="${new_path}.exe"
17132    elif test -f "${new_path}.cmd"; then
17133      input_to_shortpath="${new_path}.cmd"
17134    else
17135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17136$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17137      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17138$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17140    fi
17141  else
17142    input_to_shortpath="$new_path"
17143  fi
17144
17145  # Call helper function which possibly converts this using DOS-style short mode.
17146  # If so, the updated path is stored in $new_path.
17147  new_path="$input_to_shortpath"
17148
17149  input_path="$input_to_shortpath"
17150  # Check if we need to convert this using DOS-style short mode. If the path
17151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17152  # take no chances and rewrite it.
17153  # Note: m4 eats our [], so we need to use [ and ] instead.
17154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17155  if test "x$has_forbidden_chars" != x; then
17156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17160      # Going to short mode and back again did indeed matter. Since short mode is
17161      # case insensitive, let's make it lowercase to improve readability.
17162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17163      # Now convert it back to Unix-style (cygpath)
17164      input_path=`$CYGPATH -u "$shortmode_path"`
17165      new_path="$input_path"
17166    fi
17167  fi
17168
17169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17170  if test "x$test_cygdrive_prefix" = x; then
17171    # As a simple fix, exclude /usr/bin since it's not a real path.
17172    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17174      # a path prefixed by /cygdrive for fixpath to work.
17175      new_path="$CYGWIN_ROOT_PATH$input_path"
17176    fi
17177  fi
17178
17179  # remove trailing .exe if any
17180  new_path="${new_path/%.exe/}"
17181
17182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17183
17184  # First separate the path from the arguments. This will split at the first
17185  # space.
17186  complete="$FOUND_MAKE"
17187  path="${complete%% *}"
17188  tmp="$complete EOL"
17189  arguments="${tmp#* }"
17190
17191  # Input might be given as Windows format, start by converting to
17192  # unix format.
17193  new_path="$path"
17194
17195  windows_path="$new_path"
17196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17197    unix_path=`$CYGPATH -u "$windows_path"`
17198    new_path="$unix_path"
17199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17201    new_path="$unix_path"
17202  fi
17203
17204
17205  # Now try to locate executable using which
17206  new_path=`$WHICH "$new_path" 2> /dev/null`
17207
17208  if test "x$new_path" = x; then
17209    # Oops. Which didn't find the executable.
17210    # The splitting of arguments from the executable at a space might have been incorrect,
17211    # since paths with space are more likely in Windows. Give it another try with the whole
17212    # argument.
17213    path="$complete"
17214    arguments="EOL"
17215    new_path="$path"
17216
17217  windows_path="$new_path"
17218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17219    unix_path=`$CYGPATH -u "$windows_path"`
17220    new_path="$unix_path"
17221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17223    new_path="$unix_path"
17224  fi
17225
17226
17227    new_path=`$WHICH "$new_path" 2> /dev/null`
17228    # bat and cmd files are not always considered executable in MSYS causing which
17229    # to not find them
17230    if test "x$new_path" = x \
17231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17233      new_path="$path"
17234
17235  windows_path="$new_path"
17236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17237    unix_path=`$CYGPATH -u "$windows_path"`
17238    new_path="$unix_path"
17239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17241    new_path="$unix_path"
17242  fi
17243
17244    fi
17245
17246    if test "x$new_path" = x; then
17247      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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 new_path has a complete unix path to the binary
17260  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17261    # Keep paths in /bin as-is, but remove trailing .exe if any
17262    new_path="${new_path/%.exe/}"
17263    # Do not save /bin paths to all_fixpath_prefixes!
17264  else
17265    # Not in mixed or Windows style, start by that.
17266    new_path=`cmd //c echo $new_path`
17267
17268  input_path="$new_path"
17269  # Check if we need to convert this using DOS-style short mode. If the path
17270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17271  # take no chances and rewrite it.
17272  # Note: m4 eats our [], so we need to use [ and ] instead.
17273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17274  if test "x$has_forbidden_chars" != x; then
17275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17277  fi
17278
17279    # Output is in $new_path
17280
17281  windows_path="$new_path"
17282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17283    unix_path=`$CYGPATH -u "$windows_path"`
17284    new_path="$unix_path"
17285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17287    new_path="$unix_path"
17288  fi
17289
17290    # remove trailing .exe if any
17291    new_path="${new_path/%.exe/}"
17292
17293    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17294    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17295  fi
17296
17297    else
17298      # We're on a unix platform. Hooray! :)
17299      # First separate the path from the arguments. This will split at the first
17300      # space.
17301      complete="$FOUND_MAKE"
17302      path="${complete%% *}"
17303      tmp="$complete EOL"
17304      arguments="${tmp#* }"
17305
17306      # Cannot rely on the command "which" here since it doesn't always work.
17307      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17308      if test -z "$is_absolute_path"; then
17309        # Path to executable is not absolute. Find it.
17310        IFS_save="$IFS"
17311        IFS=:
17312        for p in $PATH; do
17313          if test -f "$p/$path" && test -x "$p/$path"; then
17314            new_path="$p/$path"
17315            break
17316          fi
17317        done
17318        IFS="$IFS_save"
17319      else
17320        # This is an absolute path, we can use it without further modifications.
17321        new_path="$path"
17322      fi
17323
17324      if test "x$new_path" = x; then
17325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17326$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17327        has_space=`$ECHO "$complete" | $GREP " "`
17328        if test "x$has_space" != x; then
17329          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17330$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17331        fi
17332        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17333      fi
17334    fi
17335
17336    # Now join together the path and the arguments once again
17337    if test "x$arguments" != xEOL; then
17338      new_complete="$new_path ${arguments% *}"
17339    else
17340      new_complete="$new_path"
17341    fi
17342
17343    if test "x$complete" != "x$new_complete"; then
17344      FOUND_MAKE="$new_complete"
17345      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17346$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17347    fi
17348  fi
17349
17350        fi
17351      fi
17352    fi
17353  fi
17354
17355        fi
17356        PATH=$OLD_PATH
17357      fi
17358    fi
17359
17360    if test "x$FOUND_MAKE" = x; then
17361      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
17362    fi
17363  fi
17364
17365  MAKE=$FOUND_MAKE
17366
17367  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17368$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17369
17370
17371  # Check if make supports the output sync option and if so, setup using it.
17372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17373$as_echo_n "checking if make --output-sync is supported... " >&6; }
17374  if $MAKE --version -O > /dev/null 2>&1; then
17375    OUTPUT_SYNC_SUPPORTED=true
17376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17377$as_echo "yes" >&6; }
17378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17379$as_echo_n "checking for output-sync value... " >&6; }
17380
17381# Check whether --with-output-sync was given.
17382if test "${with_output_sync+set}" = set; then :
17383  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17384fi
17385
17386    if test "x$OUTPUT_SYNC" = "x"; then
17387      OUTPUT_SYNC=none
17388    fi
17389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17390$as_echo "$OUTPUT_SYNC" >&6; }
17391    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17392      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17393    fi
17394  else
17395    OUTPUT_SYNC_SUPPORTED=false
17396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17397$as_echo "no" >&6; }
17398  fi
17399
17400
17401
17402
17403
17404
17405  # Test if find supports -delete
17406  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17407$as_echo_n "checking if find supports -delete... " >&6; }
17408  FIND_DELETE="-delete"
17409
17410  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17411
17412  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17413
17414  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17415  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17416    # No, it does not.
17417    rm $DELETEDIR/TestIfFindSupportsDelete
17418    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17419      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17420      FIND_DELETE="-print | xargs rm"
17421    else
17422      FIND_DELETE="-exec rm \{\} \+"
17423    fi
17424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17425$as_echo "no" >&6; }
17426  else
17427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17428$as_echo "yes" >&6; }
17429  fi
17430  rmdir $DELETEDIR
17431
17432
17433
17434  # These tools might not be installed by default,
17435  # need hint on how to install them.
17436
17437
17438
17439  # Publish this variable in the help.
17440
17441
17442  if test "x$UNZIP" = x; then
17443    # The variable is not set by user, try to locate tool using the code snippet
17444    for ac_prog in unzip
17445do
17446  # Extract the first word of "$ac_prog", so it can be a program name with args.
17447set dummy $ac_prog; ac_word=$2
17448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17449$as_echo_n "checking for $ac_word... " >&6; }
17450if ${ac_cv_path_UNZIP+:} false; then :
17451  $as_echo_n "(cached) " >&6
17452else
17453  case $UNZIP in
17454  [\\/]* | ?:[\\/]*)
17455  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17456  ;;
17457  *)
17458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17459for as_dir in $PATH
17460do
17461  IFS=$as_save_IFS
17462  test -z "$as_dir" && as_dir=.
17463    for ac_exec_ext in '' $ac_executable_extensions; do
17464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17465    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17467    break 2
17468  fi
17469done
17470  done
17471IFS=$as_save_IFS
17472
17473  ;;
17474esac
17475fi
17476UNZIP=$ac_cv_path_UNZIP
17477if test -n "$UNZIP"; then
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17479$as_echo "$UNZIP" >&6; }
17480else
17481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17482$as_echo "no" >&6; }
17483fi
17484
17485
17486  test -n "$UNZIP" && break
17487done
17488
17489  else
17490    # The variable is set, but is it from the command line or the environment?
17491
17492    # Try to remove the string !UNZIP! from our list.
17493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17495      # If it failed, the variable was not from the command line. Ignore it,
17496      # but warn the user (except for BASH, which is always set by the calling BASH).
17497      if test "xUNZIP" != xBASH; then
17498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17499$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17500      fi
17501      # Try to locate tool using the code snippet
17502      for ac_prog in unzip
17503do
17504  # Extract the first word of "$ac_prog", so it can be a program name with args.
17505set dummy $ac_prog; ac_word=$2
17506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17507$as_echo_n "checking for $ac_word... " >&6; }
17508if ${ac_cv_path_UNZIP+:} false; then :
17509  $as_echo_n "(cached) " >&6
17510else
17511  case $UNZIP in
17512  [\\/]* | ?:[\\/]*)
17513  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17514  ;;
17515  *)
17516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17517for as_dir in $PATH
17518do
17519  IFS=$as_save_IFS
17520  test -z "$as_dir" && as_dir=.
17521    for ac_exec_ext in '' $ac_executable_extensions; do
17522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17523    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17525    break 2
17526  fi
17527done
17528  done
17529IFS=$as_save_IFS
17530
17531  ;;
17532esac
17533fi
17534UNZIP=$ac_cv_path_UNZIP
17535if test -n "$UNZIP"; then
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17537$as_echo "$UNZIP" >&6; }
17538else
17539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17540$as_echo "no" >&6; }
17541fi
17542
17543
17544  test -n "$UNZIP" && break
17545done
17546
17547    else
17548      # If it succeeded, then it was overridden by the user. We will use it
17549      # for the tool.
17550
17551      # First remove it from the list of overridden variables, so we can test
17552      # for unknown variables in the end.
17553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17554
17555      # Check if the provided tool contains a complete path.
17556      tool_specified="$UNZIP"
17557      tool_basename="${tool_specified##*/}"
17558      if test "x$tool_basename" = "x$tool_specified"; then
17559        # A command without a complete path is provided, search $PATH.
17560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17561$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17562        # Extract the first word of "$tool_basename", so it can be a program name with args.
17563set dummy $tool_basename; 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_UNZIP+:} false; then :
17567  $as_echo_n "(cached) " >&6
17568else
17569  case $UNZIP in
17570  [\\/]* | ?:[\\/]*)
17571  ac_cv_path_UNZIP="$UNZIP" # 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_UNZIP="$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
17592UNZIP=$ac_cv_path_UNZIP
17593if test -n "$UNZIP"; then
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17595$as_echo "$UNZIP" >&6; }
17596else
17597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17598$as_echo "no" >&6; }
17599fi
17600
17601
17602        if test "x$UNZIP" = x; then
17603          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17604        fi
17605      else
17606        # Otherwise we believe it is a complete path. Use it as it is.
17607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17608$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17610$as_echo_n "checking for UNZIP... " >&6; }
17611        if test ! -x "$tool_specified"; then
17612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17613$as_echo "not found" >&6; }
17614          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17615        fi
17616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17617$as_echo "$tool_specified" >&6; }
17618      fi
17619    fi
17620  fi
17621
17622
17623
17624  if test "x$UNZIP" = x; then
17625    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17626  fi
17627
17628
17629
17630
17631
17632  # Publish this variable in the help.
17633
17634
17635  if test "x$ZIP" = x; then
17636    # The variable is not set by user, try to locate tool using the code snippet
17637    for ac_prog in zip
17638do
17639  # Extract the first word of "$ac_prog", so it can be a program name with args.
17640set dummy $ac_prog; ac_word=$2
17641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17642$as_echo_n "checking for $ac_word... " >&6; }
17643if ${ac_cv_path_ZIP+:} false; then :
17644  $as_echo_n "(cached) " >&6
17645else
17646  case $ZIP in
17647  [\\/]* | ?:[\\/]*)
17648  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17649  ;;
17650  *)
17651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17652for as_dir in $PATH
17653do
17654  IFS=$as_save_IFS
17655  test -z "$as_dir" && as_dir=.
17656    for ac_exec_ext in '' $ac_executable_extensions; do
17657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17658    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17660    break 2
17661  fi
17662done
17663  done
17664IFS=$as_save_IFS
17665
17666  ;;
17667esac
17668fi
17669ZIP=$ac_cv_path_ZIP
17670if test -n "$ZIP"; then
17671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17672$as_echo "$ZIP" >&6; }
17673else
17674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17675$as_echo "no" >&6; }
17676fi
17677
17678
17679  test -n "$ZIP" && break
17680done
17681
17682  else
17683    # The variable is set, but is it from the command line or the environment?
17684
17685    # Try to remove the string !ZIP! from our list.
17686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17688      # If it failed, the variable was not from the command line. Ignore it,
17689      # but warn the user (except for BASH, which is always set by the calling BASH).
17690      if test "xZIP" != xBASH; then
17691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17692$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17693      fi
17694      # Try to locate tool using the code snippet
17695      for ac_prog in zip
17696do
17697  # Extract the first word of "$ac_prog", so it can be a program name with args.
17698set dummy $ac_prog; ac_word=$2
17699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17700$as_echo_n "checking for $ac_word... " >&6; }
17701if ${ac_cv_path_ZIP+:} false; then :
17702  $as_echo_n "(cached) " >&6
17703else
17704  case $ZIP in
17705  [\\/]* | ?:[\\/]*)
17706  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17707  ;;
17708  *)
17709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17710for as_dir in $PATH
17711do
17712  IFS=$as_save_IFS
17713  test -z "$as_dir" && as_dir=.
17714    for ac_exec_ext in '' $ac_executable_extensions; do
17715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17716    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17718    break 2
17719  fi
17720done
17721  done
17722IFS=$as_save_IFS
17723
17724  ;;
17725esac
17726fi
17727ZIP=$ac_cv_path_ZIP
17728if test -n "$ZIP"; then
17729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17730$as_echo "$ZIP" >&6; }
17731else
17732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17733$as_echo "no" >&6; }
17734fi
17735
17736
17737  test -n "$ZIP" && break
17738done
17739
17740    else
17741      # If it succeeded, then it was overridden by the user. We will use it
17742      # for the tool.
17743
17744      # First remove it from the list of overridden variables, so we can test
17745      # for unknown variables in the end.
17746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17747
17748      # Check if the provided tool contains a complete path.
17749      tool_specified="$ZIP"
17750      tool_basename="${tool_specified##*/}"
17751      if test "x$tool_basename" = "x$tool_specified"; then
17752        # A command without a complete path is provided, search $PATH.
17753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17754$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17755        # Extract the first word of "$tool_basename", so it can be a program name with args.
17756set dummy $tool_basename; ac_word=$2
17757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17758$as_echo_n "checking for $ac_word... " >&6; }
17759if ${ac_cv_path_ZIP+:} false; then :
17760  $as_echo_n "(cached) " >&6
17761else
17762  case $ZIP in
17763  [\\/]* | ?:[\\/]*)
17764  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17765  ;;
17766  *)
17767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17768for as_dir in $PATH
17769do
17770  IFS=$as_save_IFS
17771  test -z "$as_dir" && as_dir=.
17772    for ac_exec_ext in '' $ac_executable_extensions; do
17773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17774    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17776    break 2
17777  fi
17778done
17779  done
17780IFS=$as_save_IFS
17781
17782  ;;
17783esac
17784fi
17785ZIP=$ac_cv_path_ZIP
17786if test -n "$ZIP"; then
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17788$as_echo "$ZIP" >&6; }
17789else
17790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17791$as_echo "no" >&6; }
17792fi
17793
17794
17795        if test "x$ZIP" = x; then
17796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17797        fi
17798      else
17799        # Otherwise we believe it is a complete path. Use it as it is.
17800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17801$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17803$as_echo_n "checking for ZIP... " >&6; }
17804        if test ! -x "$tool_specified"; then
17805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17806$as_echo "not found" >&6; }
17807          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17808        fi
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17810$as_echo "$tool_specified" >&6; }
17811      fi
17812    fi
17813  fi
17814
17815
17816
17817  if test "x$ZIP" = x; then
17818    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17819  fi
17820
17821
17822
17823  # Non-required basic tools
17824
17825
17826
17827  # Publish this variable in the help.
17828
17829
17830  if test "x$LDD" = x; then
17831    # The variable is not set by user, try to locate tool using the code snippet
17832    for ac_prog in ldd
17833do
17834  # Extract the first word of "$ac_prog", so it can be a program name with args.
17835set dummy $ac_prog; ac_word=$2
17836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17837$as_echo_n "checking for $ac_word... " >&6; }
17838if ${ac_cv_path_LDD+:} false; then :
17839  $as_echo_n "(cached) " >&6
17840else
17841  case $LDD in
17842  [\\/]* | ?:[\\/]*)
17843  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17844  ;;
17845  *)
17846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17847for as_dir in $PATH
17848do
17849  IFS=$as_save_IFS
17850  test -z "$as_dir" && as_dir=.
17851    for ac_exec_ext in '' $ac_executable_extensions; do
17852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17853    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17855    break 2
17856  fi
17857done
17858  done
17859IFS=$as_save_IFS
17860
17861  ;;
17862esac
17863fi
17864LDD=$ac_cv_path_LDD
17865if test -n "$LDD"; then
17866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17867$as_echo "$LDD" >&6; }
17868else
17869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17870$as_echo "no" >&6; }
17871fi
17872
17873
17874  test -n "$LDD" && break
17875done
17876
17877  else
17878    # The variable is set, but is it from the command line or the environment?
17879
17880    # Try to remove the string !LDD! from our list.
17881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17883      # If it failed, the variable was not from the command line. Ignore it,
17884      # but warn the user (except for BASH, which is always set by the calling BASH).
17885      if test "xLDD" != xBASH; then
17886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17887$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17888      fi
17889      # Try to locate tool using the code snippet
17890      for ac_prog in ldd
17891do
17892  # Extract the first word of "$ac_prog", so it can be a program name with args.
17893set dummy $ac_prog; ac_word=$2
17894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17895$as_echo_n "checking for $ac_word... " >&6; }
17896if ${ac_cv_path_LDD+:} false; then :
17897  $as_echo_n "(cached) " >&6
17898else
17899  case $LDD in
17900  [\\/]* | ?:[\\/]*)
17901  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17902  ;;
17903  *)
17904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17905for as_dir in $PATH
17906do
17907  IFS=$as_save_IFS
17908  test -z "$as_dir" && as_dir=.
17909    for ac_exec_ext in '' $ac_executable_extensions; do
17910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17911    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17913    break 2
17914  fi
17915done
17916  done
17917IFS=$as_save_IFS
17918
17919  ;;
17920esac
17921fi
17922LDD=$ac_cv_path_LDD
17923if test -n "$LDD"; then
17924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17925$as_echo "$LDD" >&6; }
17926else
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17928$as_echo "no" >&6; }
17929fi
17930
17931
17932  test -n "$LDD" && break
17933done
17934
17935    else
17936      # If it succeeded, then it was overridden by the user. We will use it
17937      # for the tool.
17938
17939      # First remove it from the list of overridden variables, so we can test
17940      # for unknown variables in the end.
17941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17942
17943      # Check if the provided tool contains a complete path.
17944      tool_specified="$LDD"
17945      tool_basename="${tool_specified##*/}"
17946      if test "x$tool_basename" = "x$tool_specified"; then
17947        # A command without a complete path is provided, search $PATH.
17948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17949$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17950        # Extract the first word of "$tool_basename", so it can be a program name with args.
17951set dummy $tool_basename; ac_word=$2
17952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17953$as_echo_n "checking for $ac_word... " >&6; }
17954if ${ac_cv_path_LDD+:} false; then :
17955  $as_echo_n "(cached) " >&6
17956else
17957  case $LDD in
17958  [\\/]* | ?:[\\/]*)
17959  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17960  ;;
17961  *)
17962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17963for as_dir in $PATH
17964do
17965  IFS=$as_save_IFS
17966  test -z "$as_dir" && as_dir=.
17967    for ac_exec_ext in '' $ac_executable_extensions; do
17968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17969    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17971    break 2
17972  fi
17973done
17974  done
17975IFS=$as_save_IFS
17976
17977  ;;
17978esac
17979fi
17980LDD=$ac_cv_path_LDD
17981if test -n "$LDD"; then
17982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17983$as_echo "$LDD" >&6; }
17984else
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17986$as_echo "no" >&6; }
17987fi
17988
17989
17990        if test "x$LDD" = x; then
17991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17992        fi
17993      else
17994        # Otherwise we believe it is a complete path. Use it as it is.
17995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17996$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17998$as_echo_n "checking for LDD... " >&6; }
17999        if test ! -x "$tool_specified"; then
18000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18001$as_echo "not found" >&6; }
18002          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18003        fi
18004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18005$as_echo "$tool_specified" >&6; }
18006      fi
18007    fi
18008  fi
18009
18010
18011  if test "x$LDD" = "x"; then
18012    # List shared lib dependencies is used for
18013    # debug output and checking for forbidden dependencies.
18014    # We can build without it.
18015    LDD="true"
18016  fi
18017
18018
18019  # Publish this variable in the help.
18020
18021
18022  if test "x$OTOOL" = x; then
18023    # The variable is not set by user, try to locate tool using the code snippet
18024    for ac_prog in otool
18025do
18026  # Extract the first word of "$ac_prog", so it can be a program name with args.
18027set dummy $ac_prog; ac_word=$2
18028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18029$as_echo_n "checking for $ac_word... " >&6; }
18030if ${ac_cv_path_OTOOL+:} false; then :
18031  $as_echo_n "(cached) " >&6
18032else
18033  case $OTOOL in
18034  [\\/]* | ?:[\\/]*)
18035  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18036  ;;
18037  *)
18038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18039for as_dir in $PATH
18040do
18041  IFS=$as_save_IFS
18042  test -z "$as_dir" && as_dir=.
18043    for ac_exec_ext in '' $ac_executable_extensions; do
18044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18045    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18047    break 2
18048  fi
18049done
18050  done
18051IFS=$as_save_IFS
18052
18053  ;;
18054esac
18055fi
18056OTOOL=$ac_cv_path_OTOOL
18057if test -n "$OTOOL"; then
18058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18059$as_echo "$OTOOL" >&6; }
18060else
18061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18062$as_echo "no" >&6; }
18063fi
18064
18065
18066  test -n "$OTOOL" && break
18067done
18068
18069  else
18070    # The variable is set, but is it from the command line or the environment?
18071
18072    # Try to remove the string !OTOOL! from our list.
18073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18075      # If it failed, the variable was not from the command line. Ignore it,
18076      # but warn the user (except for BASH, which is always set by the calling BASH).
18077      if test "xOTOOL" != xBASH; then
18078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18079$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18080      fi
18081      # Try to locate tool using the code snippet
18082      for ac_prog in otool
18083do
18084  # Extract the first word of "$ac_prog", so it can be a program name with args.
18085set dummy $ac_prog; ac_word=$2
18086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18087$as_echo_n "checking for $ac_word... " >&6; }
18088if ${ac_cv_path_OTOOL+:} false; then :
18089  $as_echo_n "(cached) " >&6
18090else
18091  case $OTOOL in
18092  [\\/]* | ?:[\\/]*)
18093  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18094  ;;
18095  *)
18096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18097for as_dir in $PATH
18098do
18099  IFS=$as_save_IFS
18100  test -z "$as_dir" && as_dir=.
18101    for ac_exec_ext in '' $ac_executable_extensions; do
18102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18103    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18105    break 2
18106  fi
18107done
18108  done
18109IFS=$as_save_IFS
18110
18111  ;;
18112esac
18113fi
18114OTOOL=$ac_cv_path_OTOOL
18115if test -n "$OTOOL"; then
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18117$as_echo "$OTOOL" >&6; }
18118else
18119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18120$as_echo "no" >&6; }
18121fi
18122
18123
18124  test -n "$OTOOL" && break
18125done
18126
18127    else
18128      # If it succeeded, then it was overridden by the user. We will use it
18129      # for the tool.
18130
18131      # First remove it from the list of overridden variables, so we can test
18132      # for unknown variables in the end.
18133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18134
18135      # Check if the provided tool contains a complete path.
18136      tool_specified="$OTOOL"
18137      tool_basename="${tool_specified##*/}"
18138      if test "x$tool_basename" = "x$tool_specified"; then
18139        # A command without a complete path is provided, search $PATH.
18140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18141$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18142        # Extract the first word of "$tool_basename", so it can be a program name with args.
18143set dummy $tool_basename; ac_word=$2
18144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18145$as_echo_n "checking for $ac_word... " >&6; }
18146if ${ac_cv_path_OTOOL+:} false; then :
18147  $as_echo_n "(cached) " >&6
18148else
18149  case $OTOOL in
18150  [\\/]* | ?:[\\/]*)
18151  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18152  ;;
18153  *)
18154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18155for as_dir in $PATH
18156do
18157  IFS=$as_save_IFS
18158  test -z "$as_dir" && as_dir=.
18159    for ac_exec_ext in '' $ac_executable_extensions; do
18160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18161    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18163    break 2
18164  fi
18165done
18166  done
18167IFS=$as_save_IFS
18168
18169  ;;
18170esac
18171fi
18172OTOOL=$ac_cv_path_OTOOL
18173if test -n "$OTOOL"; then
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18175$as_echo "$OTOOL" >&6; }
18176else
18177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18178$as_echo "no" >&6; }
18179fi
18180
18181
18182        if test "x$OTOOL" = x; then
18183          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18184        fi
18185      else
18186        # Otherwise we believe it is a complete path. Use it as it is.
18187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18188$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18190$as_echo_n "checking for OTOOL... " >&6; }
18191        if test ! -x "$tool_specified"; then
18192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18193$as_echo "not found" >&6; }
18194          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18195        fi
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18197$as_echo "$tool_specified" >&6; }
18198      fi
18199    fi
18200  fi
18201
18202
18203  if test "x$OTOOL" = "x"; then
18204    OTOOL="true"
18205  fi
18206
18207
18208  # Publish this variable in the help.
18209
18210
18211  if test "x$READELF" = x; then
18212    # The variable is not set by user, try to locate tool using the code snippet
18213    for ac_prog in greadelf readelf
18214do
18215  # Extract the first word of "$ac_prog", so it can be a program name with args.
18216set dummy $ac_prog; ac_word=$2
18217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18218$as_echo_n "checking for $ac_word... " >&6; }
18219if ${ac_cv_path_READELF+:} false; then :
18220  $as_echo_n "(cached) " >&6
18221else
18222  case $READELF in
18223  [\\/]* | ?:[\\/]*)
18224  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18225  ;;
18226  *)
18227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18228for as_dir in $PATH
18229do
18230  IFS=$as_save_IFS
18231  test -z "$as_dir" && as_dir=.
18232    for ac_exec_ext in '' $ac_executable_extensions; do
18233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18234    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18236    break 2
18237  fi
18238done
18239  done
18240IFS=$as_save_IFS
18241
18242  ;;
18243esac
18244fi
18245READELF=$ac_cv_path_READELF
18246if test -n "$READELF"; then
18247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18248$as_echo "$READELF" >&6; }
18249else
18250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18251$as_echo "no" >&6; }
18252fi
18253
18254
18255  test -n "$READELF" && break
18256done
18257
18258  else
18259    # The variable is set, but is it from the command line or the environment?
18260
18261    # Try to remove the string !READELF! from our list.
18262    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18263    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18264      # If it failed, the variable was not from the command line. Ignore it,
18265      # but warn the user (except for BASH, which is always set by the calling BASH).
18266      if test "xREADELF" != xBASH; then
18267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18268$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18269      fi
18270      # Try to locate tool using the code snippet
18271      for ac_prog in greadelf readelf
18272do
18273  # Extract the first word of "$ac_prog", so it can be a program name with args.
18274set dummy $ac_prog; ac_word=$2
18275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18276$as_echo_n "checking for $ac_word... " >&6; }
18277if ${ac_cv_path_READELF+:} false; then :
18278  $as_echo_n "(cached) " >&6
18279else
18280  case $READELF in
18281  [\\/]* | ?:[\\/]*)
18282  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18283  ;;
18284  *)
18285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18286for as_dir in $PATH
18287do
18288  IFS=$as_save_IFS
18289  test -z "$as_dir" && as_dir=.
18290    for ac_exec_ext in '' $ac_executable_extensions; do
18291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18292    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18294    break 2
18295  fi
18296done
18297  done
18298IFS=$as_save_IFS
18299
18300  ;;
18301esac
18302fi
18303READELF=$ac_cv_path_READELF
18304if test -n "$READELF"; then
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18306$as_echo "$READELF" >&6; }
18307else
18308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18309$as_echo "no" >&6; }
18310fi
18311
18312
18313  test -n "$READELF" && break
18314done
18315
18316    else
18317      # If it succeeded, then it was overridden by the user. We will use it
18318      # for the tool.
18319
18320      # First remove it from the list of overridden variables, so we can test
18321      # for unknown variables in the end.
18322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18323
18324      # Check if the provided tool contains a complete path.
18325      tool_specified="$READELF"
18326      tool_basename="${tool_specified##*/}"
18327      if test "x$tool_basename" = "x$tool_specified"; then
18328        # A command without a complete path is provided, search $PATH.
18329        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18330$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18331        # Extract the first word of "$tool_basename", so it can be a program name with args.
18332set dummy $tool_basename; ac_word=$2
18333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18334$as_echo_n "checking for $ac_word... " >&6; }
18335if ${ac_cv_path_READELF+:} false; then :
18336  $as_echo_n "(cached) " >&6
18337else
18338  case $READELF in
18339  [\\/]* | ?:[\\/]*)
18340  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18341  ;;
18342  *)
18343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18344for as_dir in $PATH
18345do
18346  IFS=$as_save_IFS
18347  test -z "$as_dir" && as_dir=.
18348    for ac_exec_ext in '' $ac_executable_extensions; do
18349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18350    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18352    break 2
18353  fi
18354done
18355  done
18356IFS=$as_save_IFS
18357
18358  ;;
18359esac
18360fi
18361READELF=$ac_cv_path_READELF
18362if test -n "$READELF"; then
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18364$as_echo "$READELF" >&6; }
18365else
18366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18367$as_echo "no" >&6; }
18368fi
18369
18370
18371        if test "x$READELF" = x; then
18372          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18373        fi
18374      else
18375        # Otherwise we believe it is a complete path. Use it as it is.
18376        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18377$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18379$as_echo_n "checking for READELF... " >&6; }
18380        if test ! -x "$tool_specified"; then
18381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18382$as_echo "not found" >&6; }
18383          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18384        fi
18385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18386$as_echo "$tool_specified" >&6; }
18387      fi
18388    fi
18389  fi
18390
18391
18392
18393
18394  # Publish this variable in the help.
18395
18396
18397  if test "x$HG" = x; then
18398    # The variable is not set by user, try to locate tool using the code snippet
18399    for ac_prog in hg
18400do
18401  # Extract the first word of "$ac_prog", so it can be a program name with args.
18402set dummy $ac_prog; ac_word=$2
18403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18404$as_echo_n "checking for $ac_word... " >&6; }
18405if ${ac_cv_path_HG+:} false; then :
18406  $as_echo_n "(cached) " >&6
18407else
18408  case $HG in
18409  [\\/]* | ?:[\\/]*)
18410  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18411  ;;
18412  *)
18413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18414for as_dir in $PATH
18415do
18416  IFS=$as_save_IFS
18417  test -z "$as_dir" && as_dir=.
18418    for ac_exec_ext in '' $ac_executable_extensions; do
18419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18420    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18422    break 2
18423  fi
18424done
18425  done
18426IFS=$as_save_IFS
18427
18428  ;;
18429esac
18430fi
18431HG=$ac_cv_path_HG
18432if test -n "$HG"; then
18433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18434$as_echo "$HG" >&6; }
18435else
18436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18437$as_echo "no" >&6; }
18438fi
18439
18440
18441  test -n "$HG" && break
18442done
18443
18444  else
18445    # The variable is set, but is it from the command line or the environment?
18446
18447    # Try to remove the string !HG! from our list.
18448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18450      # If it failed, the variable was not from the command line. Ignore it,
18451      # but warn the user (except for BASH, which is always set by the calling BASH).
18452      if test "xHG" != xBASH; then
18453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18454$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18455      fi
18456      # Try to locate tool using the code snippet
18457      for ac_prog in hg
18458do
18459  # Extract the first word of "$ac_prog", so it can be a program name with args.
18460set dummy $ac_prog; ac_word=$2
18461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18462$as_echo_n "checking for $ac_word... " >&6; }
18463if ${ac_cv_path_HG+:} false; then :
18464  $as_echo_n "(cached) " >&6
18465else
18466  case $HG in
18467  [\\/]* | ?:[\\/]*)
18468  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18469  ;;
18470  *)
18471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18472for as_dir in $PATH
18473do
18474  IFS=$as_save_IFS
18475  test -z "$as_dir" && as_dir=.
18476    for ac_exec_ext in '' $ac_executable_extensions; do
18477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18478    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18480    break 2
18481  fi
18482done
18483  done
18484IFS=$as_save_IFS
18485
18486  ;;
18487esac
18488fi
18489HG=$ac_cv_path_HG
18490if test -n "$HG"; then
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18492$as_echo "$HG" >&6; }
18493else
18494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18495$as_echo "no" >&6; }
18496fi
18497
18498
18499  test -n "$HG" && break
18500done
18501
18502    else
18503      # If it succeeded, then it was overridden by the user. We will use it
18504      # for the tool.
18505
18506      # First remove it from the list of overridden variables, so we can test
18507      # for unknown variables in the end.
18508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18509
18510      # Check if the provided tool contains a complete path.
18511      tool_specified="$HG"
18512      tool_basename="${tool_specified##*/}"
18513      if test "x$tool_basename" = "x$tool_specified"; then
18514        # A command without a complete path is provided, search $PATH.
18515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18516$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18517        # Extract the first word of "$tool_basename", so it can be a program name with args.
18518set dummy $tool_basename; ac_word=$2
18519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18520$as_echo_n "checking for $ac_word... " >&6; }
18521if ${ac_cv_path_HG+:} false; then :
18522  $as_echo_n "(cached) " >&6
18523else
18524  case $HG in
18525  [\\/]* | ?:[\\/]*)
18526  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18527  ;;
18528  *)
18529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18530for as_dir in $PATH
18531do
18532  IFS=$as_save_IFS
18533  test -z "$as_dir" && as_dir=.
18534    for ac_exec_ext in '' $ac_executable_extensions; do
18535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18536    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18538    break 2
18539  fi
18540done
18541  done
18542IFS=$as_save_IFS
18543
18544  ;;
18545esac
18546fi
18547HG=$ac_cv_path_HG
18548if test -n "$HG"; then
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18550$as_echo "$HG" >&6; }
18551else
18552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18553$as_echo "no" >&6; }
18554fi
18555
18556
18557        if test "x$HG" = x; then
18558          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18559        fi
18560      else
18561        # Otherwise we believe it is a complete path. Use it as it is.
18562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18563$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18565$as_echo_n "checking for HG... " >&6; }
18566        if test ! -x "$tool_specified"; then
18567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18568$as_echo "not found" >&6; }
18569          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18570        fi
18571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18572$as_echo "$tool_specified" >&6; }
18573      fi
18574    fi
18575  fi
18576
18577
18578
18579
18580  # Publish this variable in the help.
18581
18582
18583  if test "x$STAT" = x; then
18584    # The variable is not set by user, try to locate tool using the code snippet
18585    for ac_prog in stat
18586do
18587  # Extract the first word of "$ac_prog", so it can be a program name with args.
18588set dummy $ac_prog; ac_word=$2
18589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18590$as_echo_n "checking for $ac_word... " >&6; }
18591if ${ac_cv_path_STAT+:} false; then :
18592  $as_echo_n "(cached) " >&6
18593else
18594  case $STAT in
18595  [\\/]* | ?:[\\/]*)
18596  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18597  ;;
18598  *)
18599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18600for as_dir in $PATH
18601do
18602  IFS=$as_save_IFS
18603  test -z "$as_dir" && as_dir=.
18604    for ac_exec_ext in '' $ac_executable_extensions; do
18605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18606    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18608    break 2
18609  fi
18610done
18611  done
18612IFS=$as_save_IFS
18613
18614  ;;
18615esac
18616fi
18617STAT=$ac_cv_path_STAT
18618if test -n "$STAT"; then
18619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18620$as_echo "$STAT" >&6; }
18621else
18622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18623$as_echo "no" >&6; }
18624fi
18625
18626
18627  test -n "$STAT" && break
18628done
18629
18630  else
18631    # The variable is set, but is it from the command line or the environment?
18632
18633    # Try to remove the string !STAT! from our list.
18634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18636      # If it failed, the variable was not from the command line. Ignore it,
18637      # but warn the user (except for BASH, which is always set by the calling BASH).
18638      if test "xSTAT" != xBASH; then
18639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18640$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18641      fi
18642      # Try to locate tool using the code snippet
18643      for ac_prog in stat
18644do
18645  # Extract the first word of "$ac_prog", so it can be a program name with args.
18646set dummy $ac_prog; ac_word=$2
18647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18648$as_echo_n "checking for $ac_word... " >&6; }
18649if ${ac_cv_path_STAT+:} false; then :
18650  $as_echo_n "(cached) " >&6
18651else
18652  case $STAT in
18653  [\\/]* | ?:[\\/]*)
18654  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18655  ;;
18656  *)
18657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18658for as_dir in $PATH
18659do
18660  IFS=$as_save_IFS
18661  test -z "$as_dir" && as_dir=.
18662    for ac_exec_ext in '' $ac_executable_extensions; do
18663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18664    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18666    break 2
18667  fi
18668done
18669  done
18670IFS=$as_save_IFS
18671
18672  ;;
18673esac
18674fi
18675STAT=$ac_cv_path_STAT
18676if test -n "$STAT"; then
18677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18678$as_echo "$STAT" >&6; }
18679else
18680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18681$as_echo "no" >&6; }
18682fi
18683
18684
18685  test -n "$STAT" && break
18686done
18687
18688    else
18689      # If it succeeded, then it was overridden by the user. We will use it
18690      # for the tool.
18691
18692      # First remove it from the list of overridden variables, so we can test
18693      # for unknown variables in the end.
18694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18695
18696      # Check if the provided tool contains a complete path.
18697      tool_specified="$STAT"
18698      tool_basename="${tool_specified##*/}"
18699      if test "x$tool_basename" = "x$tool_specified"; then
18700        # A command without a complete path is provided, search $PATH.
18701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18702$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18703        # Extract the first word of "$tool_basename", so it can be a program name with args.
18704set dummy $tool_basename; ac_word=$2
18705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18706$as_echo_n "checking for $ac_word... " >&6; }
18707if ${ac_cv_path_STAT+:} false; then :
18708  $as_echo_n "(cached) " >&6
18709else
18710  case $STAT in
18711  [\\/]* | ?:[\\/]*)
18712  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18713  ;;
18714  *)
18715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18716for as_dir in $PATH
18717do
18718  IFS=$as_save_IFS
18719  test -z "$as_dir" && as_dir=.
18720    for ac_exec_ext in '' $ac_executable_extensions; do
18721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18722    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18724    break 2
18725  fi
18726done
18727  done
18728IFS=$as_save_IFS
18729
18730  ;;
18731esac
18732fi
18733STAT=$ac_cv_path_STAT
18734if test -n "$STAT"; then
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18736$as_echo "$STAT" >&6; }
18737else
18738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18739$as_echo "no" >&6; }
18740fi
18741
18742
18743        if test "x$STAT" = x; then
18744          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18745        fi
18746      else
18747        # Otherwise we believe it is a complete path. Use it as it is.
18748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18749$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18751$as_echo_n "checking for STAT... " >&6; }
18752        if test ! -x "$tool_specified"; then
18753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18754$as_echo "not found" >&6; }
18755          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18756        fi
18757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18758$as_echo "$tool_specified" >&6; }
18759      fi
18760    fi
18761  fi
18762
18763
18764
18765
18766  # Publish this variable in the help.
18767
18768
18769  if test "x$TIME" = x; then
18770    # The variable is not set by user, try to locate tool using the code snippet
18771    for ac_prog in time
18772do
18773  # Extract the first word of "$ac_prog", so it can be a program name with args.
18774set dummy $ac_prog; ac_word=$2
18775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18776$as_echo_n "checking for $ac_word... " >&6; }
18777if ${ac_cv_path_TIME+:} false; then :
18778  $as_echo_n "(cached) " >&6
18779else
18780  case $TIME in
18781  [\\/]* | ?:[\\/]*)
18782  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18783  ;;
18784  *)
18785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18786for as_dir in $PATH
18787do
18788  IFS=$as_save_IFS
18789  test -z "$as_dir" && as_dir=.
18790    for ac_exec_ext in '' $ac_executable_extensions; do
18791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18792    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18794    break 2
18795  fi
18796done
18797  done
18798IFS=$as_save_IFS
18799
18800  ;;
18801esac
18802fi
18803TIME=$ac_cv_path_TIME
18804if test -n "$TIME"; then
18805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18806$as_echo "$TIME" >&6; }
18807else
18808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18809$as_echo "no" >&6; }
18810fi
18811
18812
18813  test -n "$TIME" && break
18814done
18815
18816  else
18817    # The variable is set, but is it from the command line or the environment?
18818
18819    # Try to remove the string !TIME! from our list.
18820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18822      # If it failed, the variable was not from the command line. Ignore it,
18823      # but warn the user (except for BASH, which is always set by the calling BASH).
18824      if test "xTIME" != xBASH; then
18825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18826$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18827      fi
18828      # Try to locate tool using the code snippet
18829      for ac_prog in time
18830do
18831  # Extract the first word of "$ac_prog", so it can be a program name with args.
18832set dummy $ac_prog; ac_word=$2
18833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18834$as_echo_n "checking for $ac_word... " >&6; }
18835if ${ac_cv_path_TIME+:} false; then :
18836  $as_echo_n "(cached) " >&6
18837else
18838  case $TIME in
18839  [\\/]* | ?:[\\/]*)
18840  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18841  ;;
18842  *)
18843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18844for as_dir in $PATH
18845do
18846  IFS=$as_save_IFS
18847  test -z "$as_dir" && as_dir=.
18848    for ac_exec_ext in '' $ac_executable_extensions; do
18849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18850    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18852    break 2
18853  fi
18854done
18855  done
18856IFS=$as_save_IFS
18857
18858  ;;
18859esac
18860fi
18861TIME=$ac_cv_path_TIME
18862if test -n "$TIME"; then
18863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18864$as_echo "$TIME" >&6; }
18865else
18866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18867$as_echo "no" >&6; }
18868fi
18869
18870
18871  test -n "$TIME" && break
18872done
18873
18874    else
18875      # If it succeeded, then it was overridden by the user. We will use it
18876      # for the tool.
18877
18878      # First remove it from the list of overridden variables, so we can test
18879      # for unknown variables in the end.
18880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18881
18882      # Check if the provided tool contains a complete path.
18883      tool_specified="$TIME"
18884      tool_basename="${tool_specified##*/}"
18885      if test "x$tool_basename" = "x$tool_specified"; then
18886        # A command without a complete path is provided, search $PATH.
18887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18888$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18889        # Extract the first word of "$tool_basename", so it can be a program name with args.
18890set dummy $tool_basename; ac_word=$2
18891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18892$as_echo_n "checking for $ac_word... " >&6; }
18893if ${ac_cv_path_TIME+:} false; then :
18894  $as_echo_n "(cached) " >&6
18895else
18896  case $TIME in
18897  [\\/]* | ?:[\\/]*)
18898  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18899  ;;
18900  *)
18901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18902for as_dir in $PATH
18903do
18904  IFS=$as_save_IFS
18905  test -z "$as_dir" && as_dir=.
18906    for ac_exec_ext in '' $ac_executable_extensions; do
18907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18908    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18910    break 2
18911  fi
18912done
18913  done
18914IFS=$as_save_IFS
18915
18916  ;;
18917esac
18918fi
18919TIME=$ac_cv_path_TIME
18920if test -n "$TIME"; then
18921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18922$as_echo "$TIME" >&6; }
18923else
18924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18925$as_echo "no" >&6; }
18926fi
18927
18928
18929        if test "x$TIME" = x; then
18930          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18931        fi
18932      else
18933        # Otherwise we believe it is a complete path. Use it as it is.
18934        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18935$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18937$as_echo_n "checking for TIME... " >&6; }
18938        if test ! -x "$tool_specified"; then
18939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18940$as_echo "not found" >&6; }
18941          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18942        fi
18943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18944$as_echo "$tool_specified" >&6; }
18945      fi
18946    fi
18947  fi
18948
18949
18950
18951
18952  # Publish this variable in the help.
18953
18954
18955  if test "x$PATCH" = x; then
18956    # The variable is not set by user, try to locate tool using the code snippet
18957    for ac_prog in gpatch patch
18958do
18959  # Extract the first word of "$ac_prog", so it can be a program name with args.
18960set dummy $ac_prog; ac_word=$2
18961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18962$as_echo_n "checking for $ac_word... " >&6; }
18963if ${ac_cv_path_PATCH+:} false; then :
18964  $as_echo_n "(cached) " >&6
18965else
18966  case $PATCH in
18967  [\\/]* | ?:[\\/]*)
18968  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18969  ;;
18970  *)
18971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18972for as_dir in $PATH
18973do
18974  IFS=$as_save_IFS
18975  test -z "$as_dir" && as_dir=.
18976    for ac_exec_ext in '' $ac_executable_extensions; do
18977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18978    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18980    break 2
18981  fi
18982done
18983  done
18984IFS=$as_save_IFS
18985
18986  ;;
18987esac
18988fi
18989PATCH=$ac_cv_path_PATCH
18990if test -n "$PATCH"; then
18991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18992$as_echo "$PATCH" >&6; }
18993else
18994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18995$as_echo "no" >&6; }
18996fi
18997
18998
18999  test -n "$PATCH" && break
19000done
19001
19002  else
19003    # The variable is set, but is it from the command line or the environment?
19004
19005    # Try to remove the string !PATCH! from our list.
19006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
19007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19008      # If it failed, the variable was not from the command line. Ignore it,
19009      # but warn the user (except for BASH, which is always set by the calling BASH).
19010      if test "xPATCH" != xBASH; then
19011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
19012$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
19013      fi
19014      # Try to locate tool using the code snippet
19015      for ac_prog in gpatch patch
19016do
19017  # Extract the first word of "$ac_prog", so it can be a program name with args.
19018set dummy $ac_prog; ac_word=$2
19019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19020$as_echo_n "checking for $ac_word... " >&6; }
19021if ${ac_cv_path_PATCH+:} false; then :
19022  $as_echo_n "(cached) " >&6
19023else
19024  case $PATCH in
19025  [\\/]* | ?:[\\/]*)
19026  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19027  ;;
19028  *)
19029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19030for as_dir in $PATH
19031do
19032  IFS=$as_save_IFS
19033  test -z "$as_dir" && as_dir=.
19034    for ac_exec_ext in '' $ac_executable_extensions; do
19035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19036    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19038    break 2
19039  fi
19040done
19041  done
19042IFS=$as_save_IFS
19043
19044  ;;
19045esac
19046fi
19047PATCH=$ac_cv_path_PATCH
19048if test -n "$PATCH"; then
19049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19050$as_echo "$PATCH" >&6; }
19051else
19052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19053$as_echo "no" >&6; }
19054fi
19055
19056
19057  test -n "$PATCH" && break
19058done
19059
19060    else
19061      # If it succeeded, then it was overridden by the user. We will use it
19062      # for the tool.
19063
19064      # First remove it from the list of overridden variables, so we can test
19065      # for unknown variables in the end.
19066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19067
19068      # Check if the provided tool contains a complete path.
19069      tool_specified="$PATCH"
19070      tool_basename="${tool_specified##*/}"
19071      if test "x$tool_basename" = "x$tool_specified"; then
19072        # A command without a complete path is provided, search $PATH.
19073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
19074$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
19075        # Extract the first word of "$tool_basename", so it can be a program name with args.
19076set dummy $tool_basename; ac_word=$2
19077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19078$as_echo_n "checking for $ac_word... " >&6; }
19079if ${ac_cv_path_PATCH+:} false; then :
19080  $as_echo_n "(cached) " >&6
19081else
19082  case $PATCH in
19083  [\\/]* | ?:[\\/]*)
19084  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19085  ;;
19086  *)
19087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19088for as_dir in $PATH
19089do
19090  IFS=$as_save_IFS
19091  test -z "$as_dir" && as_dir=.
19092    for ac_exec_ext in '' $ac_executable_extensions; do
19093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19094    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19096    break 2
19097  fi
19098done
19099  done
19100IFS=$as_save_IFS
19101
19102  ;;
19103esac
19104fi
19105PATCH=$ac_cv_path_PATCH
19106if test -n "$PATCH"; then
19107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19108$as_echo "$PATCH" >&6; }
19109else
19110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19111$as_echo "no" >&6; }
19112fi
19113
19114
19115        if test "x$PATCH" = x; then
19116          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19117        fi
19118      else
19119        # Otherwise we believe it is a complete path. Use it as it is.
19120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
19121$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
19122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19123$as_echo_n "checking for PATCH... " >&6; }
19124        if test ! -x "$tool_specified"; then
19125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19126$as_echo "not found" >&6; }
19127          as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
19128        fi
19129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19130$as_echo "$tool_specified" >&6; }
19131      fi
19132    fi
19133  fi
19134
19135
19136  # Check if it's GNU time
19137  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19138  if test "x$IS_GNU_TIME" != x; then
19139    IS_GNU_TIME=yes
19140  else
19141    IS_GNU_TIME=no
19142  fi
19143
19144
19145  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19146
19147
19148
19149  # Publish this variable in the help.
19150
19151
19152  if test "x$DSYMUTIL" = x; then
19153    # The variable is not set by user, try to locate tool using the code snippet
19154    for ac_prog in dsymutil
19155do
19156  # Extract the first word of "$ac_prog", so it can be a program name with args.
19157set dummy $ac_prog; ac_word=$2
19158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19159$as_echo_n "checking for $ac_word... " >&6; }
19160if ${ac_cv_path_DSYMUTIL+:} false; then :
19161  $as_echo_n "(cached) " >&6
19162else
19163  case $DSYMUTIL in
19164  [\\/]* | ?:[\\/]*)
19165  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19166  ;;
19167  *)
19168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19169for as_dir in $PATH
19170do
19171  IFS=$as_save_IFS
19172  test -z "$as_dir" && as_dir=.
19173    for ac_exec_ext in '' $ac_executable_extensions; do
19174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19175    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19177    break 2
19178  fi
19179done
19180  done
19181IFS=$as_save_IFS
19182
19183  ;;
19184esac
19185fi
19186DSYMUTIL=$ac_cv_path_DSYMUTIL
19187if test -n "$DSYMUTIL"; then
19188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19189$as_echo "$DSYMUTIL" >&6; }
19190else
19191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19192$as_echo "no" >&6; }
19193fi
19194
19195
19196  test -n "$DSYMUTIL" && break
19197done
19198
19199  else
19200    # The variable is set, but is it from the command line or the environment?
19201
19202    # Try to remove the string !DSYMUTIL! from our list.
19203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19205      # If it failed, the variable was not from the command line. Ignore it,
19206      # but warn the user (except for BASH, which is always set by the calling BASH).
19207      if test "xDSYMUTIL" != xBASH; then
19208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19209$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19210      fi
19211      # Try to locate tool using the code snippet
19212      for ac_prog in dsymutil
19213do
19214  # Extract the first word of "$ac_prog", so it can be a program name with args.
19215set dummy $ac_prog; ac_word=$2
19216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19217$as_echo_n "checking for $ac_word... " >&6; }
19218if ${ac_cv_path_DSYMUTIL+:} false; then :
19219  $as_echo_n "(cached) " >&6
19220else
19221  case $DSYMUTIL in
19222  [\\/]* | ?:[\\/]*)
19223  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19224  ;;
19225  *)
19226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19227for as_dir in $PATH
19228do
19229  IFS=$as_save_IFS
19230  test -z "$as_dir" && as_dir=.
19231    for ac_exec_ext in '' $ac_executable_extensions; do
19232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19233    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19235    break 2
19236  fi
19237done
19238  done
19239IFS=$as_save_IFS
19240
19241  ;;
19242esac
19243fi
19244DSYMUTIL=$ac_cv_path_DSYMUTIL
19245if test -n "$DSYMUTIL"; then
19246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19247$as_echo "$DSYMUTIL" >&6; }
19248else
19249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19250$as_echo "no" >&6; }
19251fi
19252
19253
19254  test -n "$DSYMUTIL" && break
19255done
19256
19257    else
19258      # If it succeeded, then it was overridden by the user. We will use it
19259      # for the tool.
19260
19261      # First remove it from the list of overridden variables, so we can test
19262      # for unknown variables in the end.
19263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19264
19265      # Check if the provided tool contains a complete path.
19266      tool_specified="$DSYMUTIL"
19267      tool_basename="${tool_specified##*/}"
19268      if test "x$tool_basename" = "x$tool_specified"; then
19269        # A command without a complete path is provided, search $PATH.
19270        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19271$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19272        # Extract the first word of "$tool_basename", so it can be a program name with args.
19273set dummy $tool_basename; ac_word=$2
19274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19275$as_echo_n "checking for $ac_word... " >&6; }
19276if ${ac_cv_path_DSYMUTIL+:} false; then :
19277  $as_echo_n "(cached) " >&6
19278else
19279  case $DSYMUTIL in
19280  [\\/]* | ?:[\\/]*)
19281  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19282  ;;
19283  *)
19284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19285for as_dir in $PATH
19286do
19287  IFS=$as_save_IFS
19288  test -z "$as_dir" && as_dir=.
19289    for ac_exec_ext in '' $ac_executable_extensions; do
19290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19291    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19293    break 2
19294  fi
19295done
19296  done
19297IFS=$as_save_IFS
19298
19299  ;;
19300esac
19301fi
19302DSYMUTIL=$ac_cv_path_DSYMUTIL
19303if test -n "$DSYMUTIL"; then
19304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19305$as_echo "$DSYMUTIL" >&6; }
19306else
19307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19308$as_echo "no" >&6; }
19309fi
19310
19311
19312        if test "x$DSYMUTIL" = x; then
19313          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19314        fi
19315      else
19316        # Otherwise we believe it is a complete path. Use it as it is.
19317        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19318$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19320$as_echo_n "checking for DSYMUTIL... " >&6; }
19321        if test ! -x "$tool_specified"; then
19322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19323$as_echo "not found" >&6; }
19324          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19325        fi
19326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19327$as_echo "$tool_specified" >&6; }
19328      fi
19329    fi
19330  fi
19331
19332
19333
19334  if test "x$DSYMUTIL" = x; then
19335    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19336  fi
19337
19338
19339
19340
19341
19342  # Publish this variable in the help.
19343
19344
19345  if test "x$XATTR" = x; then
19346    # The variable is not set by user, try to locate tool using the code snippet
19347    for ac_prog in xattr
19348do
19349  # Extract the first word of "$ac_prog", so it can be a program name with args.
19350set dummy $ac_prog; ac_word=$2
19351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19352$as_echo_n "checking for $ac_word... " >&6; }
19353if ${ac_cv_path_XATTR+:} false; then :
19354  $as_echo_n "(cached) " >&6
19355else
19356  case $XATTR in
19357  [\\/]* | ?:[\\/]*)
19358  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19359  ;;
19360  *)
19361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19362for as_dir in $PATH
19363do
19364  IFS=$as_save_IFS
19365  test -z "$as_dir" && as_dir=.
19366    for ac_exec_ext in '' $ac_executable_extensions; do
19367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19368    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19370    break 2
19371  fi
19372done
19373  done
19374IFS=$as_save_IFS
19375
19376  ;;
19377esac
19378fi
19379XATTR=$ac_cv_path_XATTR
19380if test -n "$XATTR"; then
19381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19382$as_echo "$XATTR" >&6; }
19383else
19384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19385$as_echo "no" >&6; }
19386fi
19387
19388
19389  test -n "$XATTR" && break
19390done
19391
19392  else
19393    # The variable is set, but is it from the command line or the environment?
19394
19395    # Try to remove the string !XATTR! from our list.
19396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19398      # If it failed, the variable was not from the command line. Ignore it,
19399      # but warn the user (except for BASH, which is always set by the calling BASH).
19400      if test "xXATTR" != xBASH; then
19401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19402$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19403      fi
19404      # Try to locate tool using the code snippet
19405      for ac_prog in xattr
19406do
19407  # Extract the first word of "$ac_prog", so it can be a program name with args.
19408set dummy $ac_prog; ac_word=$2
19409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19410$as_echo_n "checking for $ac_word... " >&6; }
19411if ${ac_cv_path_XATTR+:} false; then :
19412  $as_echo_n "(cached) " >&6
19413else
19414  case $XATTR in
19415  [\\/]* | ?:[\\/]*)
19416  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19417  ;;
19418  *)
19419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19420for as_dir in $PATH
19421do
19422  IFS=$as_save_IFS
19423  test -z "$as_dir" && as_dir=.
19424    for ac_exec_ext in '' $ac_executable_extensions; do
19425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19426    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19428    break 2
19429  fi
19430done
19431  done
19432IFS=$as_save_IFS
19433
19434  ;;
19435esac
19436fi
19437XATTR=$ac_cv_path_XATTR
19438if test -n "$XATTR"; then
19439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19440$as_echo "$XATTR" >&6; }
19441else
19442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19443$as_echo "no" >&6; }
19444fi
19445
19446
19447  test -n "$XATTR" && break
19448done
19449
19450    else
19451      # If it succeeded, then it was overridden by the user. We will use it
19452      # for the tool.
19453
19454      # First remove it from the list of overridden variables, so we can test
19455      # for unknown variables in the end.
19456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19457
19458      # Check if the provided tool contains a complete path.
19459      tool_specified="$XATTR"
19460      tool_basename="${tool_specified##*/}"
19461      if test "x$tool_basename" = "x$tool_specified"; then
19462        # A command without a complete path is provided, search $PATH.
19463        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19464$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19465        # Extract the first word of "$tool_basename", so it can be a program name with args.
19466set dummy $tool_basename; ac_word=$2
19467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19468$as_echo_n "checking for $ac_word... " >&6; }
19469if ${ac_cv_path_XATTR+:} false; then :
19470  $as_echo_n "(cached) " >&6
19471else
19472  case $XATTR in
19473  [\\/]* | ?:[\\/]*)
19474  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19475  ;;
19476  *)
19477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19478for as_dir in $PATH
19479do
19480  IFS=$as_save_IFS
19481  test -z "$as_dir" && as_dir=.
19482    for ac_exec_ext in '' $ac_executable_extensions; do
19483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19484    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19486    break 2
19487  fi
19488done
19489  done
19490IFS=$as_save_IFS
19491
19492  ;;
19493esac
19494fi
19495XATTR=$ac_cv_path_XATTR
19496if test -n "$XATTR"; then
19497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19498$as_echo "$XATTR" >&6; }
19499else
19500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19501$as_echo "no" >&6; }
19502fi
19503
19504
19505        if test "x$XATTR" = x; then
19506          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19507        fi
19508      else
19509        # Otherwise we believe it is a complete path. Use it as it is.
19510        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19511$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19513$as_echo_n "checking for XATTR... " >&6; }
19514        if test ! -x "$tool_specified"; then
19515          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19516$as_echo "not found" >&6; }
19517          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19518        fi
19519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19520$as_echo "$tool_specified" >&6; }
19521      fi
19522    fi
19523  fi
19524
19525
19526
19527  if test "x$XATTR" = x; then
19528    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19529  fi
19530
19531
19532
19533
19534  # Publish this variable in the help.
19535
19536
19537  if test "x$CODESIGN" = x; then
19538    # The variable is not set by user, try to locate tool using the code snippet
19539    for ac_prog in codesign
19540do
19541  # Extract the first word of "$ac_prog", so it can be a program name with args.
19542set dummy $ac_prog; ac_word=$2
19543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19544$as_echo_n "checking for $ac_word... " >&6; }
19545if ${ac_cv_path_CODESIGN+:} false; then :
19546  $as_echo_n "(cached) " >&6
19547else
19548  case $CODESIGN in
19549  [\\/]* | ?:[\\/]*)
19550  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19551  ;;
19552  *)
19553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19554for as_dir in $PATH
19555do
19556  IFS=$as_save_IFS
19557  test -z "$as_dir" && as_dir=.
19558    for ac_exec_ext in '' $ac_executable_extensions; do
19559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19560    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19562    break 2
19563  fi
19564done
19565  done
19566IFS=$as_save_IFS
19567
19568  ;;
19569esac
19570fi
19571CODESIGN=$ac_cv_path_CODESIGN
19572if test -n "$CODESIGN"; then
19573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19574$as_echo "$CODESIGN" >&6; }
19575else
19576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19577$as_echo "no" >&6; }
19578fi
19579
19580
19581  test -n "$CODESIGN" && break
19582done
19583
19584  else
19585    # The variable is set, but is it from the command line or the environment?
19586
19587    # Try to remove the string !CODESIGN! from our list.
19588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19590      # If it failed, the variable was not from the command line. Ignore it,
19591      # but warn the user (except for BASH, which is always set by the calling BASH).
19592      if test "xCODESIGN" != xBASH; then
19593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19594$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19595      fi
19596      # Try to locate tool using the code snippet
19597      for ac_prog in codesign
19598do
19599  # Extract the first word of "$ac_prog", so it can be a program name with args.
19600set dummy $ac_prog; ac_word=$2
19601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19602$as_echo_n "checking for $ac_word... " >&6; }
19603if ${ac_cv_path_CODESIGN+:} false; then :
19604  $as_echo_n "(cached) " >&6
19605else
19606  case $CODESIGN in
19607  [\\/]* | ?:[\\/]*)
19608  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19609  ;;
19610  *)
19611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19612for as_dir in $PATH
19613do
19614  IFS=$as_save_IFS
19615  test -z "$as_dir" && as_dir=.
19616    for ac_exec_ext in '' $ac_executable_extensions; do
19617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19618    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19620    break 2
19621  fi
19622done
19623  done
19624IFS=$as_save_IFS
19625
19626  ;;
19627esac
19628fi
19629CODESIGN=$ac_cv_path_CODESIGN
19630if test -n "$CODESIGN"; then
19631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19632$as_echo "$CODESIGN" >&6; }
19633else
19634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19635$as_echo "no" >&6; }
19636fi
19637
19638
19639  test -n "$CODESIGN" && break
19640done
19641
19642    else
19643      # If it succeeded, then it was overridden by the user. We will use it
19644      # for the tool.
19645
19646      # First remove it from the list of overridden variables, so we can test
19647      # for unknown variables in the end.
19648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19649
19650      # Check if the provided tool contains a complete path.
19651      tool_specified="$CODESIGN"
19652      tool_basename="${tool_specified##*/}"
19653      if test "x$tool_basename" = "x$tool_specified"; then
19654        # A command without a complete path is provided, search $PATH.
19655        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19656$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19657        # Extract the first word of "$tool_basename", so it can be a program name with args.
19658set dummy $tool_basename; ac_word=$2
19659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19660$as_echo_n "checking for $ac_word... " >&6; }
19661if ${ac_cv_path_CODESIGN+:} false; then :
19662  $as_echo_n "(cached) " >&6
19663else
19664  case $CODESIGN in
19665  [\\/]* | ?:[\\/]*)
19666  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19667  ;;
19668  *)
19669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19670for as_dir in $PATH
19671do
19672  IFS=$as_save_IFS
19673  test -z "$as_dir" && as_dir=.
19674    for ac_exec_ext in '' $ac_executable_extensions; do
19675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19676    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19678    break 2
19679  fi
19680done
19681  done
19682IFS=$as_save_IFS
19683
19684  ;;
19685esac
19686fi
19687CODESIGN=$ac_cv_path_CODESIGN
19688if test -n "$CODESIGN"; then
19689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19690$as_echo "$CODESIGN" >&6; }
19691else
19692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19693$as_echo "no" >&6; }
19694fi
19695
19696
19697        if test "x$CODESIGN" = x; then
19698          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19699        fi
19700      else
19701        # Otherwise we believe it is a complete path. Use it as it is.
19702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19703$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19705$as_echo_n "checking for CODESIGN... " >&6; }
19706        if test ! -x "$tool_specified"; then
19707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19708$as_echo "not found" >&6; }
19709          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19710        fi
19711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19712$as_echo "$tool_specified" >&6; }
19713      fi
19714    fi
19715  fi
19716
19717
19718    if test "x$CODESIGN" != "x"; then
19719      # Verify that the openjdk_codesign certificate is present
19720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19721$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19722      rm -f codesign-testfile
19723      touch codesign-testfile
19724      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19725      rm -f codesign-testfile
19726      if test "x$CODESIGN" = x; then
19727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19728$as_echo "no" >&6; }
19729      else
19730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19731$as_echo "yes" >&6; }
19732      fi
19733    fi
19734
19735
19736
19737  # Publish this variable in the help.
19738
19739
19740  if test "x$SETFILE" = x; then
19741    # The variable is not set by user, try to locate tool using the code snippet
19742    for ac_prog in SetFile
19743do
19744  # Extract the first word of "$ac_prog", so it can be a program name with args.
19745set dummy $ac_prog; ac_word=$2
19746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19747$as_echo_n "checking for $ac_word... " >&6; }
19748if ${ac_cv_path_SETFILE+:} false; then :
19749  $as_echo_n "(cached) " >&6
19750else
19751  case $SETFILE in
19752  [\\/]* | ?:[\\/]*)
19753  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19754  ;;
19755  *)
19756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19757for as_dir in $PATH
19758do
19759  IFS=$as_save_IFS
19760  test -z "$as_dir" && as_dir=.
19761    for ac_exec_ext in '' $ac_executable_extensions; do
19762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19763    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19765    break 2
19766  fi
19767done
19768  done
19769IFS=$as_save_IFS
19770
19771  ;;
19772esac
19773fi
19774SETFILE=$ac_cv_path_SETFILE
19775if test -n "$SETFILE"; then
19776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19777$as_echo "$SETFILE" >&6; }
19778else
19779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19780$as_echo "no" >&6; }
19781fi
19782
19783
19784  test -n "$SETFILE" && break
19785done
19786
19787  else
19788    # The variable is set, but is it from the command line or the environment?
19789
19790    # Try to remove the string !SETFILE! from our list.
19791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19793      # If it failed, the variable was not from the command line. Ignore it,
19794      # but warn the user (except for BASH, which is always set by the calling BASH).
19795      if test "xSETFILE" != xBASH; then
19796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19797$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19798      fi
19799      # Try to locate tool using the code snippet
19800      for ac_prog in SetFile
19801do
19802  # Extract the first word of "$ac_prog", so it can be a program name with args.
19803set dummy $ac_prog; ac_word=$2
19804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19805$as_echo_n "checking for $ac_word... " >&6; }
19806if ${ac_cv_path_SETFILE+:} false; then :
19807  $as_echo_n "(cached) " >&6
19808else
19809  case $SETFILE in
19810  [\\/]* | ?:[\\/]*)
19811  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19812  ;;
19813  *)
19814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19815for as_dir in $PATH
19816do
19817  IFS=$as_save_IFS
19818  test -z "$as_dir" && as_dir=.
19819    for ac_exec_ext in '' $ac_executable_extensions; do
19820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19821    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19823    break 2
19824  fi
19825done
19826  done
19827IFS=$as_save_IFS
19828
19829  ;;
19830esac
19831fi
19832SETFILE=$ac_cv_path_SETFILE
19833if test -n "$SETFILE"; then
19834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19835$as_echo "$SETFILE" >&6; }
19836else
19837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19838$as_echo "no" >&6; }
19839fi
19840
19841
19842  test -n "$SETFILE" && break
19843done
19844
19845    else
19846      # If it succeeded, then it was overridden by the user. We will use it
19847      # for the tool.
19848
19849      # First remove it from the list of overridden variables, so we can test
19850      # for unknown variables in the end.
19851      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19852
19853      # Check if the provided tool contains a complete path.
19854      tool_specified="$SETFILE"
19855      tool_basename="${tool_specified##*/}"
19856      if test "x$tool_basename" = "x$tool_specified"; then
19857        # A command without a complete path is provided, search $PATH.
19858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19859$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19860        # Extract the first word of "$tool_basename", so it can be a program name with args.
19861set dummy $tool_basename; ac_word=$2
19862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19863$as_echo_n "checking for $ac_word... " >&6; }
19864if ${ac_cv_path_SETFILE+:} false; then :
19865  $as_echo_n "(cached) " >&6
19866else
19867  case $SETFILE in
19868  [\\/]* | ?:[\\/]*)
19869  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19870  ;;
19871  *)
19872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19873for as_dir in $PATH
19874do
19875  IFS=$as_save_IFS
19876  test -z "$as_dir" && as_dir=.
19877    for ac_exec_ext in '' $ac_executable_extensions; do
19878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19879    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19881    break 2
19882  fi
19883done
19884  done
19885IFS=$as_save_IFS
19886
19887  ;;
19888esac
19889fi
19890SETFILE=$ac_cv_path_SETFILE
19891if test -n "$SETFILE"; then
19892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19893$as_echo "$SETFILE" >&6; }
19894else
19895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19896$as_echo "no" >&6; }
19897fi
19898
19899
19900        if test "x$SETFILE" = x; then
19901          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19902        fi
19903      else
19904        # Otherwise we believe it is a complete path. Use it as it is.
19905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19906$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19908$as_echo_n "checking for SETFILE... " >&6; }
19909        if test ! -x "$tool_specified"; then
19910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19911$as_echo "not found" >&6; }
19912          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19913        fi
19914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19915$as_echo "$tool_specified" >&6; }
19916      fi
19917    fi
19918  fi
19919
19920
19921
19922  if test "x$SETFILE" = x; then
19923    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19924  fi
19925
19926
19927  fi
19928
19929
19930  # Test if bash supports pipefail.
19931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19932$as_echo_n "checking if bash supports pipefail... " >&6; }
19933  if ${BASH} -c 'set -o pipefail'; then
19934    BASH_ARGS="$BASH_ARGS -o pipefail"
19935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19936$as_echo "yes" >&6; }
19937  else
19938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19939$as_echo "no" >&6; }
19940  fi
19941
19942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19943$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19944  if ${BASH} -e -c 'true'; then
19945    BASH_ARGS="$BASH_ARGS -e"
19946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19947$as_echo "yes" >&6; }
19948  else
19949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19950$as_echo "no" >&6; }
19951  fi
19952
19953
19954
19955
19956# Check if pkg-config is available.
19957
19958
19959if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19960	if test -n "$ac_tool_prefix"; then
19961  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19962set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19964$as_echo_n "checking for $ac_word... " >&6; }
19965if ${ac_cv_path_PKG_CONFIG+:} false; then :
19966  $as_echo_n "(cached) " >&6
19967else
19968  case $PKG_CONFIG in
19969  [\\/]* | ?:[\\/]*)
19970  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19971  ;;
19972  *)
19973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19974for as_dir in $PATH
19975do
19976  IFS=$as_save_IFS
19977  test -z "$as_dir" && as_dir=.
19978    for ac_exec_ext in '' $ac_executable_extensions; do
19979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19980    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19982    break 2
19983  fi
19984done
19985  done
19986IFS=$as_save_IFS
19987
19988  ;;
19989esac
19990fi
19991PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19992if test -n "$PKG_CONFIG"; then
19993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19994$as_echo "$PKG_CONFIG" >&6; }
19995else
19996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19997$as_echo "no" >&6; }
19998fi
19999
20000
20001fi
20002if test -z "$ac_cv_path_PKG_CONFIG"; then
20003  ac_pt_PKG_CONFIG=$PKG_CONFIG
20004  # Extract the first word of "pkg-config", so it can be a program name with args.
20005set dummy pkg-config; ac_word=$2
20006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20007$as_echo_n "checking for $ac_word... " >&6; }
20008if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
20009  $as_echo_n "(cached) " >&6
20010else
20011  case $ac_pt_PKG_CONFIG in
20012  [\\/]* | ?:[\\/]*)
20013  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
20014  ;;
20015  *)
20016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20017for as_dir in $PATH
20018do
20019  IFS=$as_save_IFS
20020  test -z "$as_dir" && as_dir=.
20021    for ac_exec_ext in '' $ac_executable_extensions; do
20022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20023    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20025    break 2
20026  fi
20027done
20028  done
20029IFS=$as_save_IFS
20030
20031  ;;
20032esac
20033fi
20034ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
20035if test -n "$ac_pt_PKG_CONFIG"; then
20036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
20037$as_echo "$ac_pt_PKG_CONFIG" >&6; }
20038else
20039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20040$as_echo "no" >&6; }
20041fi
20042
20043  if test "x$ac_pt_PKG_CONFIG" = x; then
20044    PKG_CONFIG=""
20045  else
20046    case $cross_compiling:$ac_tool_warned in
20047yes:)
20048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20050ac_tool_warned=yes ;;
20051esac
20052    PKG_CONFIG=$ac_pt_PKG_CONFIG
20053  fi
20054else
20055  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
20056fi
20057
20058fi
20059if test -n "$PKG_CONFIG"; then
20060	_pkg_min_version=0.9.0
20061	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
20062$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
20063	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
20064		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20065$as_echo "yes" >&6; }
20066	else
20067		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20068$as_echo "no" >&6; }
20069		PKG_CONFIG=""
20070	fi
20071
20072fi
20073
20074# After basic tools have been setup, we can check build os specific details.
20075
20076  ###############################################################################
20077
20078  # Note that this is the build platform OS version!
20079
20080  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
20081  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
20082  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
20083  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
20084
20085
20086
20087
20088
20089# Setup builddeps, for automatic downloading of tools we need.
20090# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
20091# boot-jdk setup, but we need to have basic tools setup first.
20092
20093
20094# Check whether --with-builddeps-conf was given.
20095if test "${with_builddeps_conf+set}" = set; then :
20096  withval=$with_builddeps_conf;
20097fi
20098
20099
20100
20101# Check whether --with-builddeps-server was given.
20102if test "${with_builddeps_server+set}" = set; then :
20103  withval=$with_builddeps_server;
20104fi
20105
20106
20107
20108# Check whether --with-builddeps-dir was given.
20109if test "${with_builddeps_dir+set}" = set; then :
20110  withval=$with_builddeps_dir;
20111else
20112  with_builddeps_dir=/localhome/builddeps
20113fi
20114
20115
20116
20117# Check whether --with-builddeps-group was given.
20118if test "${with_builddeps_group+set}" = set; then :
20119  withval=$with_builddeps_group;
20120fi
20121
20122
20123
20124
20125  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20126    if test "x$with_builddeps_conf" != x; then
20127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
20128$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
20129      builddepsfile=$with_builddeps_conf
20130      if test -s $builddepsfile; then
20131        . $builddepsfile
20132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
20133$as_echo "loaded!" >&6; }
20134      else
20135        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
20136      fi
20137    else
20138      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
20139$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
20140      builddepsfile=`mktemp`
20141      touch $builddepsfile
20142      # Put all found confs into a single file.
20143      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
20144      # Source the file to acquire the variables
20145      if test -s $builddepsfile; then
20146        . $builddepsfile
20147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
20148$as_echo "found at least one!" >&6; }
20149      else
20150        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
20151      fi
20152    fi
20153    # Create build and target names that use _ instead of "-" and ".".
20154    # This is necessary to use them in variable names.
20155    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20156    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20157    # Extract rewrite information for build and target
20158    eval rewritten_build=\${REWRITE_${build_var}}
20159    if test "x$rewritten_build" = x; then
20160      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
20161      echo Build stays the same $rewritten_build
20162    else
20163      echo Rewriting build for builddeps into $rewritten_build
20164    fi
20165    eval rewritten_target=\${REWRITE_${target_var}}
20166    if test "x$rewritten_target" = x; then
20167      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
20168      echo Target stays the same $rewritten_target
20169    else
20170      echo Rewriting target for builddeps into $rewritten_target
20171    fi
20172    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
20173    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
20174  fi
20175  for ac_prog in 7z unzip
20176do
20177  # Extract the first word of "$ac_prog", so it can be a program name with args.
20178set dummy $ac_prog; ac_word=$2
20179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20180$as_echo_n "checking for $ac_word... " >&6; }
20181if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
20182  $as_echo_n "(cached) " >&6
20183else
20184  if test -n "$BDEPS_UNZIP"; then
20185  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
20186else
20187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20188for as_dir in $PATH
20189do
20190  IFS=$as_save_IFS
20191  test -z "$as_dir" && as_dir=.
20192    for ac_exec_ext in '' $ac_executable_extensions; do
20193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20194    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20196    break 2
20197  fi
20198done
20199  done
20200IFS=$as_save_IFS
20201
20202fi
20203fi
20204BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20205if test -n "$BDEPS_UNZIP"; then
20206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20207$as_echo "$BDEPS_UNZIP" >&6; }
20208else
20209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20210$as_echo "no" >&6; }
20211fi
20212
20213
20214  test -n "$BDEPS_UNZIP" && break
20215done
20216
20217  if test "x$BDEPS_UNZIP" = x7z; then
20218    BDEPS_UNZIP="7z x"
20219  fi
20220
20221  for ac_prog in wget lftp ftp
20222do
20223  # Extract the first word of "$ac_prog", so it can be a program name with args.
20224set dummy $ac_prog; ac_word=$2
20225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20226$as_echo_n "checking for $ac_word... " >&6; }
20227if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20228  $as_echo_n "(cached) " >&6
20229else
20230  if test -n "$BDEPS_FTP"; then
20231  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20232else
20233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20234for as_dir in $PATH
20235do
20236  IFS=$as_save_IFS
20237  test -z "$as_dir" && as_dir=.
20238    for ac_exec_ext in '' $ac_executable_extensions; do
20239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20240    ac_cv_prog_BDEPS_FTP="$ac_prog"
20241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20242    break 2
20243  fi
20244done
20245  done
20246IFS=$as_save_IFS
20247
20248fi
20249fi
20250BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20251if test -n "$BDEPS_FTP"; then
20252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20253$as_echo "$BDEPS_FTP" >&6; }
20254else
20255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20256$as_echo "no" >&6; }
20257fi
20258
20259
20260  test -n "$BDEPS_FTP" && break
20261done
20262
20263
20264
20265###############################################################################
20266#
20267# Determine OpenJDK variants, options and version numbers.
20268#
20269###############################################################################
20270
20271# We need build & target for this.
20272
20273
20274  ###############################################################################
20275  #
20276  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20277  # We always build headless support.
20278  #
20279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20280$as_echo_n "checking headful support... " >&6; }
20281  # Check whether --enable-headful was given.
20282if test "${enable_headful+set}" = set; then :
20283  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20284else
20285  SUPPORT_HEADFUL=yes
20286fi
20287
20288
20289  SUPPORT_HEADLESS=yes
20290  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20291
20292  if test "x$SUPPORT_HEADFUL" = xyes; then
20293    # We are building both headful and headless.
20294    headful_msg="include support for both headful and headless"
20295  fi
20296
20297  if test "x$SUPPORT_HEADFUL" = xno; then
20298    # Thus we are building headless only.
20299    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20300    headful_msg="headless only"
20301  fi
20302
20303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20304$as_echo "$headful_msg" >&6; }
20305
20306
20307
20308
20309
20310  # Control wether Hotspot runs Queens test after build.
20311  # Check whether --enable-hotspot-test-in-build was given.
20312if test "${enable_hotspot_test_in_build+set}" = set; then :
20313  enableval=$enable_hotspot_test_in_build;
20314else
20315  enable_hotspot_test_in_build=no
20316fi
20317
20318  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20319    TEST_IN_BUILD=true
20320  else
20321    TEST_IN_BUILD=false
20322  fi
20323
20324
20325  ###############################################################################
20326  #
20327  # Choose cacerts source file
20328  #
20329
20330# Check whether --with-cacerts-file was given.
20331if test "${with_cacerts_file+set}" = set; then :
20332  withval=$with_cacerts_file;
20333fi
20334
20335  if test "x$with_cacerts_file" != x; then
20336    CACERTS_FILE=$with_cacerts_file
20337  fi
20338
20339
20340  ###############################################################################
20341  #
20342  # Enable or disable unlimited crypto
20343  #
20344  # Check whether --enable-unlimited-crypto was given.
20345if test "${enable_unlimited_crypto+set}" = set; then :
20346  enableval=$enable_unlimited_crypto;
20347else
20348  enable_unlimited_crypto=no
20349fi
20350
20351  if test "x$enable_unlimited_crypto" = "xyes"; then
20352    UNLIMITED_CRYPTO=true
20353  else
20354    UNLIMITED_CRYPTO=false
20355  fi
20356
20357
20358  ###############################################################################
20359  #
20360  # Compress jars
20361  #
20362  COMPRESS_JARS=false
20363
20364
20365
20366  # Setup default copyright year. Mostly overridden when building close to a new year.
20367
20368# Check whether --with-copyright-year was given.
20369if test "${with_copyright_year+set}" = set; then :
20370  withval=$with_copyright_year;
20371fi
20372
20373  if test "x$with_copyright_year" = xyes; then
20374    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20375  elif test "x$with_copyright_year" != x; then
20376    COPYRIGHT_YEAR="$with_copyright_year"
20377  else
20378    COPYRIGHT_YEAR=`date +'%Y'`
20379  fi
20380
20381
20382
20383  # Warn user that old version arguments are deprecated.
20384
20385
20386# Check whether --with-milestone was given.
20387if test "${with_milestone+set}" = set; then :
20388  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20389$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20390fi
20391
20392
20393
20394
20395# Check whether --with-update-version was given.
20396if test "${with_update_version+set}" = set; then :
20397  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20398$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20399fi
20400
20401
20402
20403
20404# Check whether --with-user-release-suffix was given.
20405if test "${with_user_release_suffix+set}" = set; then :
20406  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
20407$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20408fi
20409
20410
20411
20412
20413# Check whether --with-build-number was given.
20414if test "${with_build_number+set}" = set; then :
20415  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20416$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20417fi
20418
20419
20420
20421  # Source the version numbers file
20422  . $AUTOCONF_DIR/version-numbers
20423
20424  # Some non-version number information is set in that file
20425
20426
20427
20428
20429
20430
20431
20432
20433  # Override version from arguments
20434
20435  # If --with-version-string is set, process it first. It is possible to
20436  # override parts with more specific flags, since these are processed later.
20437
20438# Check whether --with-version-string was given.
20439if test "${with_version_string+set}" = set; then :
20440  withval=$with_version_string;
20441fi
20442
20443  if test "x$with_version_string" = xyes; then
20444    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20445  elif test "x$with_version_string" != x; then
20446    # Additional [] needed to keep m4 from mangling shell constructs.
20447    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
20448      VERSION_MAJOR=${BASH_REMATCH[1]}
20449      VERSION_MINOR=${BASH_REMATCH[3]}
20450      VERSION_SECURITY=${BASH_REMATCH[5]}
20451      VERSION_PATCH=${BASH_REMATCH[7]}
20452      VERSION_PRE=${BASH_REMATCH[9]}
20453      version_plus_separator=${BASH_REMATCH[11]}
20454      VERSION_BUILD=${BASH_REMATCH[12]}
20455      VERSION_OPT=${BASH_REMATCH[14]}
20456      # Unspecified numerical fields are interpreted as 0.
20457      if test "x$VERSION_MINOR" = x; then
20458        VERSION_MINOR=0
20459      fi
20460      if test "x$VERSION_SECURITY" = x; then
20461        VERSION_SECURITY=0
20462      fi
20463      if test "x$VERSION_PATCH" = x; then
20464        VERSION_PATCH=0
20465      fi
20466      if test "x$version_plus_separator" != x \
20467          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
20468        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20469      fi
20470      # Stop the version part process from setting default values.
20471      # We still allow them to explicitely override though.
20472      NO_DEFAULT_VERSION_PARTS=true
20473    else
20474      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20475    fi
20476  fi
20477
20478
20479# Check whether --with-version-pre was given.
20480if test "${with_version_pre+set}" = set; then :
20481  withval=$with_version_pre; with_version_pre_present=true
20482else
20483  with_version_pre_present=false
20484fi
20485
20486
20487  if test "x$with_version_pre_present" = xtrue; then
20488    if test "x$with_version_pre" = xyes; then
20489      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
20490    elif test "x$with_version_pre" = xno; then
20491      # Interpret --without-* as empty string instead of the literal "no"
20492      VERSION_PRE=
20493    else
20494      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20495       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
20496      if test "x$VERSION_PRE" != "x$with_version_pre"; then
20497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
20498$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
20499      fi
20500    fi
20501  else
20502    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20503      # Default is to use "internal" as pre
20504      VERSION_PRE="internal"
20505    fi
20506  fi
20507
20508
20509# Check whether --with-version-opt was given.
20510if test "${with_version_opt+set}" = set; then :
20511  withval=$with_version_opt; with_version_opt_present=true
20512else
20513  with_version_opt_present=false
20514fi
20515
20516
20517  if test "x$with_version_opt_present" = xtrue; then
20518    if test "x$with_version_opt" = xyes; then
20519      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
20520    elif test "x$with_version_opt" = xno; then
20521      # Interpret --without-* as empty string instead of the literal "no"
20522      VERSION_OPT=
20523    else
20524      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
20525       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
20526      if test "x$VERSION_OPT" != "x$with_version_opt"; then
20527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
20528$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
20529      fi
20530    fi
20531  else
20532    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20533      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20534      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20535      # Outer [ ] to quote m4.
20536       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20537       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20538      VERSION_OPT="$timestamp.$username.$basedirname"
20539    fi
20540  fi
20541
20542
20543# Check whether --with-version-build was given.
20544if test "${with_version_build+set}" = set; then :
20545  withval=$with_version_build; with_version_build_present=true
20546else
20547  with_version_build_present=false
20548fi
20549
20550
20551  if test "x$with_version_build_present" = xtrue; then
20552    if test "x$with_version_build" = xyes; then
20553      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20554    elif test "x$with_version_build" = xno; then
20555      # Interpret --without-* as empty string instead of the literal "no"
20556      VERSION_BUILD=
20557    elif test "x$with_version_build" = x; then
20558      VERSION_BUILD=
20559    else
20560
20561  # Additional [] needed to keep m4 from mangling shell constructs.
20562  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20563    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20564  fi
20565  # Extract the version number without leading zeros.
20566  cleaned_value=${BASH_REMATCH[1]}
20567  if test "x$cleaned_value" = x; then
20568    # Special case for zero
20569    cleaned_value=${BASH_REMATCH[2]}
20570  fi
20571
20572  if test $cleaned_value -gt 255; then
20573    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20574  fi
20575  if test "x$cleaned_value" != "x$with_version_build"; then
20576    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20577$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20578  fi
20579  VERSION_BUILD=$cleaned_value
20580
20581    fi
20582  else
20583    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20584      # Default is to not have a build number.
20585      VERSION_BUILD=""
20586      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20587      VERSION_BUILD=0
20588    fi
20589  fi
20590
20591
20592# Check whether --with-version-major was given.
20593if test "${with_version_major+set}" = set; then :
20594  withval=$with_version_major; with_version_major_present=true
20595else
20596  with_version_major_present=false
20597fi
20598
20599
20600  if test "x$with_version_major_present" = xtrue; then
20601    if test "x$with_version_major" = xyes; then
20602      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20603    else
20604
20605  # Additional [] needed to keep m4 from mangling shell constructs.
20606  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20607    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20608  fi
20609  # Extract the version number without leading zeros.
20610  cleaned_value=${BASH_REMATCH[1]}
20611  if test "x$cleaned_value" = x; then
20612    # Special case for zero
20613    cleaned_value=${BASH_REMATCH[2]}
20614  fi
20615
20616  if test $cleaned_value -gt 255; then
20617    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20618  fi
20619  if test "x$cleaned_value" != "x$with_version_major"; then
20620    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20621$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20622  fi
20623  VERSION_MAJOR=$cleaned_value
20624
20625    fi
20626  else
20627    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20628      # Default is to get value from version-numbers
20629      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20630    fi
20631  fi
20632
20633
20634# Check whether --with-version-minor was given.
20635if test "${with_version_minor+set}" = set; then :
20636  withval=$with_version_minor; with_version_minor_present=true
20637else
20638  with_version_minor_present=false
20639fi
20640
20641
20642  if test "x$with_version_minor_present" = xtrue; then
20643    if test "x$with_version_minor" = xyes; then
20644      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20645    elif test "x$with_version_minor" = xno; then
20646      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20647      VERSION_MINOR=0
20648    elif test "x$with_version_minor" = x; then
20649      VERSION_MINOR=0
20650    else
20651
20652  # Additional [] needed to keep m4 from mangling shell constructs.
20653  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20654    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20655  fi
20656  # Extract the version number without leading zeros.
20657  cleaned_value=${BASH_REMATCH[1]}
20658  if test "x$cleaned_value" = x; then
20659    # Special case for zero
20660    cleaned_value=${BASH_REMATCH[2]}
20661  fi
20662
20663  if test $cleaned_value -gt 255; then
20664    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20665  fi
20666  if test "x$cleaned_value" != "x$with_version_minor"; then
20667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20668$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20669  fi
20670  VERSION_MINOR=$cleaned_value
20671
20672    fi
20673  else
20674    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20675      # Default is 0, if unspecified
20676      VERSION_MINOR=0
20677    fi
20678  fi
20679
20680
20681# Check whether --with-version-security was given.
20682if test "${with_version_security+set}" = set; then :
20683  withval=$with_version_security; with_version_security_present=true
20684else
20685  with_version_security_present=false
20686fi
20687
20688
20689  if test "x$with_version_security_present" = xtrue; then
20690    if test "x$with_version_security" = xyes; then
20691      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20692    elif test "x$with_version_security" = xno; then
20693      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20694      VERSION_SECURITY=0
20695    elif test "x$with_version_security" = x; then
20696      VERSION_SECURITY=0
20697    else
20698
20699  # Additional [] needed to keep m4 from mangling shell constructs.
20700  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20701    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20702  fi
20703  # Extract the version number without leading zeros.
20704  cleaned_value=${BASH_REMATCH[1]}
20705  if test "x$cleaned_value" = x; then
20706    # Special case for zero
20707    cleaned_value=${BASH_REMATCH[2]}
20708  fi
20709
20710  if test $cleaned_value -gt 255; then
20711    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20712  fi
20713  if test "x$cleaned_value" != "x$with_version_security"; then
20714    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20715$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20716  fi
20717  VERSION_SECURITY=$cleaned_value
20718
20719    fi
20720  else
20721    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20722      # Default is 0, if unspecified
20723      VERSION_SECURITY=0
20724    fi
20725  fi
20726
20727
20728# Check whether --with-version-patch was given.
20729if test "${with_version_patch+set}" = set; then :
20730  withval=$with_version_patch; with_version_patch_present=true
20731else
20732  with_version_patch_present=false
20733fi
20734
20735
20736  if test "x$with_version_patch_present" = xtrue; then
20737    if test "x$with_version_patch" = xyes; then
20738      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20739    elif test "x$with_version_patch" = xno; then
20740      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20741      VERSION_PATCH=0
20742    elif test "x$with_version_patch" = x; then
20743      VERSION_PATCH=0
20744    else
20745
20746  # Additional [] needed to keep m4 from mangling shell constructs.
20747  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20748    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20749  fi
20750  # Extract the version number without leading zeros.
20751  cleaned_value=${BASH_REMATCH[1]}
20752  if test "x$cleaned_value" = x; then
20753    # Special case for zero
20754    cleaned_value=${BASH_REMATCH[2]}
20755  fi
20756
20757  if test $cleaned_value -gt 255; then
20758    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20759  fi
20760  if test "x$cleaned_value" != "x$with_version_patch"; then
20761    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20762$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20763  fi
20764  VERSION_PATCH=$cleaned_value
20765
20766    fi
20767  else
20768    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20769      # Default is 0, if unspecified
20770      VERSION_PATCH=0
20771    fi
20772  fi
20773
20774  # Calculate derived version properties
20775
20776  # Set VERSION_IS_GA based on if VERSION_PRE has a value
20777  if test "x$VERSION_PRE" = x; then
20778    VERSION_IS_GA=true
20779  else
20780    VERSION_IS_GA=false
20781  fi
20782
20783  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20784  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20785
20786  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20787  # Strip trailing zeroes from stripped_version_number
20788  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20789  VERSION_NUMBER=$stripped_version_number
20790
20791  # The complete version string, with additional build information
20792  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20793    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20794  else
20795    # If either build or opt is set, we need a + separator
20796    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20797  fi
20798
20799  # The short version string, just VERSION_NUMBER and PRE, if present.
20800  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20801
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20803$as_echo_n "checking for version string... " >&6; }
20804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20805$as_echo "$VERSION_STRING" >&6; }
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821###############################################################################
20822#
20823# Setup BootJDK, used to bootstrap the build.
20824#
20825###############################################################################
20826
20827
20828  BOOT_JDK_FOUND=no
20829
20830# Check whether --with-boot-jdk was given.
20831if test "${with_boot_jdk+set}" = set; then :
20832  withval=$with_boot_jdk;
20833fi
20834
20835
20836  # We look for the Boot JDK through various means, going from more certain to
20837  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20838  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20839  # must check if this is indeed valid; otherwise we'll continue looking.
20840
20841  # Test: Is bootjdk explicitely set by command line arguments?
20842
20843  if test "x$BOOT_JDK_FOUND" = xno; then
20844    # Now execute the test
20845
20846  if test "x$with_boot_jdk" != x; then
20847    BOOT_JDK=$with_boot_jdk
20848    BOOT_JDK_FOUND=maybe
20849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20850$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20851  fi
20852
20853
20854    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20855    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20856      # Do we have a bin/java?
20857      if test ! -x "$BOOT_JDK/bin/java"; then
20858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20860        BOOT_JDK_FOUND=no
20861      else
20862        # Do we have a bin/javac?
20863        if test ! -x "$BOOT_JDK/bin/javac"; then
20864          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20866          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20867$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20868          BOOT_JDK_FOUND=no
20869        else
20870          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20871          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20872
20873          # Extra M4 quote needed to protect [] in grep expression.
20874          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
20875          if test "x$FOUND_CORRECT_VERSION" = x; then
20876            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20878            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20879$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20880            BOOT_JDK_FOUND=no
20881          else
20882            # We're done! :-)
20883            BOOT_JDK_FOUND=yes
20884
20885  # Only process if variable expands to non-empty
20886
20887  if test "x$BOOT_JDK" != x; then
20888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20889
20890  # Input might be given as Windows format, start by converting to
20891  # unix format.
20892  path="$BOOT_JDK"
20893  new_path=`$CYGPATH -u "$path"`
20894
20895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20898  # "foo.exe" is OK but "foo" is an error.
20899  #
20900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20901  # It is also a way to make sure we got the proper file name for the real test later on.
20902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20903  if test "x$test_shortpath" = x; then
20904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20906    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20907  fi
20908
20909  # Call helper function which possibly converts this using DOS-style short mode.
20910  # If so, the updated path is stored in $new_path.
20911
20912  input_path="$new_path"
20913  # Check if we need to convert this using DOS-style short mode. If the path
20914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20915  # take no chances and rewrite it.
20916  # Note: m4 eats our [], so we need to use [ and ] instead.
20917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20918  if test "x$has_forbidden_chars" != x; then
20919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20923      # Going to short mode and back again did indeed matter. Since short mode is
20924      # case insensitive, let's make it lowercase to improve readability.
20925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20926      # Now convert it back to Unix-style (cygpath)
20927      input_path=`$CYGPATH -u "$shortmode_path"`
20928      new_path="$input_path"
20929    fi
20930  fi
20931
20932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20933  if test "x$test_cygdrive_prefix" = x; then
20934    # As a simple fix, exclude /usr/bin since it's not a real path.
20935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20937      # a path prefixed by /cygdrive for fixpath to work.
20938      new_path="$CYGWIN_ROOT_PATH$input_path"
20939    fi
20940  fi
20941
20942
20943  if test "x$path" != "x$new_path"; then
20944    BOOT_JDK="$new_path"
20945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20947  fi
20948
20949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20950
20951  path="$BOOT_JDK"
20952  has_colon=`$ECHO $path | $GREP ^.:`
20953  new_path="$path"
20954  if test "x$has_colon" = x; then
20955    # Not in mixed or Windows style, start by that.
20956    new_path=`cmd //c echo $path`
20957  fi
20958
20959
20960  input_path="$new_path"
20961  # Check if we need to convert this using DOS-style short mode. If the path
20962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20963  # take no chances and rewrite it.
20964  # Note: m4 eats our [], so we need to use [ and ] instead.
20965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20966  if test "x$has_forbidden_chars" != x; then
20967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20969  fi
20970
20971
20972  windows_path="$new_path"
20973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20974    unix_path=`$CYGPATH -u "$windows_path"`
20975    new_path="$unix_path"
20976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20978    new_path="$unix_path"
20979  fi
20980
20981  if test "x$path" != "x$new_path"; then
20982    BOOT_JDK="$new_path"
20983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20985  fi
20986
20987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20989
20990    else
20991      # We're on a unix platform. Hooray! :)
20992      path="$BOOT_JDK"
20993      has_space=`$ECHO "$path" | $GREP " "`
20994      if test "x$has_space" != x; then
20995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20998      fi
20999
21000      # Use eval to expand a potential ~
21001      eval path="$path"
21002      if test ! -f "$path" && test ! -d "$path"; then
21003        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21004      fi
21005
21006      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21007    fi
21008  fi
21009
21010            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21011$as_echo_n "checking for Boot JDK... " >&6; }
21012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21013$as_echo "$BOOT_JDK" >&6; }
21014            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21015$as_echo_n "checking Boot JDK version... " >&6; }
21016            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21018$as_echo "$BOOT_JDK_VERSION" >&6; }
21019          fi # end check jdk version
21020        fi # end check javac
21021      fi # end check java
21022    fi # end check boot jdk found
21023  fi
21024
21025  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
21026    # Having specified an argument which is incorrect will produce an instant failure;
21027    # we should not go on looking
21028    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
21029  fi
21030
21031  # Test: Is bootjdk available from builddeps?
21032
21033  if test "x$BOOT_JDK_FOUND" = xno; then
21034    # Now execute the test
21035
21036
21037
21038  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
21039    # Source the builddeps file again, to make sure it uses the latest variables!
21040    . $builddepsfile
21041    # Look for a target and build machine specific resource!
21042    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
21043    if test "x$resource" = x; then
21044      # Ok, lets instead look for a target specific resource
21045      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
21046    fi
21047    if test "x$resource" = x; then
21048      # Ok, lets instead look for a build specific resource
21049      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
21050    fi
21051    if test "x$resource" = x; then
21052      # Ok, lets instead look for a generic resource
21053      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
21054      resource=${builddep_bootjdk}
21055    fi
21056    if test "x$resource" != x; then
21057      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
21058$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
21059      # If the resource in the builddeps.conf file is an existing directory,
21060      # for example /java/linux/cups
21061      if test -d ${resource}; then
21062        depdir=${resource}
21063      else
21064
21065  # bootjdk is for example mymodule
21066  # $resource is for example libs/general/libmymod_1_2_3.zip
21067  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
21068  # $with_builddeps_dir is for example /localhome/builddeps
21069  # depdir is the name of the variable into which we store the depdir, eg MYMOD
21070  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
21071  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
21072  filename=`basename $resource`
21073  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
21074  filebase=${filename%%.*}
21075  extension=${filename#*.}
21076  installdir=$with_builddeps_dir/$filebase
21077  if test ! -f $installdir/$filename.unpacked; then
21078    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
21079$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
21080    if test ! -d $installdir; then
21081      mkdir -p $installdir
21082    fi
21083    if test ! -d $installdir; then
21084      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
21085    fi
21086    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
21087    touch $tmpfile
21088    if test ! -f $tmpfile; then
21089      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
21090    fi
21091
21092  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
21093  # $tmpfile is the local file name for the downloaded file.
21094  VALID_TOOL=no
21095  if test "x$BDEPS_FTP" = xwget; then
21096    VALID_TOOL=yes
21097    wget -O $tmpfile $with_builddeps_server/$resource
21098  fi
21099  if test "x$BDEPS_FTP" = xlftp; then
21100    VALID_TOOL=yes
21101    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
21102  fi
21103  if test "x$BDEPS_FTP" = xftp; then
21104    VALID_TOOL=yes
21105    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
21106    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
21107    FTPUSERPWD=${FTPSERVER%%@*}
21108    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
21109      FTPUSER=${userpwd%%:*}
21110      FTPPWD=${userpwd#*@}
21111      FTPSERVER=${FTPSERVER#*@}
21112    else
21113      FTPUSER=ftp
21114      FTPPWD=ftp
21115    fi
21116    # the "pass" command does not work on some
21117    # ftp clients (read ftp.exe) but if it works,
21118    # passive mode is better!
21119    ( \
21120        echo "user $FTPUSER $FTPPWD"        ; \
21121        echo "pass"                         ; \
21122        echo "bin"                          ; \
21123        echo "get $FTPPATH $tmpfile"              ; \
21124    ) | ftp -in $FTPSERVER
21125  fi
21126  if test "x$VALID_TOOL" != xyes; then
21127    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
21128  fi
21129
21130    mv $tmpfile $installdir/$filename
21131    if test ! -s $installdir/$filename; then
21132      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
21133    fi
21134    case "$extension" in
21135      zip)  echo "Unzipping $installdir/$filename..."
21136        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
21137        ;;
21138      tar.gz) echo "Untaring $installdir/$filename..."
21139        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21140        ;;
21141      tgz) echo "Untaring $installdir/$filename..."
21142        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21143        ;;
21144      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
21145        ;;
21146    esac
21147  fi
21148  if test -f $installdir/$filename.unpacked; then
21149    depdir=$installdir
21150  fi
21151
21152      fi
21153      # Source the builddeps file again, because in the previous command, the depdir
21154      # was updated to point at the current build dependency install directory.
21155      . $builddepsfile
21156      # Now extract variables from the builddeps.conf files.
21157      theroot=${builddep_bootjdk_ROOT}
21158      thecflags=${builddep_bootjdk_CFLAGS}
21159      thelibs=${builddep_bootjdk_LIBS}
21160      if test "x$depdir" = x; then
21161        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21162      fi
21163      BOOT_JDK=$depdir
21164      if test "x$theroot" != x; then
21165        BOOT_JDK="$theroot"
21166      fi
21167      if test "x$thecflags" != x; then
21168        BOOT_JDK_CFLAGS="$thecflags"
21169      fi
21170      if test "x$thelibs" != x; then
21171        BOOT_JDK_LIBS="$thelibs"
21172      fi
21173      BOOT_JDK_FOUND=maybe
21174      else BOOT_JDK_FOUND=no
21175
21176    fi
21177    else BOOT_JDK_FOUND=no
21178
21179  fi
21180
21181
21182
21183    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21184    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21185      # Do we have a bin/java?
21186      if test ! -x "$BOOT_JDK/bin/java"; then
21187        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21189        BOOT_JDK_FOUND=no
21190      else
21191        # Do we have a bin/javac?
21192        if test ! -x "$BOOT_JDK/bin/javac"; then
21193          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21195          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21196$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21197          BOOT_JDK_FOUND=no
21198        else
21199          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21200          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21201
21202          # Extra M4 quote needed to protect [] in grep expression.
21203          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21204          if test "x$FOUND_CORRECT_VERSION" = x; then
21205            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21207            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21208$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21209            BOOT_JDK_FOUND=no
21210          else
21211            # We're done! :-)
21212            BOOT_JDK_FOUND=yes
21213
21214  # Only process if variable expands to non-empty
21215
21216  if test "x$BOOT_JDK" != x; then
21217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21218
21219  # Input might be given as Windows format, start by converting to
21220  # unix format.
21221  path="$BOOT_JDK"
21222  new_path=`$CYGPATH -u "$path"`
21223
21224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21227  # "foo.exe" is OK but "foo" is an error.
21228  #
21229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21230  # It is also a way to make sure we got the proper file name for the real test later on.
21231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21232  if test "x$test_shortpath" = x; then
21233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21235    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21236  fi
21237
21238  # Call helper function which possibly converts this using DOS-style short mode.
21239  # If so, the updated path is stored in $new_path.
21240
21241  input_path="$new_path"
21242  # Check if we need to convert this using DOS-style short mode. If the path
21243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21244  # take no chances and rewrite it.
21245  # Note: m4 eats our [], so we need to use [ and ] instead.
21246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21247  if test "x$has_forbidden_chars" != x; then
21248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21252      # Going to short mode and back again did indeed matter. Since short mode is
21253      # case insensitive, let's make it lowercase to improve readability.
21254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21255      # Now convert it back to Unix-style (cygpath)
21256      input_path=`$CYGPATH -u "$shortmode_path"`
21257      new_path="$input_path"
21258    fi
21259  fi
21260
21261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21262  if test "x$test_cygdrive_prefix" = x; then
21263    # As a simple fix, exclude /usr/bin since it's not a real path.
21264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21266      # a path prefixed by /cygdrive for fixpath to work.
21267      new_path="$CYGWIN_ROOT_PATH$input_path"
21268    fi
21269  fi
21270
21271
21272  if test "x$path" != "x$new_path"; then
21273    BOOT_JDK="$new_path"
21274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21276  fi
21277
21278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21279
21280  path="$BOOT_JDK"
21281  has_colon=`$ECHO $path | $GREP ^.:`
21282  new_path="$path"
21283  if test "x$has_colon" = x; then
21284    # Not in mixed or Windows style, start by that.
21285    new_path=`cmd //c echo $path`
21286  fi
21287
21288
21289  input_path="$new_path"
21290  # Check if we need to convert this using DOS-style short mode. If the path
21291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21292  # take no chances and rewrite it.
21293  # Note: m4 eats our [], so we need to use [ and ] instead.
21294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21295  if test "x$has_forbidden_chars" != x; then
21296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21298  fi
21299
21300
21301  windows_path="$new_path"
21302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21303    unix_path=`$CYGPATH -u "$windows_path"`
21304    new_path="$unix_path"
21305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21307    new_path="$unix_path"
21308  fi
21309
21310  if test "x$path" != "x$new_path"; then
21311    BOOT_JDK="$new_path"
21312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21314  fi
21315
21316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21318
21319    else
21320      # We're on a unix platform. Hooray! :)
21321      path="$BOOT_JDK"
21322      has_space=`$ECHO "$path" | $GREP " "`
21323      if test "x$has_space" != x; then
21324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21327      fi
21328
21329      # Use eval to expand a potential ~
21330      eval path="$path"
21331      if test ! -f "$path" && test ! -d "$path"; then
21332        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21333      fi
21334
21335      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21336    fi
21337  fi
21338
21339            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21340$as_echo_n "checking for Boot JDK... " >&6; }
21341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21342$as_echo "$BOOT_JDK" >&6; }
21343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21344$as_echo_n "checking Boot JDK version... " >&6; }
21345            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21347$as_echo "$BOOT_JDK_VERSION" >&6; }
21348          fi # end check jdk version
21349        fi # end check javac
21350      fi # end check java
21351    fi # end check boot jdk found
21352  fi
21353
21354
21355  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21356
21357  if test "x$BOOT_JDK_FOUND" = xno; then
21358    # Now execute the test
21359
21360  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21361    # First check at user selected default
21362
21363  if test "x$BOOT_JDK_FOUND" = xno; then
21364    # Now execute the test
21365
21366  if test -x /usr/libexec/java_home; then
21367    BOOT_JDK=`/usr/libexec/java_home `
21368    BOOT_JDK_FOUND=maybe
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21370$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21371  fi
21372
21373
21374    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21375    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21376      # Do we have a bin/java?
21377      if test ! -x "$BOOT_JDK/bin/java"; then
21378        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21380        BOOT_JDK_FOUND=no
21381      else
21382        # Do we have a bin/javac?
21383        if test ! -x "$BOOT_JDK/bin/javac"; then
21384          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21386          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21387$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21388          BOOT_JDK_FOUND=no
21389        else
21390          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21391          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21392
21393          # Extra M4 quote needed to protect [] in grep expression.
21394          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21395          if test "x$FOUND_CORRECT_VERSION" = x; then
21396            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21398            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21399$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21400            BOOT_JDK_FOUND=no
21401          else
21402            # We're done! :-)
21403            BOOT_JDK_FOUND=yes
21404
21405  # Only process if variable expands to non-empty
21406
21407  if test "x$BOOT_JDK" != x; then
21408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21409
21410  # Input might be given as Windows format, start by converting to
21411  # unix format.
21412  path="$BOOT_JDK"
21413  new_path=`$CYGPATH -u "$path"`
21414
21415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21418  # "foo.exe" is OK but "foo" is an error.
21419  #
21420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21421  # It is also a way to make sure we got the proper file name for the real test later on.
21422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21423  if test "x$test_shortpath" = x; then
21424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21425$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21426    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21427  fi
21428
21429  # Call helper function which possibly converts this using DOS-style short mode.
21430  # If so, the updated path is stored in $new_path.
21431
21432  input_path="$new_path"
21433  # Check if we need to convert this using DOS-style short mode. If the path
21434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21435  # take no chances and rewrite it.
21436  # Note: m4 eats our [], so we need to use [ and ] instead.
21437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21438  if test "x$has_forbidden_chars" != x; then
21439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21443      # Going to short mode and back again did indeed matter. Since short mode is
21444      # case insensitive, let's make it lowercase to improve readability.
21445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21446      # Now convert it back to Unix-style (cygpath)
21447      input_path=`$CYGPATH -u "$shortmode_path"`
21448      new_path="$input_path"
21449    fi
21450  fi
21451
21452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21453  if test "x$test_cygdrive_prefix" = x; then
21454    # As a simple fix, exclude /usr/bin since it's not a real path.
21455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21457      # a path prefixed by /cygdrive for fixpath to work.
21458      new_path="$CYGWIN_ROOT_PATH$input_path"
21459    fi
21460  fi
21461
21462
21463  if test "x$path" != "x$new_path"; then
21464    BOOT_JDK="$new_path"
21465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21467  fi
21468
21469    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21470
21471  path="$BOOT_JDK"
21472  has_colon=`$ECHO $path | $GREP ^.:`
21473  new_path="$path"
21474  if test "x$has_colon" = x; then
21475    # Not in mixed or Windows style, start by that.
21476    new_path=`cmd //c echo $path`
21477  fi
21478
21479
21480  input_path="$new_path"
21481  # Check if we need to convert this using DOS-style short mode. If the path
21482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21483  # take no chances and rewrite it.
21484  # Note: m4 eats our [], so we need to use [ and ] instead.
21485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21486  if test "x$has_forbidden_chars" != x; then
21487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21489  fi
21490
21491
21492  windows_path="$new_path"
21493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21494    unix_path=`$CYGPATH -u "$windows_path"`
21495    new_path="$unix_path"
21496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21498    new_path="$unix_path"
21499  fi
21500
21501  if test "x$path" != "x$new_path"; then
21502    BOOT_JDK="$new_path"
21503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21504$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21505  fi
21506
21507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21509
21510    else
21511      # We're on a unix platform. Hooray! :)
21512      path="$BOOT_JDK"
21513      has_space=`$ECHO "$path" | $GREP " "`
21514      if test "x$has_space" != x; then
21515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21516$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21517        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21518      fi
21519
21520      # Use eval to expand a potential ~
21521      eval path="$path"
21522      if test ! -f "$path" && test ! -d "$path"; then
21523        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21524      fi
21525
21526      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21527    fi
21528  fi
21529
21530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21531$as_echo_n "checking for Boot JDK... " >&6; }
21532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21533$as_echo "$BOOT_JDK" >&6; }
21534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21535$as_echo_n "checking Boot JDK version... " >&6; }
21536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21538$as_echo "$BOOT_JDK_VERSION" >&6; }
21539          fi # end check jdk version
21540        fi # end check javac
21541      fi # end check java
21542    fi # end check boot jdk found
21543  fi
21544
21545    # If that did not work out (e.g. too old), try explicit versions instead
21546
21547  if test "x$BOOT_JDK_FOUND" = xno; then
21548    # Now execute the test
21549
21550  if test -x /usr/libexec/java_home; then
21551    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21552    BOOT_JDK_FOUND=maybe
21553    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21554$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21555  fi
21556
21557
21558    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21559    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21560      # Do we have a bin/java?
21561      if test ! -x "$BOOT_JDK/bin/java"; then
21562        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21564        BOOT_JDK_FOUND=no
21565      else
21566        # Do we have a bin/javac?
21567        if test ! -x "$BOOT_JDK/bin/javac"; then
21568          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21570          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21571$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21572          BOOT_JDK_FOUND=no
21573        else
21574          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21575          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21576
21577          # Extra M4 quote needed to protect [] in grep expression.
21578          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21579          if test "x$FOUND_CORRECT_VERSION" = x; then
21580            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21582            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21583$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21584            BOOT_JDK_FOUND=no
21585          else
21586            # We're done! :-)
21587            BOOT_JDK_FOUND=yes
21588
21589  # Only process if variable expands to non-empty
21590
21591  if test "x$BOOT_JDK" != x; then
21592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21593
21594  # Input might be given as Windows format, start by converting to
21595  # unix format.
21596  path="$BOOT_JDK"
21597  new_path=`$CYGPATH -u "$path"`
21598
21599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21602  # "foo.exe" is OK but "foo" is an error.
21603  #
21604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21605  # It is also a way to make sure we got the proper file name for the real test later on.
21606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21607  if test "x$test_shortpath" = x; then
21608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21611  fi
21612
21613  # Call helper function which possibly converts this using DOS-style short mode.
21614  # If so, the updated path is stored in $new_path.
21615
21616  input_path="$new_path"
21617  # Check if we need to convert this using DOS-style short mode. If the path
21618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21619  # take no chances and rewrite it.
21620  # Note: m4 eats our [], so we need to use [ and ] instead.
21621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21622  if test "x$has_forbidden_chars" != x; then
21623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21627      # Going to short mode and back again did indeed matter. Since short mode is
21628      # case insensitive, let's make it lowercase to improve readability.
21629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21630      # Now convert it back to Unix-style (cygpath)
21631      input_path=`$CYGPATH -u "$shortmode_path"`
21632      new_path="$input_path"
21633    fi
21634  fi
21635
21636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21637  if test "x$test_cygdrive_prefix" = x; then
21638    # As a simple fix, exclude /usr/bin since it's not a real path.
21639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21641      # a path prefixed by /cygdrive for fixpath to work.
21642      new_path="$CYGWIN_ROOT_PATH$input_path"
21643    fi
21644  fi
21645
21646
21647  if test "x$path" != "x$new_path"; then
21648    BOOT_JDK="$new_path"
21649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21651  fi
21652
21653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21654
21655  path="$BOOT_JDK"
21656  has_colon=`$ECHO $path | $GREP ^.:`
21657  new_path="$path"
21658  if test "x$has_colon" = x; then
21659    # Not in mixed or Windows style, start by that.
21660    new_path=`cmd //c echo $path`
21661  fi
21662
21663
21664  input_path="$new_path"
21665  # Check if we need to convert this using DOS-style short mode. If the path
21666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21667  # take no chances and rewrite it.
21668  # Note: m4 eats our [], so we need to use [ and ] instead.
21669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21670  if test "x$has_forbidden_chars" != x; then
21671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21673  fi
21674
21675
21676  windows_path="$new_path"
21677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21678    unix_path=`$CYGPATH -u "$windows_path"`
21679    new_path="$unix_path"
21680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21682    new_path="$unix_path"
21683  fi
21684
21685  if test "x$path" != "x$new_path"; then
21686    BOOT_JDK="$new_path"
21687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21689  fi
21690
21691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21693
21694    else
21695      # We're on a unix platform. Hooray! :)
21696      path="$BOOT_JDK"
21697      has_space=`$ECHO "$path" | $GREP " "`
21698      if test "x$has_space" != x; then
21699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21702      fi
21703
21704      # Use eval to expand a potential ~
21705      eval path="$path"
21706      if test ! -f "$path" && test ! -d "$path"; then
21707        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21708      fi
21709
21710      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21711    fi
21712  fi
21713
21714            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21715$as_echo_n "checking for Boot JDK... " >&6; }
21716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21717$as_echo "$BOOT_JDK" >&6; }
21718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21719$as_echo_n "checking Boot JDK version... " >&6; }
21720            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21722$as_echo "$BOOT_JDK_VERSION" >&6; }
21723          fi # end check jdk version
21724        fi # end check javac
21725      fi # end check java
21726    fi # end check boot jdk found
21727  fi
21728
21729
21730  if test "x$BOOT_JDK_FOUND" = xno; then
21731    # Now execute the test
21732
21733  if test -x /usr/libexec/java_home; then
21734    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21735    BOOT_JDK_FOUND=maybe
21736    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21737$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21738  fi
21739
21740
21741    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21742    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21743      # Do we have a bin/java?
21744      if test ! -x "$BOOT_JDK/bin/java"; then
21745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21747        BOOT_JDK_FOUND=no
21748      else
21749        # Do we have a bin/javac?
21750        if test ! -x "$BOOT_JDK/bin/javac"; then
21751          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21753          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21754$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21755          BOOT_JDK_FOUND=no
21756        else
21757          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21758          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21759
21760          # Extra M4 quote needed to protect [] in grep expression.
21761          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21762          if test "x$FOUND_CORRECT_VERSION" = x; then
21763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21765            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21766$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21767            BOOT_JDK_FOUND=no
21768          else
21769            # We're done! :-)
21770            BOOT_JDK_FOUND=yes
21771
21772  # Only process if variable expands to non-empty
21773
21774  if test "x$BOOT_JDK" != x; then
21775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21776
21777  # Input might be given as Windows format, start by converting to
21778  # unix format.
21779  path="$BOOT_JDK"
21780  new_path=`$CYGPATH -u "$path"`
21781
21782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21785  # "foo.exe" is OK but "foo" is an error.
21786  #
21787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21788  # It is also a way to make sure we got the proper file name for the real test later on.
21789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21790  if test "x$test_shortpath" = x; then
21791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21793    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21794  fi
21795
21796  # Call helper function which possibly converts this using DOS-style short mode.
21797  # If so, the updated path is stored in $new_path.
21798
21799  input_path="$new_path"
21800  # Check if we need to convert this using DOS-style short mode. If the path
21801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21802  # take no chances and rewrite it.
21803  # Note: m4 eats our [], so we need to use [ and ] instead.
21804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21805  if test "x$has_forbidden_chars" != x; then
21806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21810      # Going to short mode and back again did indeed matter. Since short mode is
21811      # case insensitive, let's make it lowercase to improve readability.
21812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21813      # Now convert it back to Unix-style (cygpath)
21814      input_path=`$CYGPATH -u "$shortmode_path"`
21815      new_path="$input_path"
21816    fi
21817  fi
21818
21819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21820  if test "x$test_cygdrive_prefix" = x; then
21821    # As a simple fix, exclude /usr/bin since it's not a real path.
21822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21824      # a path prefixed by /cygdrive for fixpath to work.
21825      new_path="$CYGWIN_ROOT_PATH$input_path"
21826    fi
21827  fi
21828
21829
21830  if test "x$path" != "x$new_path"; then
21831    BOOT_JDK="$new_path"
21832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21834  fi
21835
21836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21837
21838  path="$BOOT_JDK"
21839  has_colon=`$ECHO $path | $GREP ^.:`
21840  new_path="$path"
21841  if test "x$has_colon" = x; then
21842    # Not in mixed or Windows style, start by that.
21843    new_path=`cmd //c echo $path`
21844  fi
21845
21846
21847  input_path="$new_path"
21848  # Check if we need to convert this using DOS-style short mode. If the path
21849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21850  # take no chances and rewrite it.
21851  # Note: m4 eats our [], so we need to use [ and ] instead.
21852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21853  if test "x$has_forbidden_chars" != x; then
21854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21856  fi
21857
21858
21859  windows_path="$new_path"
21860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21861    unix_path=`$CYGPATH -u "$windows_path"`
21862    new_path="$unix_path"
21863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21865    new_path="$unix_path"
21866  fi
21867
21868  if test "x$path" != "x$new_path"; then
21869    BOOT_JDK="$new_path"
21870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21872  fi
21873
21874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21876
21877    else
21878      # We're on a unix platform. Hooray! :)
21879      path="$BOOT_JDK"
21880      has_space=`$ECHO "$path" | $GREP " "`
21881      if test "x$has_space" != x; then
21882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21885      fi
21886
21887      # Use eval to expand a potential ~
21888      eval path="$path"
21889      if test ! -f "$path" && test ! -d "$path"; then
21890        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21891      fi
21892
21893      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21894    fi
21895  fi
21896
21897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21898$as_echo_n "checking for Boot JDK... " >&6; }
21899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21900$as_echo "$BOOT_JDK" >&6; }
21901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21902$as_echo_n "checking Boot JDK version... " >&6; }
21903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21905$as_echo "$BOOT_JDK_VERSION" >&6; }
21906          fi # end check jdk version
21907        fi # end check javac
21908      fi # end check java
21909    fi # end check boot jdk found
21910  fi
21911
21912
21913  if test "x$BOOT_JDK_FOUND" = xno; then
21914    # Now execute the test
21915
21916  if test -x /usr/libexec/java_home; then
21917    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21918    BOOT_JDK_FOUND=maybe
21919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21920$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21921  fi
21922
21923
21924    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21925    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21926      # Do we have a bin/java?
21927      if test ! -x "$BOOT_JDK/bin/java"; then
21928        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21930        BOOT_JDK_FOUND=no
21931      else
21932        # Do we have a bin/javac?
21933        if test ! -x "$BOOT_JDK/bin/javac"; then
21934          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21936          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21937$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21938          BOOT_JDK_FOUND=no
21939        else
21940          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21941          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21942
21943          # Extra M4 quote needed to protect [] in grep expression.
21944          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21945          if test "x$FOUND_CORRECT_VERSION" = x; then
21946            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21948            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21949$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21950            BOOT_JDK_FOUND=no
21951          else
21952            # We're done! :-)
21953            BOOT_JDK_FOUND=yes
21954
21955  # Only process if variable expands to non-empty
21956
21957  if test "x$BOOT_JDK" != x; then
21958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21959
21960  # Input might be given as Windows format, start by converting to
21961  # unix format.
21962  path="$BOOT_JDK"
21963  new_path=`$CYGPATH -u "$path"`
21964
21965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21968  # "foo.exe" is OK but "foo" is an error.
21969  #
21970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21971  # It is also a way to make sure we got the proper file name for the real test later on.
21972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21973  if test "x$test_shortpath" = x; then
21974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21975$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21976    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21977  fi
21978
21979  # Call helper function which possibly converts this using DOS-style short mode.
21980  # If so, the updated path is stored in $new_path.
21981
21982  input_path="$new_path"
21983  # Check if we need to convert this using DOS-style short mode. If the path
21984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21985  # take no chances and rewrite it.
21986  # Note: m4 eats our [], so we need to use [ and ] instead.
21987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21988  if test "x$has_forbidden_chars" != x; then
21989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21993      # Going to short mode and back again did indeed matter. Since short mode is
21994      # case insensitive, let's make it lowercase to improve readability.
21995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21996      # Now convert it back to Unix-style (cygpath)
21997      input_path=`$CYGPATH -u "$shortmode_path"`
21998      new_path="$input_path"
21999    fi
22000  fi
22001
22002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22003  if test "x$test_cygdrive_prefix" = x; then
22004    # As a simple fix, exclude /usr/bin since it's not a real path.
22005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22007      # a path prefixed by /cygdrive for fixpath to work.
22008      new_path="$CYGWIN_ROOT_PATH$input_path"
22009    fi
22010  fi
22011
22012
22013  if test "x$path" != "x$new_path"; then
22014    BOOT_JDK="$new_path"
22015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22017  fi
22018
22019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22020
22021  path="$BOOT_JDK"
22022  has_colon=`$ECHO $path | $GREP ^.:`
22023  new_path="$path"
22024  if test "x$has_colon" = x; then
22025    # Not in mixed or Windows style, start by that.
22026    new_path=`cmd //c echo $path`
22027  fi
22028
22029
22030  input_path="$new_path"
22031  # Check if we need to convert this using DOS-style short mode. If the path
22032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22033  # take no chances and rewrite it.
22034  # Note: m4 eats our [], so we need to use [ and ] instead.
22035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22036  if test "x$has_forbidden_chars" != x; then
22037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22039  fi
22040
22041
22042  windows_path="$new_path"
22043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22044    unix_path=`$CYGPATH -u "$windows_path"`
22045    new_path="$unix_path"
22046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22048    new_path="$unix_path"
22049  fi
22050
22051  if test "x$path" != "x$new_path"; then
22052    BOOT_JDK="$new_path"
22053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22054$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22055  fi
22056
22057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22059
22060    else
22061      # We're on a unix platform. Hooray! :)
22062      path="$BOOT_JDK"
22063      has_space=`$ECHO "$path" | $GREP " "`
22064      if test "x$has_space" != x; then
22065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22066$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22067        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22068      fi
22069
22070      # Use eval to expand a potential ~
22071      eval path="$path"
22072      if test ! -f "$path" && test ! -d "$path"; then
22073        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22074      fi
22075
22076      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22077    fi
22078  fi
22079
22080            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22081$as_echo_n "checking for Boot JDK... " >&6; }
22082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22083$as_echo "$BOOT_JDK" >&6; }
22084            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22085$as_echo_n "checking Boot JDK version... " >&6; }
22086            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22088$as_echo "$BOOT_JDK_VERSION" >&6; }
22089          fi # end check jdk version
22090        fi # end check javac
22091      fi # end check java
22092    fi # end check boot jdk found
22093  fi
22094
22095  fi
22096
22097
22098    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22099    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22100      # Do we have a bin/java?
22101      if test ! -x "$BOOT_JDK/bin/java"; then
22102        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22104        BOOT_JDK_FOUND=no
22105      else
22106        # Do we have a bin/javac?
22107        if test ! -x "$BOOT_JDK/bin/javac"; then
22108          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22110          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22111$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22112          BOOT_JDK_FOUND=no
22113        else
22114          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22115          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22116
22117          # Extra M4 quote needed to protect [] in grep expression.
22118          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22119          if test "x$FOUND_CORRECT_VERSION" = x; then
22120            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22122            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22123$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22124            BOOT_JDK_FOUND=no
22125          else
22126            # We're done! :-)
22127            BOOT_JDK_FOUND=yes
22128
22129  # Only process if variable expands to non-empty
22130
22131  if test "x$BOOT_JDK" != x; then
22132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22133
22134  # Input might be given as Windows format, start by converting to
22135  # unix format.
22136  path="$BOOT_JDK"
22137  new_path=`$CYGPATH -u "$path"`
22138
22139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22142  # "foo.exe" is OK but "foo" is an error.
22143  #
22144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22145  # It is also a way to make sure we got the proper file name for the real test later on.
22146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22147  if test "x$test_shortpath" = x; then
22148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22150    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22151  fi
22152
22153  # Call helper function which possibly converts this using DOS-style short mode.
22154  # If so, the updated path is stored in $new_path.
22155
22156  input_path="$new_path"
22157  # Check if we need to convert this using DOS-style short mode. If the path
22158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22159  # take no chances and rewrite it.
22160  # Note: m4 eats our [], so we need to use [ and ] instead.
22161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22162  if test "x$has_forbidden_chars" != x; then
22163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22167      # Going to short mode and back again did indeed matter. Since short mode is
22168      # case insensitive, let's make it lowercase to improve readability.
22169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22170      # Now convert it back to Unix-style (cygpath)
22171      input_path=`$CYGPATH -u "$shortmode_path"`
22172      new_path="$input_path"
22173    fi
22174  fi
22175
22176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22177  if test "x$test_cygdrive_prefix" = x; then
22178    # As a simple fix, exclude /usr/bin since it's not a real path.
22179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22181      # a path prefixed by /cygdrive for fixpath to work.
22182      new_path="$CYGWIN_ROOT_PATH$input_path"
22183    fi
22184  fi
22185
22186
22187  if test "x$path" != "x$new_path"; then
22188    BOOT_JDK="$new_path"
22189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22191  fi
22192
22193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22194
22195  path="$BOOT_JDK"
22196  has_colon=`$ECHO $path | $GREP ^.:`
22197  new_path="$path"
22198  if test "x$has_colon" = x; then
22199    # Not in mixed or Windows style, start by that.
22200    new_path=`cmd //c echo $path`
22201  fi
22202
22203
22204  input_path="$new_path"
22205  # Check if we need to convert this using DOS-style short mode. If the path
22206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22207  # take no chances and rewrite it.
22208  # Note: m4 eats our [], so we need to use [ and ] instead.
22209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22210  if test "x$has_forbidden_chars" != x; then
22211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22213  fi
22214
22215
22216  windows_path="$new_path"
22217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22218    unix_path=`$CYGPATH -u "$windows_path"`
22219    new_path="$unix_path"
22220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22222    new_path="$unix_path"
22223  fi
22224
22225  if test "x$path" != "x$new_path"; then
22226    BOOT_JDK="$new_path"
22227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22229  fi
22230
22231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22233
22234    else
22235      # We're on a unix platform. Hooray! :)
22236      path="$BOOT_JDK"
22237      has_space=`$ECHO "$path" | $GREP " "`
22238      if test "x$has_space" != x; then
22239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22242      fi
22243
22244      # Use eval to expand a potential ~
22245      eval path="$path"
22246      if test ! -f "$path" && test ! -d "$path"; then
22247        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22248      fi
22249
22250      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22251    fi
22252  fi
22253
22254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22255$as_echo_n "checking for Boot JDK... " >&6; }
22256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22257$as_echo "$BOOT_JDK" >&6; }
22258            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22259$as_echo_n "checking Boot JDK version... " >&6; }
22260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22262$as_echo "$BOOT_JDK_VERSION" >&6; }
22263          fi # end check jdk version
22264        fi # end check javac
22265      fi # end check java
22266    fi # end check boot jdk found
22267  fi
22268
22269
22270  # Test: Is $JAVA_HOME set?
22271
22272  if test "x$BOOT_JDK_FOUND" = xno; then
22273    # Now execute the test
22274
22275  if test "x$JAVA_HOME" != x; then
22276    JAVA_HOME_PROCESSED="$JAVA_HOME"
22277
22278  # Only process if variable expands to non-empty
22279
22280  if test "x$JAVA_HOME_PROCESSED" != x; then
22281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22282
22283  # Input might be given as Windows format, start by converting to
22284  # unix format.
22285  path="$JAVA_HOME_PROCESSED"
22286  new_path=`$CYGPATH -u "$path"`
22287
22288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22291  # "foo.exe" is OK but "foo" is an error.
22292  #
22293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22294  # It is also a way to make sure we got the proper file name for the real test later on.
22295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22296  if test "x$test_shortpath" = x; then
22297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22298$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22299    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22300  fi
22301
22302  # Call helper function which possibly converts this using DOS-style short mode.
22303  # If so, the updated path is stored in $new_path.
22304
22305  input_path="$new_path"
22306  # Check if we need to convert this using DOS-style short mode. If the path
22307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22308  # take no chances and rewrite it.
22309  # Note: m4 eats our [], so we need to use [ and ] instead.
22310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22311  if test "x$has_forbidden_chars" != x; then
22312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22316      # Going to short mode and back again did indeed matter. Since short mode is
22317      # case insensitive, let's make it lowercase to improve readability.
22318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22319      # Now convert it back to Unix-style (cygpath)
22320      input_path=`$CYGPATH -u "$shortmode_path"`
22321      new_path="$input_path"
22322    fi
22323  fi
22324
22325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22326  if test "x$test_cygdrive_prefix" = x; then
22327    # As a simple fix, exclude /usr/bin since it's not a real path.
22328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22330      # a path prefixed by /cygdrive for fixpath to work.
22331      new_path="$CYGWIN_ROOT_PATH$input_path"
22332    fi
22333  fi
22334
22335
22336  if test "x$path" != "x$new_path"; then
22337    JAVA_HOME_PROCESSED="$new_path"
22338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22339$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22340  fi
22341
22342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22343
22344  path="$JAVA_HOME_PROCESSED"
22345  has_colon=`$ECHO $path | $GREP ^.:`
22346  new_path="$path"
22347  if test "x$has_colon" = x; then
22348    # Not in mixed or Windows style, start by that.
22349    new_path=`cmd //c echo $path`
22350  fi
22351
22352
22353  input_path="$new_path"
22354  # Check if we need to convert this using DOS-style short mode. If the path
22355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22356  # take no chances and rewrite it.
22357  # Note: m4 eats our [], so we need to use [ and ] instead.
22358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22359  if test "x$has_forbidden_chars" != x; then
22360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22362  fi
22363
22364
22365  windows_path="$new_path"
22366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22367    unix_path=`$CYGPATH -u "$windows_path"`
22368    new_path="$unix_path"
22369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22371    new_path="$unix_path"
22372  fi
22373
22374  if test "x$path" != "x$new_path"; then
22375    JAVA_HOME_PROCESSED="$new_path"
22376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22377$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22378  fi
22379
22380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22382
22383    else
22384      # We're on a unix platform. Hooray! :)
22385      path="$JAVA_HOME_PROCESSED"
22386      has_space=`$ECHO "$path" | $GREP " "`
22387      if test "x$has_space" != x; then
22388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22389$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22390        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22391      fi
22392
22393      # Use eval to expand a potential ~
22394      eval path="$path"
22395      if test ! -f "$path" && test ! -d "$path"; then
22396        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22397      fi
22398
22399      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22400    fi
22401  fi
22402
22403    if test ! -d "$JAVA_HOME_PROCESSED"; then
22404      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22405$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22406    else
22407      # Aha, the user has set a JAVA_HOME
22408      # let us use that as the Boot JDK.
22409      BOOT_JDK="$JAVA_HOME_PROCESSED"
22410      BOOT_JDK_FOUND=maybe
22411      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22412$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22413    fi
22414  fi
22415
22416
22417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22419      # Do we have a bin/java?
22420      if test ! -x "$BOOT_JDK/bin/java"; then
22421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22423        BOOT_JDK_FOUND=no
22424      else
22425        # Do we have a bin/javac?
22426        if test ! -x "$BOOT_JDK/bin/javac"; then
22427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22431          BOOT_JDK_FOUND=no
22432        else
22433          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22434          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22435
22436          # Extra M4 quote needed to protect [] in grep expression.
22437          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22438          if test "x$FOUND_CORRECT_VERSION" = x; then
22439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22441            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22442$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22443            BOOT_JDK_FOUND=no
22444          else
22445            # We're done! :-)
22446            BOOT_JDK_FOUND=yes
22447
22448  # Only process if variable expands to non-empty
22449
22450  if test "x$BOOT_JDK" != x; then
22451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22452
22453  # Input might be given as Windows format, start by converting to
22454  # unix format.
22455  path="$BOOT_JDK"
22456  new_path=`$CYGPATH -u "$path"`
22457
22458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22461  # "foo.exe" is OK but "foo" is an error.
22462  #
22463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22464  # It is also a way to make sure we got the proper file name for the real test later on.
22465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22466  if test "x$test_shortpath" = x; then
22467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22469    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22470  fi
22471
22472  # Call helper function which possibly converts this using DOS-style short mode.
22473  # If so, the updated path is stored in $new_path.
22474
22475  input_path="$new_path"
22476  # Check if we need to convert this using DOS-style short mode. If the path
22477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22478  # take no chances and rewrite it.
22479  # Note: m4 eats our [], so we need to use [ and ] instead.
22480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22481  if test "x$has_forbidden_chars" != x; then
22482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22486      # Going to short mode and back again did indeed matter. Since short mode is
22487      # case insensitive, let's make it lowercase to improve readability.
22488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22489      # Now convert it back to Unix-style (cygpath)
22490      input_path=`$CYGPATH -u "$shortmode_path"`
22491      new_path="$input_path"
22492    fi
22493  fi
22494
22495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22496  if test "x$test_cygdrive_prefix" = x; then
22497    # As a simple fix, exclude /usr/bin since it's not a real path.
22498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22500      # a path prefixed by /cygdrive for fixpath to work.
22501      new_path="$CYGWIN_ROOT_PATH$input_path"
22502    fi
22503  fi
22504
22505
22506  if test "x$path" != "x$new_path"; then
22507    BOOT_JDK="$new_path"
22508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22510  fi
22511
22512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22513
22514  path="$BOOT_JDK"
22515  has_colon=`$ECHO $path | $GREP ^.:`
22516  new_path="$path"
22517  if test "x$has_colon" = x; then
22518    # Not in mixed or Windows style, start by that.
22519    new_path=`cmd //c echo $path`
22520  fi
22521
22522
22523  input_path="$new_path"
22524  # Check if we need to convert this using DOS-style short mode. If the path
22525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22526  # take no chances and rewrite it.
22527  # Note: m4 eats our [], so we need to use [ and ] instead.
22528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22529  if test "x$has_forbidden_chars" != x; then
22530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22532  fi
22533
22534
22535  windows_path="$new_path"
22536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22537    unix_path=`$CYGPATH -u "$windows_path"`
22538    new_path="$unix_path"
22539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22541    new_path="$unix_path"
22542  fi
22543
22544  if test "x$path" != "x$new_path"; then
22545    BOOT_JDK="$new_path"
22546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22548  fi
22549
22550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22552
22553    else
22554      # We're on a unix platform. Hooray! :)
22555      path="$BOOT_JDK"
22556      has_space=`$ECHO "$path" | $GREP " "`
22557      if test "x$has_space" != x; then
22558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22561      fi
22562
22563      # Use eval to expand a potential ~
22564      eval path="$path"
22565      if test ! -f "$path" && test ! -d "$path"; then
22566        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22567      fi
22568
22569      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22570    fi
22571  fi
22572
22573            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22574$as_echo_n "checking for Boot JDK... " >&6; }
22575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22576$as_echo "$BOOT_JDK" >&6; }
22577            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22578$as_echo_n "checking Boot JDK version... " >&6; }
22579            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22581$as_echo "$BOOT_JDK_VERSION" >&6; }
22582          fi # end check jdk version
22583        fi # end check javac
22584      fi # end check java
22585    fi # end check boot jdk found
22586  fi
22587
22588
22589  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22590
22591  if test "x$BOOT_JDK_FOUND" = xno; then
22592    # Now execute the test
22593
22594  # Extract the first word of "javac", so it can be a program name with args.
22595set dummy javac; ac_word=$2
22596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22597$as_echo_n "checking for $ac_word... " >&6; }
22598if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22599  $as_echo_n "(cached) " >&6
22600else
22601  case $JAVAC_CHECK in
22602  [\\/]* | ?:[\\/]*)
22603  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22604  ;;
22605  *)
22606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22607for as_dir in $PATH
22608do
22609  IFS=$as_save_IFS
22610  test -z "$as_dir" && as_dir=.
22611    for ac_exec_ext in '' $ac_executable_extensions; do
22612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22613    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22615    break 2
22616  fi
22617done
22618  done
22619IFS=$as_save_IFS
22620
22621  ;;
22622esac
22623fi
22624JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22625if test -n "$JAVAC_CHECK"; then
22626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22627$as_echo "$JAVAC_CHECK" >&6; }
22628else
22629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22630$as_echo "no" >&6; }
22631fi
22632
22633
22634  # Extract the first word of "java", so it can be a program name with args.
22635set dummy java; ac_word=$2
22636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22637$as_echo_n "checking for $ac_word... " >&6; }
22638if ${ac_cv_path_JAVA_CHECK+:} false; then :
22639  $as_echo_n "(cached) " >&6
22640else
22641  case $JAVA_CHECK in
22642  [\\/]* | ?:[\\/]*)
22643  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22644  ;;
22645  *)
22646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22647for as_dir in $PATH
22648do
22649  IFS=$as_save_IFS
22650  test -z "$as_dir" && as_dir=.
22651    for ac_exec_ext in '' $ac_executable_extensions; do
22652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22653    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22655    break 2
22656  fi
22657done
22658  done
22659IFS=$as_save_IFS
22660
22661  ;;
22662esac
22663fi
22664JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22665if test -n "$JAVA_CHECK"; then
22666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22667$as_echo "$JAVA_CHECK" >&6; }
22668else
22669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22670$as_echo "no" >&6; }
22671fi
22672
22673
22674  BINARY="$JAVAC_CHECK"
22675  if test "x$JAVAC_CHECK" = x; then
22676    BINARY="$JAVA_CHECK"
22677  fi
22678  if test "x$BINARY" != x; then
22679    # So there is a java(c) binary, it might be part of a JDK.
22680    # Lets find the JDK/JRE directory by following symbolic links.
22681    # Linux/GNU systems often have links from /usr/bin/java to
22682    # /etc/alternatives/java to the real JDK binary.
22683
22684  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22685    # Follow a chain of symbolic links. Use readlink
22686    # where it exists, else fall back to horribly
22687    # complicated shell code.
22688    if test "x$READLINK_TESTED" != yes; then
22689      # On MacOSX there is a readlink tool with a different
22690      # purpose than the GNU readlink tool. Check the found readlink.
22691      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22692      if test "x$ISGNU" = x; then
22693        # A readlink that we do not know how to use.
22694        # Are there other non-GNU readlinks out there?
22695        READLINK_TESTED=yes
22696        READLINK=
22697      fi
22698    fi
22699
22700    if test "x$READLINK" != x; then
22701      BINARY=`$READLINK -f $BINARY`
22702    else
22703      # Save the current directory for restoring afterwards
22704      STARTDIR=$PWD
22705      COUNTER=0
22706      sym_link_dir=`$DIRNAME $BINARY`
22707      sym_link_file=`$BASENAME $BINARY`
22708      cd $sym_link_dir
22709      # Use -P flag to resolve symlinks in directories.
22710      cd `$THEPWDCMD -P`
22711      sym_link_dir=`$THEPWDCMD -P`
22712      # Resolve file symlinks
22713      while test $COUNTER -lt 20; do
22714        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22715        if test "x$ISLINK" == x; then
22716          # This is not a symbolic link! We are done!
22717          break
22718        fi
22719        # Again resolve directory symlinks since the target of the just found
22720        # link could be in a different directory
22721        cd `$DIRNAME $ISLINK`
22722        sym_link_dir=`$THEPWDCMD -P`
22723        sym_link_file=`$BASENAME $ISLINK`
22724        let COUNTER=COUNTER+1
22725      done
22726      cd $STARTDIR
22727      BINARY=$sym_link_dir/$sym_link_file
22728    fi
22729  fi
22730
22731    BOOT_JDK=`dirname "$BINARY"`
22732    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22733    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22734      # Looks like we found ourselves an JDK
22735      BOOT_JDK_FOUND=maybe
22736      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22737$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22738    fi
22739  fi
22740
22741
22742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22744      # Do we have a bin/java?
22745      if test ! -x "$BOOT_JDK/bin/java"; then
22746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22748        BOOT_JDK_FOUND=no
22749      else
22750        # Do we have a bin/javac?
22751        if test ! -x "$BOOT_JDK/bin/javac"; then
22752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22756          BOOT_JDK_FOUND=no
22757        else
22758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22760
22761          # Extra M4 quote needed to protect [] in grep expression.
22762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22763          if test "x$FOUND_CORRECT_VERSION" = x; then
22764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22768            BOOT_JDK_FOUND=no
22769          else
22770            # We're done! :-)
22771            BOOT_JDK_FOUND=yes
22772
22773  # Only process if variable expands to non-empty
22774
22775  if test "x$BOOT_JDK" != x; then
22776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22777
22778  # Input might be given as Windows format, start by converting to
22779  # unix format.
22780  path="$BOOT_JDK"
22781  new_path=`$CYGPATH -u "$path"`
22782
22783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22786  # "foo.exe" is OK but "foo" is an error.
22787  #
22788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22789  # It is also a way to make sure we got the proper file name for the real test later on.
22790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22791  if test "x$test_shortpath" = x; then
22792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22795  fi
22796
22797  # Call helper function which possibly converts this using DOS-style short mode.
22798  # If so, the updated path is stored in $new_path.
22799
22800  input_path="$new_path"
22801  # Check if we need to convert this using DOS-style short mode. If the path
22802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22803  # take no chances and rewrite it.
22804  # Note: m4 eats our [], so we need to use [ and ] instead.
22805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22806  if test "x$has_forbidden_chars" != x; then
22807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22811      # Going to short mode and back again did indeed matter. Since short mode is
22812      # case insensitive, let's make it lowercase to improve readability.
22813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22814      # Now convert it back to Unix-style (cygpath)
22815      input_path=`$CYGPATH -u "$shortmode_path"`
22816      new_path="$input_path"
22817    fi
22818  fi
22819
22820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22821  if test "x$test_cygdrive_prefix" = x; then
22822    # As a simple fix, exclude /usr/bin since it's not a real path.
22823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22825      # a path prefixed by /cygdrive for fixpath to work.
22826      new_path="$CYGWIN_ROOT_PATH$input_path"
22827    fi
22828  fi
22829
22830
22831  if test "x$path" != "x$new_path"; then
22832    BOOT_JDK="$new_path"
22833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22835  fi
22836
22837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22838
22839  path="$BOOT_JDK"
22840  has_colon=`$ECHO $path | $GREP ^.:`
22841  new_path="$path"
22842  if test "x$has_colon" = x; then
22843    # Not in mixed or Windows style, start by that.
22844    new_path=`cmd //c echo $path`
22845  fi
22846
22847
22848  input_path="$new_path"
22849  # Check if we need to convert this using DOS-style short mode. If the path
22850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22851  # take no chances and rewrite it.
22852  # Note: m4 eats our [], so we need to use [ and ] instead.
22853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22854  if test "x$has_forbidden_chars" != x; then
22855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22857  fi
22858
22859
22860  windows_path="$new_path"
22861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22862    unix_path=`$CYGPATH -u "$windows_path"`
22863    new_path="$unix_path"
22864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22866    new_path="$unix_path"
22867  fi
22868
22869  if test "x$path" != "x$new_path"; then
22870    BOOT_JDK="$new_path"
22871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22873  fi
22874
22875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22877
22878    else
22879      # We're on a unix platform. Hooray! :)
22880      path="$BOOT_JDK"
22881      has_space=`$ECHO "$path" | $GREP " "`
22882      if test "x$has_space" != x; then
22883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22886      fi
22887
22888      # Use eval to expand a potential ~
22889      eval path="$path"
22890      if test ! -f "$path" && test ! -d "$path"; then
22891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22892      fi
22893
22894      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22895    fi
22896  fi
22897
22898            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22899$as_echo_n "checking for Boot JDK... " >&6; }
22900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22901$as_echo "$BOOT_JDK" >&6; }
22902            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22903$as_echo_n "checking Boot JDK version... " >&6; }
22904            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22906$as_echo "$BOOT_JDK_VERSION" >&6; }
22907          fi # end check jdk version
22908        fi # end check javac
22909      fi # end check java
22910    fi # end check boot jdk found
22911  fi
22912
22913
22914  # Test: Is there a JDK installed in default, well-known locations?
22915
22916  if test "x$BOOT_JDK_FOUND" = xno; then
22917    # Now execute the test
22918
22919  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22920
22921  if test "x$BOOT_JDK_FOUND" = xno; then
22922    # Now execute the test
22923
22924  if test "x$ProgramW6432" != x; then
22925    VIRTUAL_DIR="$ProgramW6432/Java"
22926
22927  windows_path="$VIRTUAL_DIR"
22928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22929    unix_path=`$CYGPATH -u "$windows_path"`
22930    VIRTUAL_DIR="$unix_path"
22931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22933    VIRTUAL_DIR="$unix_path"
22934  fi
22935
22936
22937  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22938  BOOT_JDK_SUFFIX=""
22939  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22940  if test "x$ALL_JDKS_FOUND" != x; then
22941    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22942
22943  if test "x$BOOT_JDK_FOUND" = xno; then
22944    # Now execute the test
22945
22946        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22947        if test -d "$BOOT_JDK"; then
22948          BOOT_JDK_FOUND=maybe
22949          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22950$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22951        fi
22952
22953
22954    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22955    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22956      # Do we have a bin/java?
22957      if test ! -x "$BOOT_JDK/bin/java"; then
22958        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22960        BOOT_JDK_FOUND=no
22961      else
22962        # Do we have a bin/javac?
22963        if test ! -x "$BOOT_JDK/bin/javac"; then
22964          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22966          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22967$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22968          BOOT_JDK_FOUND=no
22969        else
22970          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22971          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22972
22973          # Extra M4 quote needed to protect [] in grep expression.
22974          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22975          if test "x$FOUND_CORRECT_VERSION" = x; then
22976            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22978            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22979$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22980            BOOT_JDK_FOUND=no
22981          else
22982            # We're done! :-)
22983            BOOT_JDK_FOUND=yes
22984
22985  # Only process if variable expands to non-empty
22986
22987  if test "x$BOOT_JDK" != x; then
22988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22989
22990  # Input might be given as Windows format, start by converting to
22991  # unix format.
22992  path="$BOOT_JDK"
22993  new_path=`$CYGPATH -u "$path"`
22994
22995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22998  # "foo.exe" is OK but "foo" is an error.
22999  #
23000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23001  # It is also a way to make sure we got the proper file name for the real test later on.
23002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23003  if test "x$test_shortpath" = x; then
23004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23005$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23006    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23007  fi
23008
23009  # Call helper function which possibly converts this using DOS-style short mode.
23010  # If so, the updated path is stored in $new_path.
23011
23012  input_path="$new_path"
23013  # Check if we need to convert this using DOS-style short mode. If the path
23014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23015  # take no chances and rewrite it.
23016  # Note: m4 eats our [], so we need to use [ and ] instead.
23017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23018  if test "x$has_forbidden_chars" != x; then
23019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23023      # Going to short mode and back again did indeed matter. Since short mode is
23024      # case insensitive, let's make it lowercase to improve readability.
23025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23026      # Now convert it back to Unix-style (cygpath)
23027      input_path=`$CYGPATH -u "$shortmode_path"`
23028      new_path="$input_path"
23029    fi
23030  fi
23031
23032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23033  if test "x$test_cygdrive_prefix" = x; then
23034    # As a simple fix, exclude /usr/bin since it's not a real path.
23035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23037      # a path prefixed by /cygdrive for fixpath to work.
23038      new_path="$CYGWIN_ROOT_PATH$input_path"
23039    fi
23040  fi
23041
23042
23043  if test "x$path" != "x$new_path"; then
23044    BOOT_JDK="$new_path"
23045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23047  fi
23048
23049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23050
23051  path="$BOOT_JDK"
23052  has_colon=`$ECHO $path | $GREP ^.:`
23053  new_path="$path"
23054  if test "x$has_colon" = x; then
23055    # Not in mixed or Windows style, start by that.
23056    new_path=`cmd //c echo $path`
23057  fi
23058
23059
23060  input_path="$new_path"
23061  # Check if we need to convert this using DOS-style short mode. If the path
23062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23063  # take no chances and rewrite it.
23064  # Note: m4 eats our [], so we need to use [ and ] instead.
23065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23066  if test "x$has_forbidden_chars" != x; then
23067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23069  fi
23070
23071
23072  windows_path="$new_path"
23073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23074    unix_path=`$CYGPATH -u "$windows_path"`
23075    new_path="$unix_path"
23076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23078    new_path="$unix_path"
23079  fi
23080
23081  if test "x$path" != "x$new_path"; then
23082    BOOT_JDK="$new_path"
23083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23084$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23085  fi
23086
23087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23089
23090    else
23091      # We're on a unix platform. Hooray! :)
23092      path="$BOOT_JDK"
23093      has_space=`$ECHO "$path" | $GREP " "`
23094      if test "x$has_space" != x; then
23095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23098      fi
23099
23100      # Use eval to expand a potential ~
23101      eval path="$path"
23102      if test ! -f "$path" && test ! -d "$path"; then
23103        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23104      fi
23105
23106      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23107    fi
23108  fi
23109
23110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23111$as_echo_n "checking for Boot JDK... " >&6; }
23112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23113$as_echo "$BOOT_JDK" >&6; }
23114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23115$as_echo_n "checking Boot JDK version... " >&6; }
23116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23118$as_echo "$BOOT_JDK_VERSION" >&6; }
23119          fi # end check jdk version
23120        fi # end check javac
23121      fi # end check java
23122    fi # end check boot jdk found
23123  fi
23124
23125    done
23126  fi
23127
23128  fi
23129
23130
23131    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23132    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23133      # Do we have a bin/java?
23134      if test ! -x "$BOOT_JDK/bin/java"; then
23135        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23137        BOOT_JDK_FOUND=no
23138      else
23139        # Do we have a bin/javac?
23140        if test ! -x "$BOOT_JDK/bin/javac"; then
23141          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23143          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23144$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23145          BOOT_JDK_FOUND=no
23146        else
23147          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23148          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23149
23150          # Extra M4 quote needed to protect [] in grep expression.
23151          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23152          if test "x$FOUND_CORRECT_VERSION" = x; then
23153            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23155            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23156$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23157            BOOT_JDK_FOUND=no
23158          else
23159            # We're done! :-)
23160            BOOT_JDK_FOUND=yes
23161
23162  # Only process if variable expands to non-empty
23163
23164  if test "x$BOOT_JDK" != x; then
23165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23166
23167  # Input might be given as Windows format, start by converting to
23168  # unix format.
23169  path="$BOOT_JDK"
23170  new_path=`$CYGPATH -u "$path"`
23171
23172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23175  # "foo.exe" is OK but "foo" is an error.
23176  #
23177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23178  # It is also a way to make sure we got the proper file name for the real test later on.
23179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23180  if test "x$test_shortpath" = x; then
23181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23182$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23183    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23184  fi
23185
23186  # Call helper function which possibly converts this using DOS-style short mode.
23187  # If so, the updated path is stored in $new_path.
23188
23189  input_path="$new_path"
23190  # Check if we need to convert this using DOS-style short mode. If the path
23191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23192  # take no chances and rewrite it.
23193  # Note: m4 eats our [], so we need to use [ and ] instead.
23194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23195  if test "x$has_forbidden_chars" != x; then
23196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23200      # Going to short mode and back again did indeed matter. Since short mode is
23201      # case insensitive, let's make it lowercase to improve readability.
23202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23203      # Now convert it back to Unix-style (cygpath)
23204      input_path=`$CYGPATH -u "$shortmode_path"`
23205      new_path="$input_path"
23206    fi
23207  fi
23208
23209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23210  if test "x$test_cygdrive_prefix" = x; then
23211    # As a simple fix, exclude /usr/bin since it's not a real path.
23212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23214      # a path prefixed by /cygdrive for fixpath to work.
23215      new_path="$CYGWIN_ROOT_PATH$input_path"
23216    fi
23217  fi
23218
23219
23220  if test "x$path" != "x$new_path"; then
23221    BOOT_JDK="$new_path"
23222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23224  fi
23225
23226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23227
23228  path="$BOOT_JDK"
23229  has_colon=`$ECHO $path | $GREP ^.:`
23230  new_path="$path"
23231  if test "x$has_colon" = x; then
23232    # Not in mixed or Windows style, start by that.
23233    new_path=`cmd //c echo $path`
23234  fi
23235
23236
23237  input_path="$new_path"
23238  # Check if we need to convert this using DOS-style short mode. If the path
23239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23240  # take no chances and rewrite it.
23241  # Note: m4 eats our [], so we need to use [ and ] instead.
23242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23243  if test "x$has_forbidden_chars" != x; then
23244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23246  fi
23247
23248
23249  windows_path="$new_path"
23250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23251    unix_path=`$CYGPATH -u "$windows_path"`
23252    new_path="$unix_path"
23253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23255    new_path="$unix_path"
23256  fi
23257
23258  if test "x$path" != "x$new_path"; then
23259    BOOT_JDK="$new_path"
23260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23262  fi
23263
23264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23266
23267    else
23268      # We're on a unix platform. Hooray! :)
23269      path="$BOOT_JDK"
23270      has_space=`$ECHO "$path" | $GREP " "`
23271      if test "x$has_space" != x; then
23272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23275      fi
23276
23277      # Use eval to expand a potential ~
23278      eval path="$path"
23279      if test ! -f "$path" && test ! -d "$path"; then
23280        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23281      fi
23282
23283      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23284    fi
23285  fi
23286
23287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23288$as_echo_n "checking for Boot JDK... " >&6; }
23289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23290$as_echo "$BOOT_JDK" >&6; }
23291            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23292$as_echo_n "checking Boot JDK version... " >&6; }
23293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23295$as_echo "$BOOT_JDK_VERSION" >&6; }
23296          fi # end check jdk version
23297        fi # end check javac
23298      fi # end check java
23299    fi # end check boot jdk found
23300  fi
23301
23302
23303  if test "x$BOOT_JDK_FOUND" = xno; then
23304    # Now execute the test
23305
23306  if test "x$PROGRAMW6432" != x; then
23307    VIRTUAL_DIR="$PROGRAMW6432/Java"
23308
23309  windows_path="$VIRTUAL_DIR"
23310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23311    unix_path=`$CYGPATH -u "$windows_path"`
23312    VIRTUAL_DIR="$unix_path"
23313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23315    VIRTUAL_DIR="$unix_path"
23316  fi
23317
23318
23319  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23320  BOOT_JDK_SUFFIX=""
23321  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23322  if test "x$ALL_JDKS_FOUND" != x; then
23323    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23324
23325  if test "x$BOOT_JDK_FOUND" = xno; then
23326    # Now execute the test
23327
23328        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23329        if test -d "$BOOT_JDK"; then
23330          BOOT_JDK_FOUND=maybe
23331          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23332$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23333        fi
23334
23335
23336    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23337    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23338      # Do we have a bin/java?
23339      if test ! -x "$BOOT_JDK/bin/java"; then
23340        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23342        BOOT_JDK_FOUND=no
23343      else
23344        # Do we have a bin/javac?
23345        if test ! -x "$BOOT_JDK/bin/javac"; then
23346          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23348          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23349$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23350          BOOT_JDK_FOUND=no
23351        else
23352          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23353          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23354
23355          # Extra M4 quote needed to protect [] in grep expression.
23356          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23357          if test "x$FOUND_CORRECT_VERSION" = x; then
23358            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23360            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23361$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23362            BOOT_JDK_FOUND=no
23363          else
23364            # We're done! :-)
23365            BOOT_JDK_FOUND=yes
23366
23367  # Only process if variable expands to non-empty
23368
23369  if test "x$BOOT_JDK" != x; then
23370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23371
23372  # Input might be given as Windows format, start by converting to
23373  # unix format.
23374  path="$BOOT_JDK"
23375  new_path=`$CYGPATH -u "$path"`
23376
23377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23380  # "foo.exe" is OK but "foo" is an error.
23381  #
23382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23383  # It is also a way to make sure we got the proper file name for the real test later on.
23384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23385  if test "x$test_shortpath" = x; then
23386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23388    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23389  fi
23390
23391  # Call helper function which possibly converts this using DOS-style short mode.
23392  # If so, the updated path is stored in $new_path.
23393
23394  input_path="$new_path"
23395  # Check if we need to convert this using DOS-style short mode. If the path
23396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23397  # take no chances and rewrite it.
23398  # Note: m4 eats our [], so we need to use [ and ] instead.
23399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23400  if test "x$has_forbidden_chars" != x; then
23401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23405      # Going to short mode and back again did indeed matter. Since short mode is
23406      # case insensitive, let's make it lowercase to improve readability.
23407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23408      # Now convert it back to Unix-style (cygpath)
23409      input_path=`$CYGPATH -u "$shortmode_path"`
23410      new_path="$input_path"
23411    fi
23412  fi
23413
23414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23415  if test "x$test_cygdrive_prefix" = x; then
23416    # As a simple fix, exclude /usr/bin since it's not a real path.
23417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23419      # a path prefixed by /cygdrive for fixpath to work.
23420      new_path="$CYGWIN_ROOT_PATH$input_path"
23421    fi
23422  fi
23423
23424
23425  if test "x$path" != "x$new_path"; then
23426    BOOT_JDK="$new_path"
23427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23429  fi
23430
23431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23432
23433  path="$BOOT_JDK"
23434  has_colon=`$ECHO $path | $GREP ^.:`
23435  new_path="$path"
23436  if test "x$has_colon" = x; then
23437    # Not in mixed or Windows style, start by that.
23438    new_path=`cmd //c echo $path`
23439  fi
23440
23441
23442  input_path="$new_path"
23443  # Check if we need to convert this using DOS-style short mode. If the path
23444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23445  # take no chances and rewrite it.
23446  # Note: m4 eats our [], so we need to use [ and ] instead.
23447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23448  if test "x$has_forbidden_chars" != x; then
23449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23451  fi
23452
23453
23454  windows_path="$new_path"
23455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23456    unix_path=`$CYGPATH -u "$windows_path"`
23457    new_path="$unix_path"
23458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23460    new_path="$unix_path"
23461  fi
23462
23463  if test "x$path" != "x$new_path"; then
23464    BOOT_JDK="$new_path"
23465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23467  fi
23468
23469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23471
23472    else
23473      # We're on a unix platform. Hooray! :)
23474      path="$BOOT_JDK"
23475      has_space=`$ECHO "$path" | $GREP " "`
23476      if test "x$has_space" != x; then
23477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23480      fi
23481
23482      # Use eval to expand a potential ~
23483      eval path="$path"
23484      if test ! -f "$path" && test ! -d "$path"; then
23485        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23486      fi
23487
23488      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23489    fi
23490  fi
23491
23492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23493$as_echo_n "checking for Boot JDK... " >&6; }
23494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23495$as_echo "$BOOT_JDK" >&6; }
23496            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23497$as_echo_n "checking Boot JDK version... " >&6; }
23498            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23500$as_echo "$BOOT_JDK_VERSION" >&6; }
23501          fi # end check jdk version
23502        fi # end check javac
23503      fi # end check java
23504    fi # end check boot jdk found
23505  fi
23506
23507    done
23508  fi
23509
23510  fi
23511
23512
23513    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23514    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23515      # Do we have a bin/java?
23516      if test ! -x "$BOOT_JDK/bin/java"; then
23517        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23519        BOOT_JDK_FOUND=no
23520      else
23521        # Do we have a bin/javac?
23522        if test ! -x "$BOOT_JDK/bin/javac"; then
23523          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23525          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23526$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23527          BOOT_JDK_FOUND=no
23528        else
23529          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23530          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23531
23532          # Extra M4 quote needed to protect [] in grep expression.
23533          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23534          if test "x$FOUND_CORRECT_VERSION" = x; then
23535            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23537            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23538$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23539            BOOT_JDK_FOUND=no
23540          else
23541            # We're done! :-)
23542            BOOT_JDK_FOUND=yes
23543
23544  # Only process if variable expands to non-empty
23545
23546  if test "x$BOOT_JDK" != x; then
23547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23548
23549  # Input might be given as Windows format, start by converting to
23550  # unix format.
23551  path="$BOOT_JDK"
23552  new_path=`$CYGPATH -u "$path"`
23553
23554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23557  # "foo.exe" is OK but "foo" is an error.
23558  #
23559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23560  # It is also a way to make sure we got the proper file name for the real test later on.
23561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23562  if test "x$test_shortpath" = x; then
23563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23565    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23566  fi
23567
23568  # Call helper function which possibly converts this using DOS-style short mode.
23569  # If so, the updated path is stored in $new_path.
23570
23571  input_path="$new_path"
23572  # Check if we need to convert this using DOS-style short mode. If the path
23573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23574  # take no chances and rewrite it.
23575  # Note: m4 eats our [], so we need to use [ and ] instead.
23576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23577  if test "x$has_forbidden_chars" != x; then
23578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23582      # Going to short mode and back again did indeed matter. Since short mode is
23583      # case insensitive, let's make it lowercase to improve readability.
23584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23585      # Now convert it back to Unix-style (cygpath)
23586      input_path=`$CYGPATH -u "$shortmode_path"`
23587      new_path="$input_path"
23588    fi
23589  fi
23590
23591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23592  if test "x$test_cygdrive_prefix" = x; then
23593    # As a simple fix, exclude /usr/bin since it's not a real path.
23594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23596      # a path prefixed by /cygdrive for fixpath to work.
23597      new_path="$CYGWIN_ROOT_PATH$input_path"
23598    fi
23599  fi
23600
23601
23602  if test "x$path" != "x$new_path"; then
23603    BOOT_JDK="$new_path"
23604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23606  fi
23607
23608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23609
23610  path="$BOOT_JDK"
23611  has_colon=`$ECHO $path | $GREP ^.:`
23612  new_path="$path"
23613  if test "x$has_colon" = x; then
23614    # Not in mixed or Windows style, start by that.
23615    new_path=`cmd //c echo $path`
23616  fi
23617
23618
23619  input_path="$new_path"
23620  # Check if we need to convert this using DOS-style short mode. If the path
23621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23622  # take no chances and rewrite it.
23623  # Note: m4 eats our [], so we need to use [ and ] instead.
23624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23625  if test "x$has_forbidden_chars" != x; then
23626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23628  fi
23629
23630
23631  windows_path="$new_path"
23632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23633    unix_path=`$CYGPATH -u "$windows_path"`
23634    new_path="$unix_path"
23635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23637    new_path="$unix_path"
23638  fi
23639
23640  if test "x$path" != "x$new_path"; then
23641    BOOT_JDK="$new_path"
23642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23644  fi
23645
23646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23648
23649    else
23650      # We're on a unix platform. Hooray! :)
23651      path="$BOOT_JDK"
23652      has_space=`$ECHO "$path" | $GREP " "`
23653      if test "x$has_space" != x; then
23654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23657      fi
23658
23659      # Use eval to expand a potential ~
23660      eval path="$path"
23661      if test ! -f "$path" && test ! -d "$path"; then
23662        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23663      fi
23664
23665      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23666    fi
23667  fi
23668
23669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23670$as_echo_n "checking for Boot JDK... " >&6; }
23671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23672$as_echo "$BOOT_JDK" >&6; }
23673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23674$as_echo_n "checking Boot JDK version... " >&6; }
23675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23677$as_echo "$BOOT_JDK_VERSION" >&6; }
23678          fi # end check jdk version
23679        fi # end check javac
23680      fi # end check java
23681    fi # end check boot jdk found
23682  fi
23683
23684
23685  if test "x$BOOT_JDK_FOUND" = xno; then
23686    # Now execute the test
23687
23688  if test "x$PROGRAMFILES" != x; then
23689    VIRTUAL_DIR="$PROGRAMFILES/Java"
23690
23691  windows_path="$VIRTUAL_DIR"
23692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23693    unix_path=`$CYGPATH -u "$windows_path"`
23694    VIRTUAL_DIR="$unix_path"
23695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23697    VIRTUAL_DIR="$unix_path"
23698  fi
23699
23700
23701  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23702  BOOT_JDK_SUFFIX=""
23703  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23704  if test "x$ALL_JDKS_FOUND" != x; then
23705    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23706
23707  if test "x$BOOT_JDK_FOUND" = xno; then
23708    # Now execute the test
23709
23710        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23711        if test -d "$BOOT_JDK"; then
23712          BOOT_JDK_FOUND=maybe
23713          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23714$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23715        fi
23716
23717
23718    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23719    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23720      # Do we have a bin/java?
23721      if test ! -x "$BOOT_JDK/bin/java"; then
23722        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23724        BOOT_JDK_FOUND=no
23725      else
23726        # Do we have a bin/javac?
23727        if test ! -x "$BOOT_JDK/bin/javac"; then
23728          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23730          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23731$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23732          BOOT_JDK_FOUND=no
23733        else
23734          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23735          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23736
23737          # Extra M4 quote needed to protect [] in grep expression.
23738          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23739          if test "x$FOUND_CORRECT_VERSION" = x; then
23740            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23742            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23743$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23744            BOOT_JDK_FOUND=no
23745          else
23746            # We're done! :-)
23747            BOOT_JDK_FOUND=yes
23748
23749  # Only process if variable expands to non-empty
23750
23751  if test "x$BOOT_JDK" != x; then
23752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23753
23754  # Input might be given as Windows format, start by converting to
23755  # unix format.
23756  path="$BOOT_JDK"
23757  new_path=`$CYGPATH -u "$path"`
23758
23759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23762  # "foo.exe" is OK but "foo" is an error.
23763  #
23764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23765  # It is also a way to make sure we got the proper file name for the real test later on.
23766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23767  if test "x$test_shortpath" = x; then
23768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23770    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23771  fi
23772
23773  # Call helper function which possibly converts this using DOS-style short mode.
23774  # If so, the updated path is stored in $new_path.
23775
23776  input_path="$new_path"
23777  # Check if we need to convert this using DOS-style short mode. If the path
23778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23779  # take no chances and rewrite it.
23780  # Note: m4 eats our [], so we need to use [ and ] instead.
23781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23782  if test "x$has_forbidden_chars" != x; then
23783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23787      # Going to short mode and back again did indeed matter. Since short mode is
23788      # case insensitive, let's make it lowercase to improve readability.
23789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23790      # Now convert it back to Unix-style (cygpath)
23791      input_path=`$CYGPATH -u "$shortmode_path"`
23792      new_path="$input_path"
23793    fi
23794  fi
23795
23796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23797  if test "x$test_cygdrive_prefix" = x; then
23798    # As a simple fix, exclude /usr/bin since it's not a real path.
23799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23801      # a path prefixed by /cygdrive for fixpath to work.
23802      new_path="$CYGWIN_ROOT_PATH$input_path"
23803    fi
23804  fi
23805
23806
23807  if test "x$path" != "x$new_path"; then
23808    BOOT_JDK="$new_path"
23809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23811  fi
23812
23813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23814
23815  path="$BOOT_JDK"
23816  has_colon=`$ECHO $path | $GREP ^.:`
23817  new_path="$path"
23818  if test "x$has_colon" = x; then
23819    # Not in mixed or Windows style, start by that.
23820    new_path=`cmd //c echo $path`
23821  fi
23822
23823
23824  input_path="$new_path"
23825  # Check if we need to convert this using DOS-style short mode. If the path
23826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23827  # take no chances and rewrite it.
23828  # Note: m4 eats our [], so we need to use [ and ] instead.
23829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23830  if test "x$has_forbidden_chars" != x; then
23831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23833  fi
23834
23835
23836  windows_path="$new_path"
23837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23838    unix_path=`$CYGPATH -u "$windows_path"`
23839    new_path="$unix_path"
23840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23842    new_path="$unix_path"
23843  fi
23844
23845  if test "x$path" != "x$new_path"; then
23846    BOOT_JDK="$new_path"
23847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23849  fi
23850
23851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23853
23854    else
23855      # We're on a unix platform. Hooray! :)
23856      path="$BOOT_JDK"
23857      has_space=`$ECHO "$path" | $GREP " "`
23858      if test "x$has_space" != x; then
23859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23862      fi
23863
23864      # Use eval to expand a potential ~
23865      eval path="$path"
23866      if test ! -f "$path" && test ! -d "$path"; then
23867        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23868      fi
23869
23870      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23871    fi
23872  fi
23873
23874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23875$as_echo_n "checking for Boot JDK... " >&6; }
23876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23877$as_echo "$BOOT_JDK" >&6; }
23878            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23879$as_echo_n "checking Boot JDK version... " >&6; }
23880            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23882$as_echo "$BOOT_JDK_VERSION" >&6; }
23883          fi # end check jdk version
23884        fi # end check javac
23885      fi # end check java
23886    fi # end check boot jdk found
23887  fi
23888
23889    done
23890  fi
23891
23892  fi
23893
23894
23895    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23896    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23897      # Do we have a bin/java?
23898      if test ! -x "$BOOT_JDK/bin/java"; then
23899        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23901        BOOT_JDK_FOUND=no
23902      else
23903        # Do we have a bin/javac?
23904        if test ! -x "$BOOT_JDK/bin/javac"; then
23905          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23907          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23908$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23909          BOOT_JDK_FOUND=no
23910        else
23911          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23912          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23913
23914          # Extra M4 quote needed to protect [] in grep expression.
23915          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23916          if test "x$FOUND_CORRECT_VERSION" = x; then
23917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23919            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23920$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23921            BOOT_JDK_FOUND=no
23922          else
23923            # We're done! :-)
23924            BOOT_JDK_FOUND=yes
23925
23926  # Only process if variable expands to non-empty
23927
23928  if test "x$BOOT_JDK" != x; then
23929    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23930
23931  # Input might be given as Windows format, start by converting to
23932  # unix format.
23933  path="$BOOT_JDK"
23934  new_path=`$CYGPATH -u "$path"`
23935
23936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23939  # "foo.exe" is OK but "foo" is an error.
23940  #
23941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23942  # It is also a way to make sure we got the proper file name for the real test later on.
23943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23944  if test "x$test_shortpath" = x; then
23945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23947    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23948  fi
23949
23950  # Call helper function which possibly converts this using DOS-style short mode.
23951  # If so, the updated path is stored in $new_path.
23952
23953  input_path="$new_path"
23954  # Check if we need to convert this using DOS-style short mode. If the path
23955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23956  # take no chances and rewrite it.
23957  # Note: m4 eats our [], so we need to use [ and ] instead.
23958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23959  if test "x$has_forbidden_chars" != x; then
23960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23964      # Going to short mode and back again did indeed matter. Since short mode is
23965      # case insensitive, let's make it lowercase to improve readability.
23966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23967      # Now convert it back to Unix-style (cygpath)
23968      input_path=`$CYGPATH -u "$shortmode_path"`
23969      new_path="$input_path"
23970    fi
23971  fi
23972
23973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23974  if test "x$test_cygdrive_prefix" = x; then
23975    # As a simple fix, exclude /usr/bin since it's not a real path.
23976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23978      # a path prefixed by /cygdrive for fixpath to work.
23979      new_path="$CYGWIN_ROOT_PATH$input_path"
23980    fi
23981  fi
23982
23983
23984  if test "x$path" != "x$new_path"; then
23985    BOOT_JDK="$new_path"
23986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23988  fi
23989
23990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23991
23992  path="$BOOT_JDK"
23993  has_colon=`$ECHO $path | $GREP ^.:`
23994  new_path="$path"
23995  if test "x$has_colon" = x; then
23996    # Not in mixed or Windows style, start by that.
23997    new_path=`cmd //c echo $path`
23998  fi
23999
24000
24001  input_path="$new_path"
24002  # Check if we need to convert this using DOS-style short mode. If the path
24003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24004  # take no chances and rewrite it.
24005  # Note: m4 eats our [], so we need to use [ and ] instead.
24006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24007  if test "x$has_forbidden_chars" != x; then
24008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24010  fi
24011
24012
24013  windows_path="$new_path"
24014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24015    unix_path=`$CYGPATH -u "$windows_path"`
24016    new_path="$unix_path"
24017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24019    new_path="$unix_path"
24020  fi
24021
24022  if test "x$path" != "x$new_path"; then
24023    BOOT_JDK="$new_path"
24024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24026  fi
24027
24028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24030
24031    else
24032      # We're on a unix platform. Hooray! :)
24033      path="$BOOT_JDK"
24034      has_space=`$ECHO "$path" | $GREP " "`
24035      if test "x$has_space" != x; then
24036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24038        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24039      fi
24040
24041      # Use eval to expand a potential ~
24042      eval path="$path"
24043      if test ! -f "$path" && test ! -d "$path"; then
24044        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24045      fi
24046
24047      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24048    fi
24049  fi
24050
24051            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24052$as_echo_n "checking for Boot JDK... " >&6; }
24053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24054$as_echo "$BOOT_JDK" >&6; }
24055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24056$as_echo_n "checking Boot JDK version... " >&6; }
24057            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24059$as_echo "$BOOT_JDK_VERSION" >&6; }
24060          fi # end check jdk version
24061        fi # end check javac
24062      fi # end check java
24063    fi # end check boot jdk found
24064  fi
24065
24066
24067  if test "x$BOOT_JDK_FOUND" = xno; then
24068    # Now execute the test
24069
24070  if test "x$ProgramFiles" != x; then
24071    VIRTUAL_DIR="$ProgramFiles/Java"
24072
24073  windows_path="$VIRTUAL_DIR"
24074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24075    unix_path=`$CYGPATH -u "$windows_path"`
24076    VIRTUAL_DIR="$unix_path"
24077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24079    VIRTUAL_DIR="$unix_path"
24080  fi
24081
24082
24083  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24084  BOOT_JDK_SUFFIX=""
24085  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24086  if test "x$ALL_JDKS_FOUND" != x; then
24087    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24088
24089  if test "x$BOOT_JDK_FOUND" = xno; then
24090    # Now execute the test
24091
24092        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24093        if test -d "$BOOT_JDK"; then
24094          BOOT_JDK_FOUND=maybe
24095          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24096$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24097        fi
24098
24099
24100    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24101    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24102      # Do we have a bin/java?
24103      if test ! -x "$BOOT_JDK/bin/java"; then
24104        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24106        BOOT_JDK_FOUND=no
24107      else
24108        # Do we have a bin/javac?
24109        if test ! -x "$BOOT_JDK/bin/javac"; then
24110          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24112          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24113$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24114          BOOT_JDK_FOUND=no
24115        else
24116          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24117          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24118
24119          # Extra M4 quote needed to protect [] in grep expression.
24120          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24121          if test "x$FOUND_CORRECT_VERSION" = x; then
24122            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24124            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24125$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24126            BOOT_JDK_FOUND=no
24127          else
24128            # We're done! :-)
24129            BOOT_JDK_FOUND=yes
24130
24131  # Only process if variable expands to non-empty
24132
24133  if test "x$BOOT_JDK" != x; then
24134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24135
24136  # Input might be given as Windows format, start by converting to
24137  # unix format.
24138  path="$BOOT_JDK"
24139  new_path=`$CYGPATH -u "$path"`
24140
24141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24144  # "foo.exe" is OK but "foo" is an error.
24145  #
24146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24147  # It is also a way to make sure we got the proper file name for the real test later on.
24148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24149  if test "x$test_shortpath" = x; then
24150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24152    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24153  fi
24154
24155  # Call helper function which possibly converts this using DOS-style short mode.
24156  # If so, the updated path is stored in $new_path.
24157
24158  input_path="$new_path"
24159  # Check if we need to convert this using DOS-style short mode. If the path
24160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24161  # take no chances and rewrite it.
24162  # Note: m4 eats our [], so we need to use [ and ] instead.
24163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24164  if test "x$has_forbidden_chars" != x; then
24165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24169      # Going to short mode and back again did indeed matter. Since short mode is
24170      # case insensitive, let's make it lowercase to improve readability.
24171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24172      # Now convert it back to Unix-style (cygpath)
24173      input_path=`$CYGPATH -u "$shortmode_path"`
24174      new_path="$input_path"
24175    fi
24176  fi
24177
24178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24179  if test "x$test_cygdrive_prefix" = x; then
24180    # As a simple fix, exclude /usr/bin since it's not a real path.
24181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24183      # a path prefixed by /cygdrive for fixpath to work.
24184      new_path="$CYGWIN_ROOT_PATH$input_path"
24185    fi
24186  fi
24187
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24196
24197  path="$BOOT_JDK"
24198  has_colon=`$ECHO $path | $GREP ^.:`
24199  new_path="$path"
24200  if test "x$has_colon" = x; then
24201    # Not in mixed or Windows style, start by that.
24202    new_path=`cmd //c echo $path`
24203  fi
24204
24205
24206  input_path="$new_path"
24207  # Check if we need to convert this using DOS-style short mode. If the path
24208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24209  # take no chances and rewrite it.
24210  # Note: m4 eats our [], so we need to use [ and ] instead.
24211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24212  if test "x$has_forbidden_chars" != x; then
24213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24215  fi
24216
24217
24218  windows_path="$new_path"
24219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24220    unix_path=`$CYGPATH -u "$windows_path"`
24221    new_path="$unix_path"
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24224    new_path="$unix_path"
24225  fi
24226
24227  if test "x$path" != "x$new_path"; then
24228    BOOT_JDK="$new_path"
24229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24231  fi
24232
24233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24235
24236    else
24237      # We're on a unix platform. Hooray! :)
24238      path="$BOOT_JDK"
24239      has_space=`$ECHO "$path" | $GREP " "`
24240      if test "x$has_space" != x; then
24241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24244      fi
24245
24246      # Use eval to expand a potential ~
24247      eval path="$path"
24248      if test ! -f "$path" && test ! -d "$path"; then
24249        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24250      fi
24251
24252      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24253    fi
24254  fi
24255
24256            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24257$as_echo_n "checking for Boot JDK... " >&6; }
24258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24259$as_echo "$BOOT_JDK" >&6; }
24260            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24261$as_echo_n "checking Boot JDK version... " >&6; }
24262            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24264$as_echo "$BOOT_JDK_VERSION" >&6; }
24265          fi # end check jdk version
24266        fi # end check javac
24267      fi # end check java
24268    fi # end check boot jdk found
24269  fi
24270
24271    done
24272  fi
24273
24274  fi
24275
24276
24277    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24278    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24279      # Do we have a bin/java?
24280      if test ! -x "$BOOT_JDK/bin/java"; then
24281        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24283        BOOT_JDK_FOUND=no
24284      else
24285        # Do we have a bin/javac?
24286        if test ! -x "$BOOT_JDK/bin/javac"; then
24287          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24289          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24290$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24291          BOOT_JDK_FOUND=no
24292        else
24293          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24294          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24295
24296          # Extra M4 quote needed to protect [] in grep expression.
24297          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24298          if test "x$FOUND_CORRECT_VERSION" = x; then
24299            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24301            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24302$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24303            BOOT_JDK_FOUND=no
24304          else
24305            # We're done! :-)
24306            BOOT_JDK_FOUND=yes
24307
24308  # Only process if variable expands to non-empty
24309
24310  if test "x$BOOT_JDK" != x; then
24311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24312
24313  # Input might be given as Windows format, start by converting to
24314  # unix format.
24315  path="$BOOT_JDK"
24316  new_path=`$CYGPATH -u "$path"`
24317
24318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24321  # "foo.exe" is OK but "foo" is an error.
24322  #
24323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24324  # It is also a way to make sure we got the proper file name for the real test later on.
24325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24326  if test "x$test_shortpath" = x; then
24327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24328$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24329    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24330  fi
24331
24332  # Call helper function which possibly converts this using DOS-style short mode.
24333  # If so, the updated path is stored in $new_path.
24334
24335  input_path="$new_path"
24336  # Check if we need to convert this using DOS-style short mode. If the path
24337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24338  # take no chances and rewrite it.
24339  # Note: m4 eats our [], so we need to use [ and ] instead.
24340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24341  if test "x$has_forbidden_chars" != x; then
24342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24346      # Going to short mode and back again did indeed matter. Since short mode is
24347      # case insensitive, let's make it lowercase to improve readability.
24348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24349      # Now convert it back to Unix-style (cygpath)
24350      input_path=`$CYGPATH -u "$shortmode_path"`
24351      new_path="$input_path"
24352    fi
24353  fi
24354
24355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24356  if test "x$test_cygdrive_prefix" = x; then
24357    # As a simple fix, exclude /usr/bin since it's not a real path.
24358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24360      # a path prefixed by /cygdrive for fixpath to work.
24361      new_path="$CYGWIN_ROOT_PATH$input_path"
24362    fi
24363  fi
24364
24365
24366  if test "x$path" != "x$new_path"; then
24367    BOOT_JDK="$new_path"
24368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24370  fi
24371
24372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24373
24374  path="$BOOT_JDK"
24375  has_colon=`$ECHO $path | $GREP ^.:`
24376  new_path="$path"
24377  if test "x$has_colon" = x; then
24378    # Not in mixed or Windows style, start by that.
24379    new_path=`cmd //c echo $path`
24380  fi
24381
24382
24383  input_path="$new_path"
24384  # Check if we need to convert this using DOS-style short mode. If the path
24385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24386  # take no chances and rewrite it.
24387  # Note: m4 eats our [], so we need to use [ and ] instead.
24388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24389  if test "x$has_forbidden_chars" != x; then
24390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24392  fi
24393
24394
24395  windows_path="$new_path"
24396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24397    unix_path=`$CYGPATH -u "$windows_path"`
24398    new_path="$unix_path"
24399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24401    new_path="$unix_path"
24402  fi
24403
24404  if test "x$path" != "x$new_path"; then
24405    BOOT_JDK="$new_path"
24406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24408  fi
24409
24410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24412
24413    else
24414      # We're on a unix platform. Hooray! :)
24415      path="$BOOT_JDK"
24416      has_space=`$ECHO "$path" | $GREP " "`
24417      if test "x$has_space" != x; then
24418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24421      fi
24422
24423      # Use eval to expand a potential ~
24424      eval path="$path"
24425      if test ! -f "$path" && test ! -d "$path"; then
24426        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24427      fi
24428
24429      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24430    fi
24431  fi
24432
24433            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24434$as_echo_n "checking for Boot JDK... " >&6; }
24435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24436$as_echo "$BOOT_JDK" >&6; }
24437            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24438$as_echo_n "checking Boot JDK version... " >&6; }
24439            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24441$as_echo "$BOOT_JDK_VERSION" >&6; }
24442          fi # end check jdk version
24443        fi # end check javac
24444      fi # end check java
24445    fi # end check boot jdk found
24446  fi
24447
24448
24449  if test "x$BOOT_JDK_FOUND" = xno; then
24450    # Now execute the test
24451
24452  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24453  BOOT_JDK_SUFFIX=""
24454  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24455  if test "x$ALL_JDKS_FOUND" != x; then
24456    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24457
24458  if test "x$BOOT_JDK_FOUND" = xno; then
24459    # Now execute the test
24460
24461        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24462        if test -d "$BOOT_JDK"; then
24463          BOOT_JDK_FOUND=maybe
24464          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24465$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24466        fi
24467
24468
24469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24471      # Do we have a bin/java?
24472      if test ! -x "$BOOT_JDK/bin/java"; then
24473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24475        BOOT_JDK_FOUND=no
24476      else
24477        # Do we have a bin/javac?
24478        if test ! -x "$BOOT_JDK/bin/javac"; then
24479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24483          BOOT_JDK_FOUND=no
24484        else
24485          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24486          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24487
24488          # Extra M4 quote needed to protect [] in grep expression.
24489          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24490          if test "x$FOUND_CORRECT_VERSION" = x; then
24491            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24493            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24494$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24495            BOOT_JDK_FOUND=no
24496          else
24497            # We're done! :-)
24498            BOOT_JDK_FOUND=yes
24499
24500  # Only process if variable expands to non-empty
24501
24502  if test "x$BOOT_JDK" != x; then
24503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24504
24505  # Input might be given as Windows format, start by converting to
24506  # unix format.
24507  path="$BOOT_JDK"
24508  new_path=`$CYGPATH -u "$path"`
24509
24510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24513  # "foo.exe" is OK but "foo" is an error.
24514  #
24515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24516  # It is also a way to make sure we got the proper file name for the real test later on.
24517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24518  if test "x$test_shortpath" = x; then
24519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24521    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24522  fi
24523
24524  # Call helper function which possibly converts this using DOS-style short mode.
24525  # If so, the updated path is stored in $new_path.
24526
24527  input_path="$new_path"
24528  # Check if we need to convert this using DOS-style short mode. If the path
24529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24530  # take no chances and rewrite it.
24531  # Note: m4 eats our [], so we need to use [ and ] instead.
24532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24533  if test "x$has_forbidden_chars" != x; then
24534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24538      # Going to short mode and back again did indeed matter. Since short mode is
24539      # case insensitive, let's make it lowercase to improve readability.
24540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24541      # Now convert it back to Unix-style (cygpath)
24542      input_path=`$CYGPATH -u "$shortmode_path"`
24543      new_path="$input_path"
24544    fi
24545  fi
24546
24547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24548  if test "x$test_cygdrive_prefix" = x; then
24549    # As a simple fix, exclude /usr/bin since it's not a real path.
24550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24552      # a path prefixed by /cygdrive for fixpath to work.
24553      new_path="$CYGWIN_ROOT_PATH$input_path"
24554    fi
24555  fi
24556
24557
24558  if test "x$path" != "x$new_path"; then
24559    BOOT_JDK="$new_path"
24560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24562  fi
24563
24564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24565
24566  path="$BOOT_JDK"
24567  has_colon=`$ECHO $path | $GREP ^.:`
24568  new_path="$path"
24569  if test "x$has_colon" = x; then
24570    # Not in mixed or Windows style, start by that.
24571    new_path=`cmd //c echo $path`
24572  fi
24573
24574
24575  input_path="$new_path"
24576  # Check if we need to convert this using DOS-style short mode. If the path
24577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24578  # take no chances and rewrite it.
24579  # Note: m4 eats our [], so we need to use [ and ] instead.
24580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24581  if test "x$has_forbidden_chars" != x; then
24582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24584  fi
24585
24586
24587  windows_path="$new_path"
24588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24589    unix_path=`$CYGPATH -u "$windows_path"`
24590    new_path="$unix_path"
24591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24593    new_path="$unix_path"
24594  fi
24595
24596  if test "x$path" != "x$new_path"; then
24597    BOOT_JDK="$new_path"
24598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24600  fi
24601
24602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24604
24605    else
24606      # We're on a unix platform. Hooray! :)
24607      path="$BOOT_JDK"
24608      has_space=`$ECHO "$path" | $GREP " "`
24609      if test "x$has_space" != x; then
24610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24613      fi
24614
24615      # Use eval to expand a potential ~
24616      eval path="$path"
24617      if test ! -f "$path" && test ! -d "$path"; then
24618        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24619      fi
24620
24621      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24622    fi
24623  fi
24624
24625            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24626$as_echo_n "checking for Boot JDK... " >&6; }
24627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24628$as_echo "$BOOT_JDK" >&6; }
24629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24630$as_echo_n "checking Boot JDK version... " >&6; }
24631            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24633$as_echo "$BOOT_JDK_VERSION" >&6; }
24634          fi # end check jdk version
24635        fi # end check javac
24636      fi # end check java
24637    fi # end check boot jdk found
24638  fi
24639
24640    done
24641  fi
24642
24643
24644    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24645    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24646      # Do we have a bin/java?
24647      if test ! -x "$BOOT_JDK/bin/java"; then
24648        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24650        BOOT_JDK_FOUND=no
24651      else
24652        # Do we have a bin/javac?
24653        if test ! -x "$BOOT_JDK/bin/javac"; then
24654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24656          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24657$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24658          BOOT_JDK_FOUND=no
24659        else
24660          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24661          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24662
24663          # Extra M4 quote needed to protect [] in grep expression.
24664          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24665          if test "x$FOUND_CORRECT_VERSION" = x; then
24666            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24668            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24669$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24670            BOOT_JDK_FOUND=no
24671          else
24672            # We're done! :-)
24673            BOOT_JDK_FOUND=yes
24674
24675  # Only process if variable expands to non-empty
24676
24677  if test "x$BOOT_JDK" != x; then
24678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24679
24680  # Input might be given as Windows format, start by converting to
24681  # unix format.
24682  path="$BOOT_JDK"
24683  new_path=`$CYGPATH -u "$path"`
24684
24685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24688  # "foo.exe" is OK but "foo" is an error.
24689  #
24690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24691  # It is also a way to make sure we got the proper file name for the real test later on.
24692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24693  if test "x$test_shortpath" = x; then
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24696    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24697  fi
24698
24699  # Call helper function which possibly converts this using DOS-style short mode.
24700  # If so, the updated path is stored in $new_path.
24701
24702  input_path="$new_path"
24703  # Check if we need to convert this using DOS-style short mode. If the path
24704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24705  # take no chances and rewrite it.
24706  # Note: m4 eats our [], so we need to use [ and ] instead.
24707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24708  if test "x$has_forbidden_chars" != x; then
24709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24713      # Going to short mode and back again did indeed matter. Since short mode is
24714      # case insensitive, let's make it lowercase to improve readability.
24715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24716      # Now convert it back to Unix-style (cygpath)
24717      input_path=`$CYGPATH -u "$shortmode_path"`
24718      new_path="$input_path"
24719    fi
24720  fi
24721
24722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24723  if test "x$test_cygdrive_prefix" = x; then
24724    # As a simple fix, exclude /usr/bin since it's not a real path.
24725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24727      # a path prefixed by /cygdrive for fixpath to work.
24728      new_path="$CYGWIN_ROOT_PATH$input_path"
24729    fi
24730  fi
24731
24732
24733  if test "x$path" != "x$new_path"; then
24734    BOOT_JDK="$new_path"
24735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24737  fi
24738
24739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24740
24741  path="$BOOT_JDK"
24742  has_colon=`$ECHO $path | $GREP ^.:`
24743  new_path="$path"
24744  if test "x$has_colon" = x; then
24745    # Not in mixed or Windows style, start by that.
24746    new_path=`cmd //c echo $path`
24747  fi
24748
24749
24750  input_path="$new_path"
24751  # Check if we need to convert this using DOS-style short mode. If the path
24752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24753  # take no chances and rewrite it.
24754  # Note: m4 eats our [], so we need to use [ and ] instead.
24755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24756  if test "x$has_forbidden_chars" != x; then
24757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24759  fi
24760
24761
24762  windows_path="$new_path"
24763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24764    unix_path=`$CYGPATH -u "$windows_path"`
24765    new_path="$unix_path"
24766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24768    new_path="$unix_path"
24769  fi
24770
24771  if test "x$path" != "x$new_path"; then
24772    BOOT_JDK="$new_path"
24773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24775  fi
24776
24777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24779
24780    else
24781      # We're on a unix platform. Hooray! :)
24782      path="$BOOT_JDK"
24783      has_space=`$ECHO "$path" | $GREP " "`
24784      if test "x$has_space" != x; then
24785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24788      fi
24789
24790      # Use eval to expand a potential ~
24791      eval path="$path"
24792      if test ! -f "$path" && test ! -d "$path"; then
24793        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24794      fi
24795
24796      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24797    fi
24798  fi
24799
24800            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24801$as_echo_n "checking for Boot JDK... " >&6; }
24802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24803$as_echo "$BOOT_JDK" >&6; }
24804            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24805$as_echo_n "checking Boot JDK version... " >&6; }
24806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24808$as_echo "$BOOT_JDK_VERSION" >&6; }
24809          fi # end check jdk version
24810        fi # end check javac
24811      fi # end check java
24812    fi # end check boot jdk found
24813  fi
24814
24815  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24816
24817  if test "x$BOOT_JDK_FOUND" = xno; then
24818    # Now execute the test
24819
24820  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24821  BOOT_JDK_SUFFIX="/Contents/Home"
24822  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24823  if test "x$ALL_JDKS_FOUND" != x; then
24824    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24825
24826  if test "x$BOOT_JDK_FOUND" = xno; then
24827    # Now execute the test
24828
24829        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24830        if test -d "$BOOT_JDK"; then
24831          BOOT_JDK_FOUND=maybe
24832          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24833$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24834        fi
24835
24836
24837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24839      # Do we have a bin/java?
24840      if test ! -x "$BOOT_JDK/bin/java"; then
24841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24843        BOOT_JDK_FOUND=no
24844      else
24845        # Do we have a bin/javac?
24846        if test ! -x "$BOOT_JDK/bin/javac"; then
24847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24851          BOOT_JDK_FOUND=no
24852        else
24853          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24854          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24855
24856          # Extra M4 quote needed to protect [] in grep expression.
24857          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24858          if test "x$FOUND_CORRECT_VERSION" = x; then
24859            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24861            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24862$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24863            BOOT_JDK_FOUND=no
24864          else
24865            # We're done! :-)
24866            BOOT_JDK_FOUND=yes
24867
24868  # Only process if variable expands to non-empty
24869
24870  if test "x$BOOT_JDK" != x; then
24871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24872
24873  # Input might be given as Windows format, start by converting to
24874  # unix format.
24875  path="$BOOT_JDK"
24876  new_path=`$CYGPATH -u "$path"`
24877
24878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24881  # "foo.exe" is OK but "foo" is an error.
24882  #
24883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24884  # It is also a way to make sure we got the proper file name for the real test later on.
24885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24886  if test "x$test_shortpath" = x; then
24887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24889    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24890  fi
24891
24892  # Call helper function which possibly converts this using DOS-style short mode.
24893  # If so, the updated path is stored in $new_path.
24894
24895  input_path="$new_path"
24896  # Check if we need to convert this using DOS-style short mode. If the path
24897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24898  # take no chances and rewrite it.
24899  # Note: m4 eats our [], so we need to use [ and ] instead.
24900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24901  if test "x$has_forbidden_chars" != x; then
24902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24906      # Going to short mode and back again did indeed matter. Since short mode is
24907      # case insensitive, let's make it lowercase to improve readability.
24908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24909      # Now convert it back to Unix-style (cygpath)
24910      input_path=`$CYGPATH -u "$shortmode_path"`
24911      new_path="$input_path"
24912    fi
24913  fi
24914
24915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24916  if test "x$test_cygdrive_prefix" = x; then
24917    # As a simple fix, exclude /usr/bin since it's not a real path.
24918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24920      # a path prefixed by /cygdrive for fixpath to work.
24921      new_path="$CYGWIN_ROOT_PATH$input_path"
24922    fi
24923  fi
24924
24925
24926  if test "x$path" != "x$new_path"; then
24927    BOOT_JDK="$new_path"
24928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24930  fi
24931
24932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24933
24934  path="$BOOT_JDK"
24935  has_colon=`$ECHO $path | $GREP ^.:`
24936  new_path="$path"
24937  if test "x$has_colon" = x; then
24938    # Not in mixed or Windows style, start by that.
24939    new_path=`cmd //c echo $path`
24940  fi
24941
24942
24943  input_path="$new_path"
24944  # Check if we need to convert this using DOS-style short mode. If the path
24945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24946  # take no chances and rewrite it.
24947  # Note: m4 eats our [], so we need to use [ and ] instead.
24948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24949  if test "x$has_forbidden_chars" != x; then
24950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24952  fi
24953
24954
24955  windows_path="$new_path"
24956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24957    unix_path=`$CYGPATH -u "$windows_path"`
24958    new_path="$unix_path"
24959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24961    new_path="$unix_path"
24962  fi
24963
24964  if test "x$path" != "x$new_path"; then
24965    BOOT_JDK="$new_path"
24966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24968  fi
24969
24970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24972
24973    else
24974      # We're on a unix platform. Hooray! :)
24975      path="$BOOT_JDK"
24976      has_space=`$ECHO "$path" | $GREP " "`
24977      if test "x$has_space" != x; then
24978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24981      fi
24982
24983      # Use eval to expand a potential ~
24984      eval path="$path"
24985      if test ! -f "$path" && test ! -d "$path"; then
24986        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24987      fi
24988
24989      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24990    fi
24991  fi
24992
24993            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24994$as_echo_n "checking for Boot JDK... " >&6; }
24995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24996$as_echo "$BOOT_JDK" >&6; }
24997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24998$as_echo_n "checking Boot JDK version... " >&6; }
24999            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25001$as_echo "$BOOT_JDK_VERSION" >&6; }
25002          fi # end check jdk version
25003        fi # end check javac
25004      fi # end check java
25005    fi # end check boot jdk found
25006  fi
25007
25008    done
25009  fi
25010
25011
25012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25014      # Do we have a bin/java?
25015      if test ! -x "$BOOT_JDK/bin/java"; then
25016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25018        BOOT_JDK_FOUND=no
25019      else
25020        # Do we have a bin/javac?
25021        if test ! -x "$BOOT_JDK/bin/javac"; then
25022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25026          BOOT_JDK_FOUND=no
25027        else
25028          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25029          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25030
25031          # Extra M4 quote needed to protect [] in grep expression.
25032          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25033          if test "x$FOUND_CORRECT_VERSION" = x; then
25034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25036            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25037$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25038            BOOT_JDK_FOUND=no
25039          else
25040            # We're done! :-)
25041            BOOT_JDK_FOUND=yes
25042
25043  # Only process if variable expands to non-empty
25044
25045  if test "x$BOOT_JDK" != x; then
25046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25047
25048  # Input might be given as Windows format, start by converting to
25049  # unix format.
25050  path="$BOOT_JDK"
25051  new_path=`$CYGPATH -u "$path"`
25052
25053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25056  # "foo.exe" is OK but "foo" is an error.
25057  #
25058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25059  # It is also a way to make sure we got the proper file name for the real test later on.
25060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25061  if test "x$test_shortpath" = x; then
25062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25065  fi
25066
25067  # Call helper function which possibly converts this using DOS-style short mode.
25068  # If so, the updated path is stored in $new_path.
25069
25070  input_path="$new_path"
25071  # Check if we need to convert this using DOS-style short mode. If the path
25072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25073  # take no chances and rewrite it.
25074  # Note: m4 eats our [], so we need to use [ and ] instead.
25075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25076  if test "x$has_forbidden_chars" != x; then
25077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25081      # Going to short mode and back again did indeed matter. Since short mode is
25082      # case insensitive, let's make it lowercase to improve readability.
25083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25084      # Now convert it back to Unix-style (cygpath)
25085      input_path=`$CYGPATH -u "$shortmode_path"`
25086      new_path="$input_path"
25087    fi
25088  fi
25089
25090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25091  if test "x$test_cygdrive_prefix" = x; then
25092    # As a simple fix, exclude /usr/bin since it's not a real path.
25093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25095      # a path prefixed by /cygdrive for fixpath to work.
25096      new_path="$CYGWIN_ROOT_PATH$input_path"
25097    fi
25098  fi
25099
25100
25101  if test "x$path" != "x$new_path"; then
25102    BOOT_JDK="$new_path"
25103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25105  fi
25106
25107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25108
25109  path="$BOOT_JDK"
25110  has_colon=`$ECHO $path | $GREP ^.:`
25111  new_path="$path"
25112  if test "x$has_colon" = x; then
25113    # Not in mixed or Windows style, start by that.
25114    new_path=`cmd //c echo $path`
25115  fi
25116
25117
25118  input_path="$new_path"
25119  # Check if we need to convert this using DOS-style short mode. If the path
25120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25121  # take no chances and rewrite it.
25122  # Note: m4 eats our [], so we need to use [ and ] instead.
25123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25124  if test "x$has_forbidden_chars" != x; then
25125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25127  fi
25128
25129
25130  windows_path="$new_path"
25131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25132    unix_path=`$CYGPATH -u "$windows_path"`
25133    new_path="$unix_path"
25134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25136    new_path="$unix_path"
25137  fi
25138
25139  if test "x$path" != "x$new_path"; then
25140    BOOT_JDK="$new_path"
25141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25143  fi
25144
25145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25147
25148    else
25149      # We're on a unix platform. Hooray! :)
25150      path="$BOOT_JDK"
25151      has_space=`$ECHO "$path" | $GREP " "`
25152      if test "x$has_space" != x; then
25153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25156      fi
25157
25158      # Use eval to expand a potential ~
25159      eval path="$path"
25160      if test ! -f "$path" && test ! -d "$path"; then
25161        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25162      fi
25163
25164      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25165    fi
25166  fi
25167
25168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25169$as_echo_n "checking for Boot JDK... " >&6; }
25170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25171$as_echo "$BOOT_JDK" >&6; }
25172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25173$as_echo_n "checking Boot JDK version... " >&6; }
25174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25176$as_echo "$BOOT_JDK_VERSION" >&6; }
25177          fi # end check jdk version
25178        fi # end check javac
25179      fi # end check java
25180    fi # end check boot jdk found
25181  fi
25182
25183
25184  if test "x$BOOT_JDK_FOUND" = xno; then
25185    # Now execute the test
25186
25187  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25188  BOOT_JDK_SUFFIX="/Contents/Home"
25189  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25190  if test "x$ALL_JDKS_FOUND" != x; then
25191    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25192
25193  if test "x$BOOT_JDK_FOUND" = xno; then
25194    # Now execute the test
25195
25196        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25197        if test -d "$BOOT_JDK"; then
25198          BOOT_JDK_FOUND=maybe
25199          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25200$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25201        fi
25202
25203
25204    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25205    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25206      # Do we have a bin/java?
25207      if test ! -x "$BOOT_JDK/bin/java"; then
25208        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25210        BOOT_JDK_FOUND=no
25211      else
25212        # Do we have a bin/javac?
25213        if test ! -x "$BOOT_JDK/bin/javac"; then
25214          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25216          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25217$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25218          BOOT_JDK_FOUND=no
25219        else
25220          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25221          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25222
25223          # Extra M4 quote needed to protect [] in grep expression.
25224          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25225          if test "x$FOUND_CORRECT_VERSION" = x; then
25226            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25228            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25229$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25230            BOOT_JDK_FOUND=no
25231          else
25232            # We're done! :-)
25233            BOOT_JDK_FOUND=yes
25234
25235  # Only process if variable expands to non-empty
25236
25237  if test "x$BOOT_JDK" != x; then
25238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25239
25240  # Input might be given as Windows format, start by converting to
25241  # unix format.
25242  path="$BOOT_JDK"
25243  new_path=`$CYGPATH -u "$path"`
25244
25245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25248  # "foo.exe" is OK but "foo" is an error.
25249  #
25250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25251  # It is also a way to make sure we got the proper file name for the real test later on.
25252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25253  if test "x$test_shortpath" = x; then
25254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25255$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25256    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25257  fi
25258
25259  # Call helper function which possibly converts this using DOS-style short mode.
25260  # If so, the updated path is stored in $new_path.
25261
25262  input_path="$new_path"
25263  # Check if we need to convert this using DOS-style short mode. If the path
25264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25265  # take no chances and rewrite it.
25266  # Note: m4 eats our [], so we need to use [ and ] instead.
25267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25268  if test "x$has_forbidden_chars" != x; then
25269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25273      # Going to short mode and back again did indeed matter. Since short mode is
25274      # case insensitive, let's make it lowercase to improve readability.
25275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25276      # Now convert it back to Unix-style (cygpath)
25277      input_path=`$CYGPATH -u "$shortmode_path"`
25278      new_path="$input_path"
25279    fi
25280  fi
25281
25282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25283  if test "x$test_cygdrive_prefix" = x; then
25284    # As a simple fix, exclude /usr/bin since it's not a real path.
25285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25287      # a path prefixed by /cygdrive for fixpath to work.
25288      new_path="$CYGWIN_ROOT_PATH$input_path"
25289    fi
25290  fi
25291
25292
25293  if test "x$path" != "x$new_path"; then
25294    BOOT_JDK="$new_path"
25295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25297  fi
25298
25299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25300
25301  path="$BOOT_JDK"
25302  has_colon=`$ECHO $path | $GREP ^.:`
25303  new_path="$path"
25304  if test "x$has_colon" = x; then
25305    # Not in mixed or Windows style, start by that.
25306    new_path=`cmd //c echo $path`
25307  fi
25308
25309
25310  input_path="$new_path"
25311  # Check if we need to convert this using DOS-style short mode. If the path
25312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25313  # take no chances and rewrite it.
25314  # Note: m4 eats our [], so we need to use [ and ] instead.
25315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25316  if test "x$has_forbidden_chars" != x; then
25317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25319  fi
25320
25321
25322  windows_path="$new_path"
25323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25324    unix_path=`$CYGPATH -u "$windows_path"`
25325    new_path="$unix_path"
25326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25328    new_path="$unix_path"
25329  fi
25330
25331  if test "x$path" != "x$new_path"; then
25332    BOOT_JDK="$new_path"
25333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25335  fi
25336
25337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25339
25340    else
25341      # We're on a unix platform. Hooray! :)
25342      path="$BOOT_JDK"
25343      has_space=`$ECHO "$path" | $GREP " "`
25344      if test "x$has_space" != x; then
25345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25347        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25348      fi
25349
25350      # Use eval to expand a potential ~
25351      eval path="$path"
25352      if test ! -f "$path" && test ! -d "$path"; then
25353        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25354      fi
25355
25356      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25357    fi
25358  fi
25359
25360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25361$as_echo_n "checking for Boot JDK... " >&6; }
25362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25363$as_echo "$BOOT_JDK" >&6; }
25364            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25365$as_echo_n "checking Boot JDK version... " >&6; }
25366            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25368$as_echo "$BOOT_JDK_VERSION" >&6; }
25369          fi # end check jdk version
25370        fi # end check javac
25371      fi # end check java
25372    fi # end check boot jdk found
25373  fi
25374
25375    done
25376  fi
25377
25378
25379    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25380    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25381      # Do we have a bin/java?
25382      if test ! -x "$BOOT_JDK/bin/java"; then
25383        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25385        BOOT_JDK_FOUND=no
25386      else
25387        # Do we have a bin/javac?
25388        if test ! -x "$BOOT_JDK/bin/javac"; then
25389          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25391          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25392$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25393          BOOT_JDK_FOUND=no
25394        else
25395          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25396          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25397
25398          # Extra M4 quote needed to protect [] in grep expression.
25399          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25400          if test "x$FOUND_CORRECT_VERSION" = x; then
25401            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25403            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25404$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25405            BOOT_JDK_FOUND=no
25406          else
25407            # We're done! :-)
25408            BOOT_JDK_FOUND=yes
25409
25410  # Only process if variable expands to non-empty
25411
25412  if test "x$BOOT_JDK" != x; then
25413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25414
25415  # Input might be given as Windows format, start by converting to
25416  # unix format.
25417  path="$BOOT_JDK"
25418  new_path=`$CYGPATH -u "$path"`
25419
25420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25423  # "foo.exe" is OK but "foo" is an error.
25424  #
25425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25426  # It is also a way to make sure we got the proper file name for the real test later on.
25427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25428  if test "x$test_shortpath" = x; then
25429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25431    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25432  fi
25433
25434  # Call helper function which possibly converts this using DOS-style short mode.
25435  # If so, the updated path is stored in $new_path.
25436
25437  input_path="$new_path"
25438  # Check if we need to convert this using DOS-style short mode. If the path
25439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25440  # take no chances and rewrite it.
25441  # Note: m4 eats our [], so we need to use [ and ] instead.
25442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25443  if test "x$has_forbidden_chars" != x; then
25444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25448      # Going to short mode and back again did indeed matter. Since short mode is
25449      # case insensitive, let's make it lowercase to improve readability.
25450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25451      # Now convert it back to Unix-style (cygpath)
25452      input_path=`$CYGPATH -u "$shortmode_path"`
25453      new_path="$input_path"
25454    fi
25455  fi
25456
25457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25458  if test "x$test_cygdrive_prefix" = x; then
25459    # As a simple fix, exclude /usr/bin since it's not a real path.
25460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25462      # a path prefixed by /cygdrive for fixpath to work.
25463      new_path="$CYGWIN_ROOT_PATH$input_path"
25464    fi
25465  fi
25466
25467
25468  if test "x$path" != "x$new_path"; then
25469    BOOT_JDK="$new_path"
25470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25472  fi
25473
25474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25475
25476  path="$BOOT_JDK"
25477  has_colon=`$ECHO $path | $GREP ^.:`
25478  new_path="$path"
25479  if test "x$has_colon" = x; then
25480    # Not in mixed or Windows style, start by that.
25481    new_path=`cmd //c echo $path`
25482  fi
25483
25484
25485  input_path="$new_path"
25486  # Check if we need to convert this using DOS-style short mode. If the path
25487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25488  # take no chances and rewrite it.
25489  # Note: m4 eats our [], so we need to use [ and ] instead.
25490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25491  if test "x$has_forbidden_chars" != x; then
25492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25494  fi
25495
25496
25497  windows_path="$new_path"
25498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25499    unix_path=`$CYGPATH -u "$windows_path"`
25500    new_path="$unix_path"
25501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25503    new_path="$unix_path"
25504  fi
25505
25506  if test "x$path" != "x$new_path"; then
25507    BOOT_JDK="$new_path"
25508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25510  fi
25511
25512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25514
25515    else
25516      # We're on a unix platform. Hooray! :)
25517      path="$BOOT_JDK"
25518      has_space=`$ECHO "$path" | $GREP " "`
25519      if test "x$has_space" != x; then
25520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25522        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25523      fi
25524
25525      # Use eval to expand a potential ~
25526      eval path="$path"
25527      if test ! -f "$path" && test ! -d "$path"; then
25528        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25529      fi
25530
25531      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25532    fi
25533  fi
25534
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25536$as_echo_n "checking for Boot JDK... " >&6; }
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25538$as_echo "$BOOT_JDK" >&6; }
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25540$as_echo_n "checking Boot JDK version... " >&6; }
25541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25543$as_echo "$BOOT_JDK_VERSION" >&6; }
25544          fi # end check jdk version
25545        fi # end check javac
25546      fi # end check java
25547    fi # end check boot jdk found
25548  fi
25549
25550  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25551
25552  if test "x$BOOT_JDK_FOUND" = xno; then
25553    # Now execute the test
25554
25555  BOOT_JDK_PREFIX="/usr/lib/jvm"
25556  BOOT_JDK_SUFFIX=""
25557  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25558  if test "x$ALL_JDKS_FOUND" != x; then
25559    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25560
25561  if test "x$BOOT_JDK_FOUND" = xno; then
25562    # Now execute the test
25563
25564        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25565        if test -d "$BOOT_JDK"; then
25566          BOOT_JDK_FOUND=maybe
25567          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25568$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25569        fi
25570
25571
25572    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25573    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25574      # Do we have a bin/java?
25575      if test ! -x "$BOOT_JDK/bin/java"; then
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25578        BOOT_JDK_FOUND=no
25579      else
25580        # Do we have a bin/javac?
25581        if test ! -x "$BOOT_JDK/bin/javac"; then
25582          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25584          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25585$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25586          BOOT_JDK_FOUND=no
25587        else
25588          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25589          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25590
25591          # Extra M4 quote needed to protect [] in grep expression.
25592          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25593          if test "x$FOUND_CORRECT_VERSION" = x; then
25594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25596            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25597$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25598            BOOT_JDK_FOUND=no
25599          else
25600            # We're done! :-)
25601            BOOT_JDK_FOUND=yes
25602
25603  # Only process if variable expands to non-empty
25604
25605  if test "x$BOOT_JDK" != x; then
25606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25607
25608  # Input might be given as Windows format, start by converting to
25609  # unix format.
25610  path="$BOOT_JDK"
25611  new_path=`$CYGPATH -u "$path"`
25612
25613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25616  # "foo.exe" is OK but "foo" is an error.
25617  #
25618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25619  # It is also a way to make sure we got the proper file name for the real test later on.
25620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25621  if test "x$test_shortpath" = x; then
25622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25624    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25625  fi
25626
25627  # Call helper function which possibly converts this using DOS-style short mode.
25628  # If so, the updated path is stored in $new_path.
25629
25630  input_path="$new_path"
25631  # Check if we need to convert this using DOS-style short mode. If the path
25632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25633  # take no chances and rewrite it.
25634  # Note: m4 eats our [], so we need to use [ and ] instead.
25635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25636  if test "x$has_forbidden_chars" != x; then
25637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25641      # Going to short mode and back again did indeed matter. Since short mode is
25642      # case insensitive, let's make it lowercase to improve readability.
25643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25644      # Now convert it back to Unix-style (cygpath)
25645      input_path=`$CYGPATH -u "$shortmode_path"`
25646      new_path="$input_path"
25647    fi
25648  fi
25649
25650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25651  if test "x$test_cygdrive_prefix" = x; then
25652    # As a simple fix, exclude /usr/bin since it's not a real path.
25653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25655      # a path prefixed by /cygdrive for fixpath to work.
25656      new_path="$CYGWIN_ROOT_PATH$input_path"
25657    fi
25658  fi
25659
25660
25661  if test "x$path" != "x$new_path"; then
25662    BOOT_JDK="$new_path"
25663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25665  fi
25666
25667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25668
25669  path="$BOOT_JDK"
25670  has_colon=`$ECHO $path | $GREP ^.:`
25671  new_path="$path"
25672  if test "x$has_colon" = x; then
25673    # Not in mixed or Windows style, start by that.
25674    new_path=`cmd //c echo $path`
25675  fi
25676
25677
25678  input_path="$new_path"
25679  # Check if we need to convert this using DOS-style short mode. If the path
25680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25681  # take no chances and rewrite it.
25682  # Note: m4 eats our [], so we need to use [ and ] instead.
25683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25684  if test "x$has_forbidden_chars" != x; then
25685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25687  fi
25688
25689
25690  windows_path="$new_path"
25691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25692    unix_path=`$CYGPATH -u "$windows_path"`
25693    new_path="$unix_path"
25694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25696    new_path="$unix_path"
25697  fi
25698
25699  if test "x$path" != "x$new_path"; then
25700    BOOT_JDK="$new_path"
25701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25702$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25703  fi
25704
25705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25707
25708    else
25709      # We're on a unix platform. Hooray! :)
25710      path="$BOOT_JDK"
25711      has_space=`$ECHO "$path" | $GREP " "`
25712      if test "x$has_space" != x; then
25713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25716      fi
25717
25718      # Use eval to expand a potential ~
25719      eval path="$path"
25720      if test ! -f "$path" && test ! -d "$path"; then
25721        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25722      fi
25723
25724      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25725    fi
25726  fi
25727
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25729$as_echo_n "checking for Boot JDK... " >&6; }
25730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25731$as_echo "$BOOT_JDK" >&6; }
25732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25733$as_echo_n "checking Boot JDK version... " >&6; }
25734            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25736$as_echo "$BOOT_JDK_VERSION" >&6; }
25737          fi # end check jdk version
25738        fi # end check javac
25739      fi # end check java
25740    fi # end check boot jdk found
25741  fi
25742
25743    done
25744  fi
25745
25746
25747    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25748    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25749      # Do we have a bin/java?
25750      if test ! -x "$BOOT_JDK/bin/java"; then
25751        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25753        BOOT_JDK_FOUND=no
25754      else
25755        # Do we have a bin/javac?
25756        if test ! -x "$BOOT_JDK/bin/javac"; then
25757          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25759          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25760$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25761          BOOT_JDK_FOUND=no
25762        else
25763          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25764          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25765
25766          # Extra M4 quote needed to protect [] in grep expression.
25767          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25768          if test "x$FOUND_CORRECT_VERSION" = x; then
25769            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25771            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25772$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25773            BOOT_JDK_FOUND=no
25774          else
25775            # We're done! :-)
25776            BOOT_JDK_FOUND=yes
25777
25778  # Only process if variable expands to non-empty
25779
25780  if test "x$BOOT_JDK" != x; then
25781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25782
25783  # Input might be given as Windows format, start by converting to
25784  # unix format.
25785  path="$BOOT_JDK"
25786  new_path=`$CYGPATH -u "$path"`
25787
25788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25791  # "foo.exe" is OK but "foo" is an error.
25792  #
25793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25794  # It is also a way to make sure we got the proper file name for the real test later on.
25795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25796  if test "x$test_shortpath" = x; then
25797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25798$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25799    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25800  fi
25801
25802  # Call helper function which possibly converts this using DOS-style short mode.
25803  # If so, the updated path is stored in $new_path.
25804
25805  input_path="$new_path"
25806  # Check if we need to convert this using DOS-style short mode. If the path
25807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25808  # take no chances and rewrite it.
25809  # Note: m4 eats our [], so we need to use [ and ] instead.
25810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25811  if test "x$has_forbidden_chars" != x; then
25812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25816      # Going to short mode and back again did indeed matter. Since short mode is
25817      # case insensitive, let's make it lowercase to improve readability.
25818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25819      # Now convert it back to Unix-style (cygpath)
25820      input_path=`$CYGPATH -u "$shortmode_path"`
25821      new_path="$input_path"
25822    fi
25823  fi
25824
25825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25826  if test "x$test_cygdrive_prefix" = x; then
25827    # As a simple fix, exclude /usr/bin since it's not a real path.
25828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25830      # a path prefixed by /cygdrive for fixpath to work.
25831      new_path="$CYGWIN_ROOT_PATH$input_path"
25832    fi
25833  fi
25834
25835
25836  if test "x$path" != "x$new_path"; then
25837    BOOT_JDK="$new_path"
25838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25840  fi
25841
25842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25843
25844  path="$BOOT_JDK"
25845  has_colon=`$ECHO $path | $GREP ^.:`
25846  new_path="$path"
25847  if test "x$has_colon" = x; then
25848    # Not in mixed or Windows style, start by that.
25849    new_path=`cmd //c echo $path`
25850  fi
25851
25852
25853  input_path="$new_path"
25854  # Check if we need to convert this using DOS-style short mode. If the path
25855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25856  # take no chances and rewrite it.
25857  # Note: m4 eats our [], so we need to use [ and ] instead.
25858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25859  if test "x$has_forbidden_chars" != x; then
25860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25862  fi
25863
25864
25865  windows_path="$new_path"
25866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25867    unix_path=`$CYGPATH -u "$windows_path"`
25868    new_path="$unix_path"
25869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25871    new_path="$unix_path"
25872  fi
25873
25874  if test "x$path" != "x$new_path"; then
25875    BOOT_JDK="$new_path"
25876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25878  fi
25879
25880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25882
25883    else
25884      # We're on a unix platform. Hooray! :)
25885      path="$BOOT_JDK"
25886      has_space=`$ECHO "$path" | $GREP " "`
25887      if test "x$has_space" != x; then
25888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25889$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25891      fi
25892
25893      # Use eval to expand a potential ~
25894      eval path="$path"
25895      if test ! -f "$path" && test ! -d "$path"; then
25896        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25897      fi
25898
25899      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25900    fi
25901  fi
25902
25903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25904$as_echo_n "checking for Boot JDK... " >&6; }
25905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25906$as_echo "$BOOT_JDK" >&6; }
25907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25908$as_echo_n "checking Boot JDK version... " >&6; }
25909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25911$as_echo "$BOOT_JDK_VERSION" >&6; }
25912          fi # end check jdk version
25913        fi # end check javac
25914      fi # end check java
25915    fi # end check boot jdk found
25916  fi
25917
25918  fi
25919
25920
25921    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25922    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25923      # Do we have a bin/java?
25924      if test ! -x "$BOOT_JDK/bin/java"; then
25925        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25927        BOOT_JDK_FOUND=no
25928      else
25929        # Do we have a bin/javac?
25930        if test ! -x "$BOOT_JDK/bin/javac"; then
25931          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25933          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25934$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25935          BOOT_JDK_FOUND=no
25936        else
25937          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25938          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25939
25940          # Extra M4 quote needed to protect [] in grep expression.
25941          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25942          if test "x$FOUND_CORRECT_VERSION" = x; then
25943            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25945            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25946$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25947            BOOT_JDK_FOUND=no
25948          else
25949            # We're done! :-)
25950            BOOT_JDK_FOUND=yes
25951
25952  # Only process if variable expands to non-empty
25953
25954  if test "x$BOOT_JDK" != x; then
25955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25956
25957  # Input might be given as Windows format, start by converting to
25958  # unix format.
25959  path="$BOOT_JDK"
25960  new_path=`$CYGPATH -u "$path"`
25961
25962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25965  # "foo.exe" is OK but "foo" is an error.
25966  #
25967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25968  # It is also a way to make sure we got the proper file name for the real test later on.
25969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25970  if test "x$test_shortpath" = x; then
25971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25973    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25974  fi
25975
25976  # Call helper function which possibly converts this using DOS-style short mode.
25977  # If so, the updated path is stored in $new_path.
25978
25979  input_path="$new_path"
25980  # Check if we need to convert this using DOS-style short mode. If the path
25981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25982  # take no chances and rewrite it.
25983  # Note: m4 eats our [], so we need to use [ and ] instead.
25984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25985  if test "x$has_forbidden_chars" != x; then
25986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25990      # Going to short mode and back again did indeed matter. Since short mode is
25991      # case insensitive, let's make it lowercase to improve readability.
25992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25993      # Now convert it back to Unix-style (cygpath)
25994      input_path=`$CYGPATH -u "$shortmode_path"`
25995      new_path="$input_path"
25996    fi
25997  fi
25998
25999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26000  if test "x$test_cygdrive_prefix" = x; then
26001    # As a simple fix, exclude /usr/bin since it's not a real path.
26002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26004      # a path prefixed by /cygdrive for fixpath to work.
26005      new_path="$CYGWIN_ROOT_PATH$input_path"
26006    fi
26007  fi
26008
26009
26010  if test "x$path" != "x$new_path"; then
26011    BOOT_JDK="$new_path"
26012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26014  fi
26015
26016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26017
26018  path="$BOOT_JDK"
26019  has_colon=`$ECHO $path | $GREP ^.:`
26020  new_path="$path"
26021  if test "x$has_colon" = x; then
26022    # Not in mixed or Windows style, start by that.
26023    new_path=`cmd //c echo $path`
26024  fi
26025
26026
26027  input_path="$new_path"
26028  # Check if we need to convert this using DOS-style short mode. If the path
26029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26030  # take no chances and rewrite it.
26031  # Note: m4 eats our [], so we need to use [ and ] instead.
26032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26033  if test "x$has_forbidden_chars" != x; then
26034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26036  fi
26037
26038
26039  windows_path="$new_path"
26040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26041    unix_path=`$CYGPATH -u "$windows_path"`
26042    new_path="$unix_path"
26043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26045    new_path="$unix_path"
26046  fi
26047
26048  if test "x$path" != "x$new_path"; then
26049    BOOT_JDK="$new_path"
26050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26052  fi
26053
26054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26056
26057    else
26058      # We're on a unix platform. Hooray! :)
26059      path="$BOOT_JDK"
26060      has_space=`$ECHO "$path" | $GREP " "`
26061      if test "x$has_space" != x; then
26062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26064        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26065      fi
26066
26067      # Use eval to expand a potential ~
26068      eval path="$path"
26069      if test ! -f "$path" && test ! -d "$path"; then
26070        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26071      fi
26072
26073      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26074    fi
26075  fi
26076
26077            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26078$as_echo_n "checking for Boot JDK... " >&6; }
26079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26080$as_echo "$BOOT_JDK" >&6; }
26081            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26082$as_echo_n "checking Boot JDK version... " >&6; }
26083            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26085$as_echo "$BOOT_JDK_VERSION" >&6; }
26086          fi # end check jdk version
26087        fi # end check javac
26088      fi # end check java
26089    fi # end check boot jdk found
26090  fi
26091
26092
26093  # If we haven't found anything yet, we've truly lost. Give up.
26094  if test "x$BOOT_JDK_FOUND" = xno; then
26095
26096  # Print a helpful message on how to acquire the necessary build dependency.
26097  # openjdk is the help tag: freetype, cups, pulse, alsa etc
26098  MISSING_DEPENDENCY=openjdk
26099
26100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26101    cygwin_help $MISSING_DEPENDENCY
26102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26103    msys_help $MISSING_DEPENDENCY
26104  else
26105    PKGHANDLER_COMMAND=
26106
26107    case $PKGHANDLER in
26108      apt-get)
26109        apt_help     $MISSING_DEPENDENCY ;;
26110      yum)
26111        yum_help     $MISSING_DEPENDENCY ;;
26112      port)
26113        port_help    $MISSING_DEPENDENCY ;;
26114      pkgutil)
26115        pkgutil_help $MISSING_DEPENDENCY ;;
26116      pkgadd)
26117        pkgadd_help  $MISSING_DEPENDENCY ;;
26118    esac
26119
26120    if test "x$PKGHANDLER_COMMAND" != x; then
26121      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26122    fi
26123  fi
26124
26125    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
26126$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
26127    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
26128$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26129    as_fn_error $? "Cannot continue" "$LINENO" 5
26130  fi
26131
26132
26133
26134  # Setup tools from the Boot JDK.
26135
26136  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26137
26138  # Publish this variable in the help.
26139
26140
26141  if test "x$JAVA" = x; then
26142    # The variable is not set by user, try to locate tool using the code snippet
26143
26144      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26145$as_echo_n "checking for java in Boot JDK... " >&6; }
26146      JAVA=$BOOT_JDK/bin/java
26147      if test ! -x $JAVA; then
26148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26149$as_echo "not found" >&6; }
26150        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26151$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26152        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26153      fi
26154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26155$as_echo "ok" >&6; }
26156
26157
26158  else
26159    # The variable is set, but is it from the command line or the environment?
26160
26161    # Try to remove the string !JAVA! from our list.
26162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26164      # If it failed, the variable was not from the command line. Ignore it,
26165      # but warn the user (except for BASH, which is always set by the calling BASH).
26166      if test "xJAVA" != xBASH; then
26167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26168$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26169      fi
26170      # Try to locate tool using the code snippet
26171
26172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26173$as_echo_n "checking for java in Boot JDK... " >&6; }
26174      JAVA=$BOOT_JDK/bin/java
26175      if test ! -x $JAVA; then
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26177$as_echo "not found" >&6; }
26178        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26179$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26180        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26181      fi
26182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26183$as_echo "ok" >&6; }
26184
26185
26186    else
26187      # If it succeeded, then it was overridden by the user. We will use it
26188      # for the tool.
26189
26190      # First remove it from the list of overridden variables, so we can test
26191      # for unknown variables in the end.
26192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26193
26194      # Check if the provided tool contains a complete path.
26195      tool_specified="$JAVA"
26196      tool_basename="${tool_specified##*/}"
26197      if test "x$tool_basename" = "x$tool_specified"; then
26198        # A command without a complete path is provided, search $PATH.
26199        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26200$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26201        # Extract the first word of "$tool_basename", so it can be a program name with args.
26202set dummy $tool_basename; ac_word=$2
26203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26204$as_echo_n "checking for $ac_word... " >&6; }
26205if ${ac_cv_path_JAVA+:} false; then :
26206  $as_echo_n "(cached) " >&6
26207else
26208  case $JAVA in
26209  [\\/]* | ?:[\\/]*)
26210  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26211  ;;
26212  *)
26213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26214for as_dir in $PATH
26215do
26216  IFS=$as_save_IFS
26217  test -z "$as_dir" && as_dir=.
26218    for ac_exec_ext in '' $ac_executable_extensions; do
26219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26220    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26222    break 2
26223  fi
26224done
26225  done
26226IFS=$as_save_IFS
26227
26228  ;;
26229esac
26230fi
26231JAVA=$ac_cv_path_JAVA
26232if test -n "$JAVA"; then
26233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26234$as_echo "$JAVA" >&6; }
26235else
26236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26237$as_echo "no" >&6; }
26238fi
26239
26240
26241        if test "x$JAVA" = x; then
26242          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26243        fi
26244      else
26245        # Otherwise we believe it is a complete path. Use it as it is.
26246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26247$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26249$as_echo_n "checking for JAVA... " >&6; }
26250        if test ! -x "$tool_specified"; then
26251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26252$as_echo "not found" >&6; }
26253          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26254        fi
26255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26256$as_echo "$tool_specified" >&6; }
26257      fi
26258    fi
26259  fi
26260
26261
26262
26263  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26264
26265  # Publish this variable in the help.
26266
26267
26268  if test "x$JAVAC" = x; then
26269    # The variable is not set by user, try to locate tool using the code snippet
26270
26271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26272$as_echo_n "checking for javac in Boot JDK... " >&6; }
26273      JAVAC=$BOOT_JDK/bin/javac
26274      if test ! -x $JAVAC; then
26275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26276$as_echo "not found" >&6; }
26277        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26278$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26279        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26280      fi
26281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26282$as_echo "ok" >&6; }
26283
26284
26285  else
26286    # The variable is set, but is it from the command line or the environment?
26287
26288    # Try to remove the string !JAVAC! from our list.
26289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26291      # If it failed, the variable was not from the command line. Ignore it,
26292      # but warn the user (except for BASH, which is always set by the calling BASH).
26293      if test "xJAVAC" != xBASH; then
26294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26295$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26296      fi
26297      # Try to locate tool using the code snippet
26298
26299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26300$as_echo_n "checking for javac in Boot JDK... " >&6; }
26301      JAVAC=$BOOT_JDK/bin/javac
26302      if test ! -x $JAVAC; then
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26304$as_echo "not found" >&6; }
26305        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26306$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26307        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26308      fi
26309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26310$as_echo "ok" >&6; }
26311
26312
26313    else
26314      # If it succeeded, then it was overridden by the user. We will use it
26315      # for the tool.
26316
26317      # First remove it from the list of overridden variables, so we can test
26318      # for unknown variables in the end.
26319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26320
26321      # Check if the provided tool contains a complete path.
26322      tool_specified="$JAVAC"
26323      tool_basename="${tool_specified##*/}"
26324      if test "x$tool_basename" = "x$tool_specified"; then
26325        # A command without a complete path is provided, search $PATH.
26326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26327$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26328        # Extract the first word of "$tool_basename", so it can be a program name with args.
26329set dummy $tool_basename; ac_word=$2
26330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26331$as_echo_n "checking for $ac_word... " >&6; }
26332if ${ac_cv_path_JAVAC+:} false; then :
26333  $as_echo_n "(cached) " >&6
26334else
26335  case $JAVAC in
26336  [\\/]* | ?:[\\/]*)
26337  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26338  ;;
26339  *)
26340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26341for as_dir in $PATH
26342do
26343  IFS=$as_save_IFS
26344  test -z "$as_dir" && as_dir=.
26345    for ac_exec_ext in '' $ac_executable_extensions; do
26346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26347    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26349    break 2
26350  fi
26351done
26352  done
26353IFS=$as_save_IFS
26354
26355  ;;
26356esac
26357fi
26358JAVAC=$ac_cv_path_JAVAC
26359if test -n "$JAVAC"; then
26360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26361$as_echo "$JAVAC" >&6; }
26362else
26363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26364$as_echo "no" >&6; }
26365fi
26366
26367
26368        if test "x$JAVAC" = x; then
26369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26370        fi
26371      else
26372        # Otherwise we believe it is a complete path. Use it as it is.
26373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26374$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26376$as_echo_n "checking for JAVAC... " >&6; }
26377        if test ! -x "$tool_specified"; then
26378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26379$as_echo "not found" >&6; }
26380          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26381        fi
26382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26383$as_echo "$tool_specified" >&6; }
26384      fi
26385    fi
26386  fi
26387
26388
26389
26390  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26391
26392  # Publish this variable in the help.
26393
26394
26395  if test "x$JAVAH" = x; then
26396    # The variable is not set by user, try to locate tool using the code snippet
26397
26398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26399$as_echo_n "checking for javah in Boot JDK... " >&6; }
26400      JAVAH=$BOOT_JDK/bin/javah
26401      if test ! -x $JAVAH; then
26402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26403$as_echo "not found" >&6; }
26404        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26405$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26406        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26407      fi
26408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26409$as_echo "ok" >&6; }
26410
26411
26412  else
26413    # The variable is set, but is it from the command line or the environment?
26414
26415    # Try to remove the string !JAVAH! from our list.
26416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26418      # If it failed, the variable was not from the command line. Ignore it,
26419      # but warn the user (except for BASH, which is always set by the calling BASH).
26420      if test "xJAVAH" != xBASH; then
26421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26422$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26423      fi
26424      # Try to locate tool using the code snippet
26425
26426      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26427$as_echo_n "checking for javah in Boot JDK... " >&6; }
26428      JAVAH=$BOOT_JDK/bin/javah
26429      if test ! -x $JAVAH; then
26430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26431$as_echo "not found" >&6; }
26432        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26433$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26434        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26435      fi
26436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26437$as_echo "ok" >&6; }
26438
26439
26440    else
26441      # If it succeeded, then it was overridden by the user. We will use it
26442      # for the tool.
26443
26444      # First remove it from the list of overridden variables, so we can test
26445      # for unknown variables in the end.
26446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26447
26448      # Check if the provided tool contains a complete path.
26449      tool_specified="$JAVAH"
26450      tool_basename="${tool_specified##*/}"
26451      if test "x$tool_basename" = "x$tool_specified"; then
26452        # A command without a complete path is provided, search $PATH.
26453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26454$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26455        # Extract the first word of "$tool_basename", so it can be a program name with args.
26456set dummy $tool_basename; ac_word=$2
26457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26458$as_echo_n "checking for $ac_word... " >&6; }
26459if ${ac_cv_path_JAVAH+:} false; then :
26460  $as_echo_n "(cached) " >&6
26461else
26462  case $JAVAH in
26463  [\\/]* | ?:[\\/]*)
26464  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26465  ;;
26466  *)
26467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26468for as_dir in $PATH
26469do
26470  IFS=$as_save_IFS
26471  test -z "$as_dir" && as_dir=.
26472    for ac_exec_ext in '' $ac_executable_extensions; do
26473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26474    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26476    break 2
26477  fi
26478done
26479  done
26480IFS=$as_save_IFS
26481
26482  ;;
26483esac
26484fi
26485JAVAH=$ac_cv_path_JAVAH
26486if test -n "$JAVAH"; then
26487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26488$as_echo "$JAVAH" >&6; }
26489else
26490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26491$as_echo "no" >&6; }
26492fi
26493
26494
26495        if test "x$JAVAH" = x; then
26496          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26497        fi
26498      else
26499        # Otherwise we believe it is a complete path. Use it as it is.
26500        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26501$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26503$as_echo_n "checking for JAVAH... " >&6; }
26504        if test ! -x "$tool_specified"; then
26505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26506$as_echo "not found" >&6; }
26507          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26508        fi
26509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26510$as_echo "$tool_specified" >&6; }
26511      fi
26512    fi
26513  fi
26514
26515
26516
26517  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26518
26519  # Publish this variable in the help.
26520
26521
26522  if test "x$JAR" = x; then
26523    # The variable is not set by user, try to locate tool using the code snippet
26524
26525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26526$as_echo_n "checking for jar in Boot JDK... " >&6; }
26527      JAR=$BOOT_JDK/bin/jar
26528      if test ! -x $JAR; then
26529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26530$as_echo "not found" >&6; }
26531        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26532$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26533        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26534      fi
26535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26536$as_echo "ok" >&6; }
26537
26538
26539  else
26540    # The variable is set, but is it from the command line or the environment?
26541
26542    # Try to remove the string !JAR! from our list.
26543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26545      # If it failed, the variable was not from the command line. Ignore it,
26546      # but warn the user (except for BASH, which is always set by the calling BASH).
26547      if test "xJAR" != xBASH; then
26548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26549$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26550      fi
26551      # Try to locate tool using the code snippet
26552
26553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26554$as_echo_n "checking for jar in Boot JDK... " >&6; }
26555      JAR=$BOOT_JDK/bin/jar
26556      if test ! -x $JAR; then
26557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26558$as_echo "not found" >&6; }
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26560$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26561        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26562      fi
26563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26564$as_echo "ok" >&6; }
26565
26566
26567    else
26568      # If it succeeded, then it was overridden by the user. We will use it
26569      # for the tool.
26570
26571      # First remove it from the list of overridden variables, so we can test
26572      # for unknown variables in the end.
26573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26574
26575      # Check if the provided tool contains a complete path.
26576      tool_specified="$JAR"
26577      tool_basename="${tool_specified##*/}"
26578      if test "x$tool_basename" = "x$tool_specified"; then
26579        # A command without a complete path is provided, search $PATH.
26580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26581$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26582        # Extract the first word of "$tool_basename", so it can be a program name with args.
26583set dummy $tool_basename; ac_word=$2
26584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26585$as_echo_n "checking for $ac_word... " >&6; }
26586if ${ac_cv_path_JAR+:} false; then :
26587  $as_echo_n "(cached) " >&6
26588else
26589  case $JAR in
26590  [\\/]* | ?:[\\/]*)
26591  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26592  ;;
26593  *)
26594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26595for as_dir in $PATH
26596do
26597  IFS=$as_save_IFS
26598  test -z "$as_dir" && as_dir=.
26599    for ac_exec_ext in '' $ac_executable_extensions; do
26600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26601    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26603    break 2
26604  fi
26605done
26606  done
26607IFS=$as_save_IFS
26608
26609  ;;
26610esac
26611fi
26612JAR=$ac_cv_path_JAR
26613if test -n "$JAR"; then
26614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26615$as_echo "$JAR" >&6; }
26616else
26617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26618$as_echo "no" >&6; }
26619fi
26620
26621
26622        if test "x$JAR" = x; then
26623          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26624        fi
26625      else
26626        # Otherwise we believe it is a complete path. Use it as it is.
26627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26628$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26630$as_echo_n "checking for JAR... " >&6; }
26631        if test ! -x "$tool_specified"; then
26632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26633$as_echo "not found" >&6; }
26634          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26635        fi
26636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26637$as_echo "$tool_specified" >&6; }
26638      fi
26639    fi
26640  fi
26641
26642
26643
26644  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26645
26646  # Publish this variable in the help.
26647
26648
26649  if test "x$JARSIGNER" = x; then
26650    # The variable is not set by user, try to locate tool using the code snippet
26651
26652      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26653$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26654      JARSIGNER=$BOOT_JDK/bin/jarsigner
26655      if test ! -x $JARSIGNER; then
26656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26657$as_echo "not found" >&6; }
26658        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26659$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26660        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26661      fi
26662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26663$as_echo "ok" >&6; }
26664
26665
26666  else
26667    # The variable is set, but is it from the command line or the environment?
26668
26669    # Try to remove the string !JARSIGNER! from our list.
26670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26672      # If it failed, the variable was not from the command line. Ignore it,
26673      # but warn the user (except for BASH, which is always set by the calling BASH).
26674      if test "xJARSIGNER" != xBASH; then
26675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26676$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26677      fi
26678      # Try to locate tool using the code snippet
26679
26680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26681$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26682      JARSIGNER=$BOOT_JDK/bin/jarsigner
26683      if test ! -x $JARSIGNER; then
26684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26685$as_echo "not found" >&6; }
26686        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26687$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26688        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26689      fi
26690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26691$as_echo "ok" >&6; }
26692
26693
26694    else
26695      # If it succeeded, then it was overridden by the user. We will use it
26696      # for the tool.
26697
26698      # First remove it from the list of overridden variables, so we can test
26699      # for unknown variables in the end.
26700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26701
26702      # Check if the provided tool contains a complete path.
26703      tool_specified="$JARSIGNER"
26704      tool_basename="${tool_specified##*/}"
26705      if test "x$tool_basename" = "x$tool_specified"; then
26706        # A command without a complete path is provided, search $PATH.
26707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26708$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26709        # Extract the first word of "$tool_basename", so it can be a program name with args.
26710set dummy $tool_basename; ac_word=$2
26711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26712$as_echo_n "checking for $ac_word... " >&6; }
26713if ${ac_cv_path_JARSIGNER+:} false; then :
26714  $as_echo_n "(cached) " >&6
26715else
26716  case $JARSIGNER in
26717  [\\/]* | ?:[\\/]*)
26718  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26719  ;;
26720  *)
26721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26722for as_dir in $PATH
26723do
26724  IFS=$as_save_IFS
26725  test -z "$as_dir" && as_dir=.
26726    for ac_exec_ext in '' $ac_executable_extensions; do
26727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26728    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26730    break 2
26731  fi
26732done
26733  done
26734IFS=$as_save_IFS
26735
26736  ;;
26737esac
26738fi
26739JARSIGNER=$ac_cv_path_JARSIGNER
26740if test -n "$JARSIGNER"; then
26741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26742$as_echo "$JARSIGNER" >&6; }
26743else
26744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26745$as_echo "no" >&6; }
26746fi
26747
26748
26749        if test "x$JARSIGNER" = x; then
26750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26751        fi
26752      else
26753        # Otherwise we believe it is a complete path. Use it as it is.
26754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26755$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26757$as_echo_n "checking for JARSIGNER... " >&6; }
26758        if test ! -x "$tool_specified"; then
26759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26760$as_echo "not found" >&6; }
26761          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26762        fi
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26764$as_echo "$tool_specified" >&6; }
26765      fi
26766    fi
26767  fi
26768
26769
26770
26771  # Finally, set some other options...
26772
26773  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26774  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26775
26776
26777
26778
26779###############################################################################
26780#
26781# Configure the sources to use. We can add or override individual directories.
26782#
26783###############################################################################
26784
26785
26786  # Where are the sources. Any of these can be overridden
26787  # using --with-override-corba and the likes.
26788  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26789  CORBA_TOPDIR="$SRC_ROOT/corba"
26790  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26791  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26792  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26793  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26794  JDK_TOPDIR="$SRC_ROOT/jdk"
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805  ###############################################################################
26806  #
26807  # Pickup additional source for a component from outside of the source root
26808  # or override source for a component.
26809  #
26810
26811# Check whether --with-add-source-root was given.
26812if test "${with_add_source_root+set}" = set; then :
26813  withval=$with_add_source_root;
26814fi
26815
26816
26817
26818# Check whether --with-override-source-root was given.
26819if test "${with_override_source_root+set}" = set; then :
26820  withval=$with_override_source_root;
26821fi
26822
26823
26824
26825# Check whether --with-adds-and-overrides was given.
26826if test "${with_adds_and_overrides+set}" = set; then :
26827  withval=$with_adds_and_overrides;
26828fi
26829
26830
26831  if test "x$with_adds_and_overrides" != x; then
26832    with_add_source_root="$with_adds_and_overrides/adds"
26833    with_override_source_root="$with_adds_and_overrides/overrides"
26834  fi
26835
26836  if test "x$with_add_source_root" != x; then
26837    if ! test -d $with_add_source_root; then
26838      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26839    fi
26840    CURDIR="$PWD"
26841    cd "$with_add_source_root"
26842    ADD_SRC_ROOT="`pwd`"
26843    cd "$CURDIR"
26844    # Verify that the addon source root does not have any root makefiles.
26845    # If it does, then it is usually an error, prevent this.
26846    if test -f $with_add_source_root/langtools/make/Makefile; then
26847      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
26848    fi
26849    if test -f $with_add_source_root/corba/make/Makefile; then
26850      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
26851    fi
26852    if test -f $with_add_source_root/jaxp/make/Makefile; then
26853      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
26854    fi
26855    if test -f $with_add_source_root/jaxws/make/Makefile; then
26856      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
26857    fi
26858    if test -f $with_add_source_root/hotspot/make/Makefile; then
26859      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
26860    fi
26861    if test -f $with_add_source_root/nashorn/make/Makefile; then
26862      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
26863    fi
26864    if test -f $with_add_source_root/jdk/make/Makefile; then
26865      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
26866    fi
26867  fi
26868
26869
26870  if test "x$with_override_source_root" != x; then
26871    if ! test -d $with_override_source_root; then
26872      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26873    fi
26874    CURDIR="$PWD"
26875    cd "$with_override_source_root"
26876    OVERRIDE_SRC_ROOT="`pwd`"
26877    cd "$CURDIR"
26878    if test -f $with_override_source_root/langtools/make/Makefile; then
26879      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
26880    fi
26881    if test -f $with_override_source_root/corba/make/Makefile; then
26882      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
26883    fi
26884    if test -f $with_override_source_root/jaxp/make/Makefile; then
26885      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
26886    fi
26887    if test -f $with_override_source_root/jaxws/make/Makefile; then
26888      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
26889    fi
26890    if test -f $with_override_source_root/hotspot/make/Makefile; then
26891      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
26892    fi
26893    if test -f $with_override_source_root/nashorn/make/Makefile; then
26894      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
26895    fi
26896    if test -f $with_override_source_root/jdk/make/Makefile; then
26897      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
26898    fi
26899  fi
26900
26901
26902  ###############################################################################
26903  #
26904  # Override a repo completely, this is used for example when you have 3 small
26905  # development sandboxes of the langtools sources and want to avoid having 3 full
26906  # OpenJDK sources checked out on disk.
26907  #
26908  # Assuming that the 3 langtools sandboxes are located here:
26909  # /home/fredrik/sandbox1/langtools
26910  # /home/fredrik/sandbox2/langtools
26911  # /home/fredrik/sandbox3/langtools
26912  #
26913  # From the source root you create build subdirs manually:
26914  #     mkdir -p build1 build2 build3
26915  # in each build directory run:
26916  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26917  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26918  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26919  #
26920
26921
26922# Check whether --with-override-langtools was given.
26923if test "${with_override_langtools+set}" = set; then :
26924  withval=$with_override_langtools;
26925fi
26926
26927
26928
26929# Check whether --with-override-corba was given.
26930if test "${with_override_corba+set}" = set; then :
26931  withval=$with_override_corba;
26932fi
26933
26934
26935
26936# Check whether --with-override-jaxp was given.
26937if test "${with_override_jaxp+set}" = set; then :
26938  withval=$with_override_jaxp;
26939fi
26940
26941
26942
26943# Check whether --with-override-jaxws was given.
26944if test "${with_override_jaxws+set}" = set; then :
26945  withval=$with_override_jaxws;
26946fi
26947
26948
26949
26950# Check whether --with-override-hotspot was given.
26951if test "${with_override_hotspot+set}" = set; then :
26952  withval=$with_override_hotspot;
26953fi
26954
26955
26956
26957# Check whether --with-override-nashorn was given.
26958if test "${with_override_nashorn+set}" = set; then :
26959  withval=$with_override_nashorn;
26960fi
26961
26962
26963
26964# Check whether --with-override-jdk was given.
26965if test "${with_override_jdk+set}" = set; then :
26966  withval=$with_override_jdk;
26967fi
26968
26969
26970  if test "x$with_override_langtools" != x; then
26971    CURDIR="$PWD"
26972    cd "$with_override_langtools"
26973    LANGTOOLS_TOPDIR="`pwd`"
26974    cd "$CURDIR"
26975    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26976      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26977    fi
26978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26979$as_echo_n "checking if langtools should be overridden... " >&6; }
26980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26981$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26982  fi
26983  if test "x$with_override_corba" != x; then
26984    CURDIR="$PWD"
26985    cd "$with_override_corba"
26986    CORBA_TOPDIR="`pwd`"
26987    cd "$CURDIR"
26988    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26989      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26990    fi
26991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26992$as_echo_n "checking if corba should be overridden... " >&6; }
26993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26994$as_echo "yes with $CORBA_TOPDIR" >&6; }
26995  fi
26996  if test "x$with_override_jaxp" != x; then
26997    CURDIR="$PWD"
26998    cd "$with_override_jaxp"
26999    JAXP_TOPDIR="`pwd`"
27000    cd "$CURDIR"
27001    if ! test -f $JAXP_TOPDIR/make/Makefile; then
27002      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
27003    fi
27004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
27005$as_echo_n "checking if jaxp should be overridden... " >&6; }
27006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
27007$as_echo "yes with $JAXP_TOPDIR" >&6; }
27008  fi
27009  if test "x$with_override_jaxws" != x; then
27010    CURDIR="$PWD"
27011    cd "$with_override_jaxws"
27012    JAXWS_TOPDIR="`pwd`"
27013    cd "$CURDIR"
27014    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
27015      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
27016    fi
27017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
27018$as_echo_n "checking if jaxws should be overridden... " >&6; }
27019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
27020$as_echo "yes with $JAXWS_TOPDIR" >&6; }
27021  fi
27022  if test "x$with_override_hotspot" != x; then
27023    CURDIR="$PWD"
27024    cd "$with_override_hotspot"
27025    HOTSPOT_TOPDIR="`pwd`"
27026    cd "$CURDIR"
27027    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
27028      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
27029    fi
27030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
27031$as_echo_n "checking if hotspot should be overridden... " >&6; }
27032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
27033$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
27034  fi
27035  if test "x$with_override_nashorn" != x; then
27036    CURDIR="$PWD"
27037    cd "$with_override_nashorn"
27038    NASHORN_TOPDIR="`pwd`"
27039    cd "$CURDIR"
27040    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
27041      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
27042    fi
27043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
27044$as_echo_n "checking if nashorn should be overridden... " >&6; }
27045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
27046$as_echo "yes with $NASHORN_TOPDIR" >&6; }
27047  fi
27048  if test "x$with_override_jdk" != x; then
27049    CURDIR="$PWD"
27050    cd "$with_override_jdk"
27051    JDK_TOPDIR="`pwd`"
27052    cd "$CURDIR"
27053    if ! test -f $JDK_TOPDIR/make/Makefile; then
27054      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
27055    fi
27056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
27057$as_echo_n "checking if JDK should be overridden... " >&6; }
27058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
27059$as_echo "yes with $JDK_TOPDIR" >&6; }
27060  fi
27061
27062
27063  BUILD_OUTPUT="$OUTPUT_ROOT"
27064
27065
27066  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
27067  BUILD_HOTSPOT=true
27068
27069
27070
27071# Check whether --with-import-hotspot was given.
27072if test "${with_import_hotspot+set}" = set; then :
27073  withval=$with_import_hotspot;
27074fi
27075
27076  if test "x$with_import_hotspot" != x; then
27077    CURDIR="$PWD"
27078    cd "$with_import_hotspot"
27079    HOTSPOT_DIST="`pwd`"
27080    cd "$CURDIR"
27081    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27082      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27083    fi
27084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27085$as_echo_n "checking if hotspot should be imported... " >&6; }
27086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27087$as_echo "yes from $HOTSPOT_DIST" >&6; }
27088    BUILD_HOTSPOT=false
27089  fi
27090
27091  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27092
27093
27094###############################################################################
27095#
27096# Setup the toolchain (compilers etc), i.e. tools used to compile and process
27097# native code.
27098#
27099###############################################################################
27100
27101# First determine the toolchain type (compiler family)
27102
27103
27104# Check whether --with-toolchain-type was given.
27105if test "${with_toolchain_type+set}" = set; then :
27106  withval=$with_toolchain_type;
27107fi
27108
27109
27110  # Use indirect variable referencing
27111  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27112  VALID_TOOLCHAINS=${!toolchain_var_name}
27113
27114  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27115    if test -n "$XCODEBUILD"; then
27116      # On Mac OS X, default toolchain to clang after Xcode 5
27117      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27118      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27119      if test $? -ne 0; then
27120        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27121      fi
27122      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
27123          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
27124          $CUT -f 1 -d .`
27125      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
27126$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
27127      if test $XCODE_MAJOR_VERSION -ge 5; then
27128          DEFAULT_TOOLCHAIN="clang"
27129      else
27130          DEFAULT_TOOLCHAIN="gcc"
27131      fi
27132    else
27133      # If Xcode is not installed, but the command line tools are
27134      # then we can't run xcodebuild. On these systems we should
27135      # default to clang
27136      DEFAULT_TOOLCHAIN="clang"
27137    fi
27138  else
27139    # First toolchain type in the list is the default
27140    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27141  fi
27142
27143  if test "x$with_toolchain_type" = xlist; then
27144    # List all toolchains
27145    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27146$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27147    for toolchain in $VALID_TOOLCHAINS; do
27148      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27149      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27150      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27151    done
27152
27153    exit 0
27154  elif test "x$with_toolchain_type" != x; then
27155    # User override; check that it is valid
27156    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27157      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27158$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27159      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27160$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27161      as_fn_error $? "Cannot continue." "$LINENO" 5
27162    fi
27163    TOOLCHAIN_TYPE=$with_toolchain_type
27164  else
27165    # No flag given, use default
27166    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27167  fi
27168
27169
27170  TOOLCHAIN_CC_BINARY_clang="clang"
27171  TOOLCHAIN_CC_BINARY_gcc="gcc"
27172  TOOLCHAIN_CC_BINARY_microsoft="cl"
27173  TOOLCHAIN_CC_BINARY_solstudio="cc"
27174  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27175
27176  TOOLCHAIN_CXX_BINARY_clang="clang++"
27177  TOOLCHAIN_CXX_BINARY_gcc="g++"
27178  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27179  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27180  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27181
27182  # Use indirect variable referencing
27183  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27184  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27185  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27186  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27187  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27188  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27189
27190
27191  # Define filename patterns
27192  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27193    LIBRARY_PREFIX=
27194    SHARED_LIBRARY_SUFFIX='.dll'
27195    STATIC_LIBRARY_SUFFIX='.lib'
27196    SHARED_LIBRARY='$1.dll'
27197    STATIC_LIBRARY='$1.lib'
27198    OBJ_SUFFIX='.obj'
27199    EXE_SUFFIX='.exe'
27200  else
27201    LIBRARY_PREFIX=lib
27202    SHARED_LIBRARY_SUFFIX='.so'
27203    STATIC_LIBRARY_SUFFIX='.a'
27204    SHARED_LIBRARY='lib$1.so'
27205    STATIC_LIBRARY='lib$1.a'
27206    OBJ_SUFFIX='.o'
27207    EXE_SUFFIX=''
27208    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27209      SHARED_LIBRARY='lib$1.dylib'
27210      SHARED_LIBRARY_SUFFIX='.dylib'
27211    fi
27212  fi
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27224    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27225$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27226  else
27227    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27228$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27229  fi
27230
27231
27232# Then detect the actual binaries needed
27233
27234  # FIXME: Is this needed?
27235  ac_ext=cpp
27236ac_cpp='$CXXCPP $CPPFLAGS'
27237ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27238ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27239ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27240
27241
27242  # Store the CFLAGS etc passed to the configure script.
27243  ORG_CFLAGS="$CFLAGS"
27244  ORG_CXXFLAGS="$CXXFLAGS"
27245
27246  # autoconf magic only relies on PATH, so update it if tools dir is specified
27247  OLD_PATH="$PATH"
27248
27249  # On Windows, we need to detect the visual studio installation first.
27250  # This will change the PATH, but we need to keep that new PATH even
27251  # after toolchain detection is done, since the compiler (on x86) uses
27252  # it for DLL resolution in runtime.
27253  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27254      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27255
27256  # Store path to cygwin link.exe to help excluding it when searching for
27257  # VS linker. This must be done before changing the PATH when looking for VS.
27258  # Extract the first word of "link", so it can be a program name with args.
27259set dummy link; ac_word=$2
27260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27261$as_echo_n "checking for $ac_word... " >&6; }
27262if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27263  $as_echo_n "(cached) " >&6
27264else
27265  case $CYGWIN_LINK in
27266  [\\/]* | ?:[\\/]*)
27267  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27268  ;;
27269  *)
27270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27271for as_dir in $PATH
27272do
27273  IFS=$as_save_IFS
27274  test -z "$as_dir" && as_dir=.
27275    for ac_exec_ext in '' $ac_executable_extensions; do
27276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27277    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27279    break 2
27280  fi
27281done
27282  done
27283IFS=$as_save_IFS
27284
27285  ;;
27286esac
27287fi
27288CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27289if test -n "$CYGWIN_LINK"; then
27290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27291$as_echo "$CYGWIN_LINK" >&6; }
27292else
27293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27294$as_echo "no" >&6; }
27295fi
27296
27297
27298  if test "x$CYGWIN_LINK" != x; then
27299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27300$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27301    "$CYGWIN_LINK" --version > /dev/null
27302    if test $? -eq 0 ; then
27303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27304$as_echo "yes" >&6; }
27305    else
27306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27307$as_echo "no" >&6; }
27308      # This might be the VS linker. Don't exclude it later on.
27309      CYGWIN_LINK=""
27310    fi
27311  fi
27312
27313  # First-hand choice is to locate and run the vsvars bat file.
27314
27315
27316# Check whether --with-toolchain-version was given.
27317if test "${with_toolchain_version+set}" = set; then :
27318  withval=$with_toolchain_version;
27319fi
27320
27321
27322  if test "x$with_toolchain_version" = xlist; then
27323    # List all toolchains
27324    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27325$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27326    for version in $VALID_VS_VERSIONS; do
27327      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27328      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27329    done
27330
27331    exit 0
27332  elif test "x$DEVKIT_VS_VERSION" != x; then
27333    VS_VERSION=$DEVKIT_VS_VERSION
27334    TOOLCHAIN_VERSION=$VS_VERSION
27335    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27336    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27337    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27338    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27339    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27340    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27341
27342    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27343    # can still be exported as INCLUDE for compiler invocations without
27344    # SYSROOT_CFLAGS
27345    OLDIFS="$IFS"
27346    IFS=";"
27347    for i in $DEVKIT_VS_INCLUDE; do
27348      ipath=$i
27349
27350  unix_path="$ipath"
27351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27352    windows_path=`$CYGPATH -m "$unix_path"`
27353    ipath="$windows_path"
27354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27355    windows_path=`cmd //c echo $unix_path`
27356    ipath="$windows_path"
27357  fi
27358
27359      VS_INCLUDE="$VS_INCLUDE;$ipath"
27360    done
27361    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27362    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27363    for i in $DEVKIT_VS_LIB; do
27364      libpath=$i
27365
27366  unix_path="$libpath"
27367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27368    windows_path=`$CYGPATH -m "$unix_path"`
27369    libpath="$windows_path"
27370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27371    windows_path=`cmd //c echo $unix_path`
27372    libpath="$windows_path"
27373  fi
27374
27375      VS_LIB="$VS_LIB;$libpath"
27376    done
27377    IFS="$OLDIFS"
27378
27379    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27380$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27381
27382  elif test "x$with_toolchain_version" != x; then
27383    # User override; check that it is valid
27384    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27385      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27386$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27387      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27388$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27389      as_fn_error $? "Cannot continue." "$LINENO" 5
27390    fi
27391    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27392  else
27393    # No flag given, use default
27394    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27395  fi
27396
27397  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27398
27399  VS_VERSION="$VS_VERSION"
27400  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27401  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27402  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27403  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27404
27405  # When using --with-tools-dir, assume it points to the correct and default
27406  # version of Visual Studio or that --with-toolchain-version was also set.
27407  if test "x$with_tools_dir" != x; then
27408
27409  if test "x$VS_ENV_CMD" = x; then
27410    VS_VERSION="${VS_VERSION}"
27411    VS_BASE="$with_tools_dir/../.."
27412    METHOD="--with-tools-dir"
27413
27414    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27415      VCVARSFILE="vc/bin/vcvars32.bat"
27416    else
27417      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27418    fi
27419
27420
27421  windows_path="$VS_BASE"
27422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27423    unix_path=`$CYGPATH -u "$windows_path"`
27424    VS_BASE="$unix_path"
27425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27427    VS_BASE="$unix_path"
27428  fi
27429
27430    if test -d "$VS_BASE"; then
27431      if test -f "$VS_BASE/$VCVARSFILE"; then
27432        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27433$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27434        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27435        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27436        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27437        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27438      else
27439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27440$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27441        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27442$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27443      fi
27444    fi
27445  fi
27446
27447
27448  if test "x$VS_ENV_CMD" = x; then
27449    VS_VERSION="${VS_VERSION}"
27450    VS_BASE="$with_tools_dir/../../.."
27451    METHOD="--with-tools-dir"
27452
27453    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27454      VCVARSFILE="vc/bin/vcvars32.bat"
27455    else
27456      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27457    fi
27458
27459
27460  windows_path="$VS_BASE"
27461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27462    unix_path=`$CYGPATH -u "$windows_path"`
27463    VS_BASE="$unix_path"
27464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27466    VS_BASE="$unix_path"
27467  fi
27468
27469    if test -d "$VS_BASE"; then
27470      if test -f "$VS_BASE/$VCVARSFILE"; then
27471        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27472$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27473        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27474        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27475        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27476        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27477      else
27478        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27479$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27480        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27481$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27482      fi
27483    fi
27484  fi
27485
27486    if test "x$VS_ENV_CMD" = x; then
27487      # Having specified an argument which is incorrect will produce an instant failure;
27488      # we should not go on looking
27489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27490$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27491      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27492$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27493      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27494$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27495      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27496    fi
27497  fi
27498
27499  VS_ENV_CMD=""
27500  VS_ENV_ARGS=""
27501
27502  if test "x$VS_COMNTOOLS" != x; then
27503
27504  if test "x$VS_ENV_CMD" = x; then
27505    VS_VERSION="${VS_VERSION}"
27506    VS_BASE="$VS_COMNTOOLS/../.."
27507    METHOD="$VS_COMNTOOLS_VAR variable"
27508
27509    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27510      VCVARSFILE="vc/bin/vcvars32.bat"
27511    else
27512      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27513    fi
27514
27515
27516  windows_path="$VS_BASE"
27517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27518    unix_path=`$CYGPATH -u "$windows_path"`
27519    VS_BASE="$unix_path"
27520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27522    VS_BASE="$unix_path"
27523  fi
27524
27525    if test -d "$VS_BASE"; then
27526      if test -f "$VS_BASE/$VCVARSFILE"; then
27527        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27528$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27529        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27530        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27531        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27532        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27533      else
27534        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27535$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27536        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27537$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27538      fi
27539    fi
27540  fi
27541
27542  fi
27543  if test "x$PROGRAMFILES" != x; then
27544
27545  if test "x$VS_ENV_CMD" = x; then
27546    VS_VERSION="${VS_VERSION}"
27547    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27548    METHOD="well-known name"
27549
27550    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27551      VCVARSFILE="vc/bin/vcvars32.bat"
27552    else
27553      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27554    fi
27555
27556
27557  windows_path="$VS_BASE"
27558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27559    unix_path=`$CYGPATH -u "$windows_path"`
27560    VS_BASE="$unix_path"
27561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27563    VS_BASE="$unix_path"
27564  fi
27565
27566    if test -d "$VS_BASE"; then
27567      if test -f "$VS_BASE/$VCVARSFILE"; then
27568        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27569$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27570        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27571        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27572        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27573        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27574      else
27575        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27576$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27577        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27578$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27579      fi
27580    fi
27581  fi
27582
27583  fi
27584  # Work around the insanely named ProgramFiles(x86) env variable
27585  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27586  if test "x$PROGRAMFILES_X86" != x; then
27587
27588  if test "x$VS_ENV_CMD" = x; then
27589    VS_VERSION="${VS_VERSION}"
27590    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27591    METHOD="well-known name"
27592
27593    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27594      VCVARSFILE="vc/bin/vcvars32.bat"
27595    else
27596      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27597    fi
27598
27599
27600  windows_path="$VS_BASE"
27601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27602    unix_path=`$CYGPATH -u "$windows_path"`
27603    VS_BASE="$unix_path"
27604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27606    VS_BASE="$unix_path"
27607  fi
27608
27609    if test -d "$VS_BASE"; then
27610      if test -f "$VS_BASE/$VCVARSFILE"; then
27611        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27612$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27613        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27614        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27615        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27616        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27617      else
27618        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27619$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27620        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27621$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27622      fi
27623    fi
27624  fi
27625
27626  fi
27627
27628  if test "x$VS_ENV_CMD" = x; then
27629    VS_VERSION="${VS_VERSION}"
27630    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27631    METHOD="well-known name"
27632
27633    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27634      VCVARSFILE="vc/bin/vcvars32.bat"
27635    else
27636      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27637    fi
27638
27639
27640  windows_path="$VS_BASE"
27641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27642    unix_path=`$CYGPATH -u "$windows_path"`
27643    VS_BASE="$unix_path"
27644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27646    VS_BASE="$unix_path"
27647  fi
27648
27649    if test -d "$VS_BASE"; then
27650      if test -f "$VS_BASE/$VCVARSFILE"; then
27651        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27652$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27653        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27654        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27655        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27656        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27657      else
27658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27659$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27660        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27661$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27662      fi
27663    fi
27664  fi
27665
27666
27667  if test "x$VS_ENV_CMD" = x; then
27668    VS_VERSION="${VS_VERSION}"
27669    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27670    METHOD="well-known name"
27671
27672    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27673      VCVARSFILE="vc/bin/vcvars32.bat"
27674    else
27675      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27676    fi
27677
27678
27679  windows_path="$VS_BASE"
27680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27681    unix_path=`$CYGPATH -u "$windows_path"`
27682    VS_BASE="$unix_path"
27683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27685    VS_BASE="$unix_path"
27686  fi
27687
27688    if test -d "$VS_BASE"; then
27689      if test -f "$VS_BASE/$VCVARSFILE"; then
27690        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27691$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27692        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27693        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27694        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27695        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27696      else
27697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27698$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27699        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27700$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27701      fi
27702    fi
27703  fi
27704
27705
27706  if test "x$SDK_INSTALL_DIR" != x; then
27707    if test "x$ProgramW6432" != x; then
27708
27709  if test "x$VS_ENV_CMD" = x; then
27710    VS_VERSION="${VS_VERSION}"
27711    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27712    METHOD="well-known name"
27713
27714  windows_path="$WIN_SDK_BASE"
27715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27716    unix_path=`$CYGPATH -u "$windows_path"`
27717    WIN_SDK_BASE="$unix_path"
27718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27720    WIN_SDK_BASE="$unix_path"
27721  fi
27722
27723    if test -d "$WIN_SDK_BASE"; then
27724      # There have been cases of partial or broken SDK installations. A missing
27725      # lib dir is not going to work.
27726      if test ! -d "$WIN_SDK_BASE/lib"; then
27727        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27728$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27729        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27730$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27731      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27733$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27734        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27735        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27736          VS_ENV_ARGS="/x86"
27737        else
27738          VS_ENV_ARGS="/x64"
27739        fi
27740        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27741        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27742        # TODO: improve detection for other versions of SDK
27743        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27744      else
27745        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27746$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27747        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27748$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27749      fi
27750    fi
27751  fi
27752
27753    fi
27754    if test "x$PROGRAMW6432" != x; then
27755
27756  if test "x$VS_ENV_CMD" = x; then
27757    VS_VERSION="${VS_VERSION}"
27758    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27759    METHOD="well-known name"
27760
27761  windows_path="$WIN_SDK_BASE"
27762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27763    unix_path=`$CYGPATH -u "$windows_path"`
27764    WIN_SDK_BASE="$unix_path"
27765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27767    WIN_SDK_BASE="$unix_path"
27768  fi
27769
27770    if test -d "$WIN_SDK_BASE"; then
27771      # There have been cases of partial or broken SDK installations. A missing
27772      # lib dir is not going to work.
27773      if test ! -d "$WIN_SDK_BASE/lib"; then
27774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27775$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27777$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27778      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27779        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27780$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27781        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27782        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27783          VS_ENV_ARGS="/x86"
27784        else
27785          VS_ENV_ARGS="/x64"
27786        fi
27787        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27788        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27789        # TODO: improve detection for other versions of SDK
27790        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27791      else
27792        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27793$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27794        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27795$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27796      fi
27797    fi
27798  fi
27799
27800    fi
27801    if test "x$PROGRAMFILES" != x; then
27802
27803  if test "x$VS_ENV_CMD" = x; then
27804    VS_VERSION="${VS_VERSION}"
27805    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27806    METHOD="well-known name"
27807
27808  windows_path="$WIN_SDK_BASE"
27809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27810    unix_path=`$CYGPATH -u "$windows_path"`
27811    WIN_SDK_BASE="$unix_path"
27812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27814    WIN_SDK_BASE="$unix_path"
27815  fi
27816
27817    if test -d "$WIN_SDK_BASE"; then
27818      # There have been cases of partial or broken SDK installations. A missing
27819      # lib dir is not going to work.
27820      if test ! -d "$WIN_SDK_BASE/lib"; then
27821        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27822$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27823        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27824$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27825      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27826        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27827$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27828        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27829        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27830          VS_ENV_ARGS="/x86"
27831        else
27832          VS_ENV_ARGS="/x64"
27833        fi
27834        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27835        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27836        # TODO: improve detection for other versions of SDK
27837        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27838      else
27839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27840$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27841        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27842$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27843      fi
27844    fi
27845  fi
27846
27847    fi
27848
27849  if test "x$VS_ENV_CMD" = x; then
27850    VS_VERSION="${VS_VERSION}"
27851    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27852    METHOD="well-known name"
27853
27854  windows_path="$WIN_SDK_BASE"
27855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27856    unix_path=`$CYGPATH -u "$windows_path"`
27857    WIN_SDK_BASE="$unix_path"
27858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27860    WIN_SDK_BASE="$unix_path"
27861  fi
27862
27863    if test -d "$WIN_SDK_BASE"; then
27864      # There have been cases of partial or broken SDK installations. A missing
27865      # lib dir is not going to work.
27866      if test ! -d "$WIN_SDK_BASE/lib"; then
27867        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27868$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27869        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27870$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27871      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27872        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27873$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27874        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27875        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27876          VS_ENV_ARGS="/x86"
27877        else
27878          VS_ENV_ARGS="/x64"
27879        fi
27880        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27881        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27882        # TODO: improve detection for other versions of SDK
27883        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27884      else
27885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27886$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27888$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27889      fi
27890    fi
27891  fi
27892
27893
27894  if test "x$VS_ENV_CMD" = x; then
27895    VS_VERSION="${VS_VERSION}"
27896    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27897    METHOD="well-known name"
27898
27899  windows_path="$WIN_SDK_BASE"
27900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27901    unix_path=`$CYGPATH -u "$windows_path"`
27902    WIN_SDK_BASE="$unix_path"
27903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27905    WIN_SDK_BASE="$unix_path"
27906  fi
27907
27908    if test -d "$WIN_SDK_BASE"; then
27909      # There have been cases of partial or broken SDK installations. A missing
27910      # lib dir is not going to work.
27911      if test ! -d "$WIN_SDK_BASE/lib"; then
27912        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27913$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27914        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27915$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27916      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27917        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27918$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27919        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27920        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27921          VS_ENV_ARGS="/x86"
27922        else
27923          VS_ENV_ARGS="/x64"
27924        fi
27925        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27926        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27927        # TODO: improve detection for other versions of SDK
27928        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27929      else
27930        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27931$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27932        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27933$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27934      fi
27935    fi
27936  fi
27937
27938  fi
27939
27940    if test "x$VS_ENV_CMD" != x; then
27941      TOOLCHAIN_VERSION=$VS_VERSION
27942      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27943      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27944      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27945      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27946      # The rest of the variables are already evaled while probing
27947      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27948$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27949      break
27950    fi
27951  done
27952
27953
27954  # If we have a devkit, skip all of the below.
27955  if test "x$DEVKIT_VS_VERSION" = x; then
27956    if test "x$VS_ENV_CMD" != x; then
27957      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27958
27959  # Only process if variable expands to non-empty
27960
27961  if test "x$VS_ENV_CMD" != x; then
27962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27963
27964  # First separate the path from the arguments. This will split at the first
27965  # space.
27966  complete="$VS_ENV_CMD"
27967  path="${complete%% *}"
27968  tmp="$complete EOL"
27969  arguments="${tmp#* }"
27970
27971  # Input might be given as Windows format, start by converting to
27972  # unix format.
27973  new_path=`$CYGPATH -u "$path"`
27974
27975  # Now try to locate executable using which
27976  new_path=`$WHICH "$new_path" 2> /dev/null`
27977  # bat and cmd files are not always considered executable in cygwin causing which
27978  # to not find them
27979  if test "x$new_path" = x \
27980      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27981      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27982    new_path=`$CYGPATH -u "$path"`
27983  fi
27984  if test "x$new_path" = x; then
27985    # Oops. Which didn't find the executable.
27986    # The splitting of arguments from the executable at a space might have been incorrect,
27987    # since paths with space are more likely in Windows. Give it another try with the whole
27988    # argument.
27989    path="$complete"
27990    arguments="EOL"
27991    new_path=`$CYGPATH -u "$path"`
27992    new_path=`$WHICH "$new_path" 2> /dev/null`
27993    # bat and cmd files are not always considered executable in cygwin causing which
27994    # to not find them
27995    if test "x$new_path" = x \
27996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27998      new_path=`$CYGPATH -u "$path"`
27999    fi
28000    if test "x$new_path" = x; then
28001      # It's still not found. Now this is an unrecoverable error.
28002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28003$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28004      has_space=`$ECHO "$complete" | $GREP " "`
28005      if test "x$has_space" != x; then
28006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28008      fi
28009      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28010    fi
28011  fi
28012
28013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28016  # "foo.exe" is OK but "foo" is an error.
28017  #
28018  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28019  # It is also a way to make sure we got the proper file name for the real test later on.
28020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28021  if test "x$test_shortpath" = x; then
28022    # Short path failed, file does not exist as specified.
28023    # Try adding .exe or .cmd
28024    if test -f "${new_path}.exe"; then
28025      input_to_shortpath="${new_path}.exe"
28026    elif test -f "${new_path}.cmd"; then
28027      input_to_shortpath="${new_path}.cmd"
28028    else
28029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
28030$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
28031      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28032$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28033      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28034    fi
28035  else
28036    input_to_shortpath="$new_path"
28037  fi
28038
28039  # Call helper function which possibly converts this using DOS-style short mode.
28040  # If so, the updated path is stored in $new_path.
28041  new_path="$input_to_shortpath"
28042
28043  input_path="$input_to_shortpath"
28044  # Check if we need to convert this using DOS-style short mode. If the path
28045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28046  # take no chances and rewrite it.
28047  # Note: m4 eats our [], so we need to use [ and ] instead.
28048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28049  if test "x$has_forbidden_chars" != x; then
28050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28054      # Going to short mode and back again did indeed matter. Since short mode is
28055      # case insensitive, let's make it lowercase to improve readability.
28056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28057      # Now convert it back to Unix-style (cygpath)
28058      input_path=`$CYGPATH -u "$shortmode_path"`
28059      new_path="$input_path"
28060    fi
28061  fi
28062
28063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28064  if test "x$test_cygdrive_prefix" = x; then
28065    # As a simple fix, exclude /usr/bin since it's not a real path.
28066    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28068      # a path prefixed by /cygdrive for fixpath to work.
28069      new_path="$CYGWIN_ROOT_PATH$input_path"
28070    fi
28071  fi
28072
28073  # remove trailing .exe if any
28074  new_path="${new_path/%.exe/}"
28075
28076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28077
28078  # First separate the path from the arguments. This will split at the first
28079  # space.
28080  complete="$VS_ENV_CMD"
28081  path="${complete%% *}"
28082  tmp="$complete EOL"
28083  arguments="${tmp#* }"
28084
28085  # Input might be given as Windows format, start by converting to
28086  # unix format.
28087  new_path="$path"
28088
28089  windows_path="$new_path"
28090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28091    unix_path=`$CYGPATH -u "$windows_path"`
28092    new_path="$unix_path"
28093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28095    new_path="$unix_path"
28096  fi
28097
28098
28099  # Now try to locate executable using which
28100  new_path=`$WHICH "$new_path" 2> /dev/null`
28101
28102  if test "x$new_path" = x; then
28103    # Oops. Which didn't find the executable.
28104    # The splitting of arguments from the executable at a space might have been incorrect,
28105    # since paths with space are more likely in Windows. Give it another try with the whole
28106    # argument.
28107    path="$complete"
28108    arguments="EOL"
28109    new_path="$path"
28110
28111  windows_path="$new_path"
28112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28113    unix_path=`$CYGPATH -u "$windows_path"`
28114    new_path="$unix_path"
28115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28117    new_path="$unix_path"
28118  fi
28119
28120
28121    new_path=`$WHICH "$new_path" 2> /dev/null`
28122    # bat and cmd files are not always considered executable in MSYS causing which
28123    # to not find them
28124    if test "x$new_path" = x \
28125        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28126        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28127      new_path="$path"
28128
28129  windows_path="$new_path"
28130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28131    unix_path=`$CYGPATH -u "$windows_path"`
28132    new_path="$unix_path"
28133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28135    new_path="$unix_path"
28136  fi
28137
28138    fi
28139
28140    if test "x$new_path" = x; then
28141      # It's still not found. Now this is an unrecoverable error.
28142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28143$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28144      has_space=`$ECHO "$complete" | $GREP " "`
28145      if test "x$has_space" != x; then
28146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28148      fi
28149      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28150    fi
28151  fi
28152
28153  # Now new_path has a complete unix path to the binary
28154  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28155    # Keep paths in /bin as-is, but remove trailing .exe if any
28156    new_path="${new_path/%.exe/}"
28157    # Do not save /bin paths to all_fixpath_prefixes!
28158  else
28159    # Not in mixed or Windows style, start by that.
28160    new_path=`cmd //c echo $new_path`
28161
28162  input_path="$new_path"
28163  # Check if we need to convert this using DOS-style short mode. If the path
28164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28165  # take no chances and rewrite it.
28166  # Note: m4 eats our [], so we need to use [ and ] instead.
28167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28168  if test "x$has_forbidden_chars" != x; then
28169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28171  fi
28172
28173    # Output is in $new_path
28174
28175  windows_path="$new_path"
28176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28177    unix_path=`$CYGPATH -u "$windows_path"`
28178    new_path="$unix_path"
28179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28181    new_path="$unix_path"
28182  fi
28183
28184    # remove trailing .exe if any
28185    new_path="${new_path/%.exe/}"
28186
28187    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28188    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28189  fi
28190
28191    else
28192      # We're on a unix platform. Hooray! :)
28193      # First separate the path from the arguments. This will split at the first
28194      # space.
28195      complete="$VS_ENV_CMD"
28196      path="${complete%% *}"
28197      tmp="$complete EOL"
28198      arguments="${tmp#* }"
28199
28200      # Cannot rely on the command "which" here since it doesn't always work.
28201      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28202      if test -z "$is_absolute_path"; then
28203        # Path to executable is not absolute. Find it.
28204        IFS_save="$IFS"
28205        IFS=:
28206        for p in $PATH; do
28207          if test -f "$p/$path" && test -x "$p/$path"; then
28208            new_path="$p/$path"
28209            break
28210          fi
28211        done
28212        IFS="$IFS_save"
28213      else
28214        # This is an absolute path, we can use it without further modifications.
28215        new_path="$path"
28216      fi
28217
28218      if test "x$new_path" = x; then
28219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28220$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28221        has_space=`$ECHO "$complete" | $GREP " "`
28222        if test "x$has_space" != x; then
28223          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28225        fi
28226        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28227      fi
28228    fi
28229
28230    # Now join together the path and the arguments once again
28231    if test "x$arguments" != xEOL; then
28232      new_complete="$new_path ${arguments% *}"
28233    else
28234      new_complete="$new_path"
28235    fi
28236
28237    if test "x$complete" != "x$new_complete"; then
28238      VS_ENV_CMD="$new_complete"
28239      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28240$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28241    fi
28242  fi
28243
28244
28245      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28246      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28247$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28248
28249      # We need to create a couple of temporary files.
28250      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28251      $MKDIR -p $VS_ENV_TMP_DIR
28252
28253      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28254      # Instead create a shell script which will set the relevant variables when run.
28255      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28256
28257  unix_path="$WINPATH_VS_ENV_CMD"
28258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28259    windows_path=`$CYGPATH -m "$unix_path"`
28260    WINPATH_VS_ENV_CMD="$windows_path"
28261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28262    windows_path=`cmd //c echo $unix_path`
28263    WINPATH_VS_ENV_CMD="$windows_path"
28264  fi
28265
28266      WINPATH_BASH="$BASH"
28267
28268  unix_path="$WINPATH_BASH"
28269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28270    windows_path=`$CYGPATH -m "$unix_path"`
28271    WINPATH_BASH="$windows_path"
28272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28273    windows_path=`cmd //c echo $unix_path`
28274    WINPATH_BASH="$windows_path"
28275  fi
28276
28277
28278      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28279      # script (executable by bash) that will setup the important variables.
28280      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28281      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28282      # This will end up something like:
28283      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28284      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28285      # These will end up something like:
28286      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28287      # The trailing space for everyone except PATH is no typo, but is needed due
28288      # to trailing \ in the Windows paths. These will be stripped later.
28289      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28290          >> $EXTRACT_VC_ENV_BAT_FILE
28291      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28292          >> $EXTRACT_VC_ENV_BAT_FILE
28293      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28294          >> $EXTRACT_VC_ENV_BAT_FILE
28295      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28296          >> $EXTRACT_VC_ENV_BAT_FILE
28297      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28298          >> $EXTRACT_VC_ENV_BAT_FILE
28299      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28300          >> $EXTRACT_VC_ENV_BAT_FILE
28301
28302      # Now execute the newly created bat file.
28303      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28304      # Change directory so we don't need to mess with Windows paths in redirects.
28305      cd $VS_ENV_TMP_DIR
28306      cmd /c extract-vs-env.bat | $CAT
28307      cd $CURDIR
28308
28309      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28310        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28311$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28312        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28313$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28314        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28315$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28316        as_fn_error $? "Cannot continue" "$LINENO" 5
28317      fi
28318
28319      # Now set all paths and other env variables. This will allow the rest of
28320      # the configure script to find and run the compiler in the proper way.
28321      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28322$as_echo "$as_me: Setting extracted environment variables" >&6;}
28323      . $VS_ENV_TMP_DIR/set-vs-env.sh
28324      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28325      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28326    else
28327      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28328      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28329$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28330    fi
28331  fi
28332
28333  # At this point, we should have correct variables in the environment, or we can't continue.
28334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28335$as_echo_n "checking for Visual Studio variables... " >&6; }
28336
28337  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28338      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28339    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28341$as_echo "present but broken" >&6; }
28342      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28343    else
28344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28345$as_echo "ok" >&6; }
28346      # Remove any trailing "\" ";" and " " from the variables.
28347      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28348      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28349      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28350      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28351      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28352      # Remove any paths containing # (typically F#) as that messes up make. This
28353      # is needed if visual studio was installed with F# support.
28354      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28355
28356
28357
28358
28359
28360      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28361      OLDIFS="$IFS"
28362      IFS=";"
28363      for i in $VS_INCLUDE; do
28364        ipath=$i
28365        # Only process non-empty elements
28366        if test "x$ipath" != x; then
28367          IFS="$OLDIFS"
28368          # Check that directory exists before calling fixup_path
28369          testpath=$ipath
28370
28371  windows_path="$testpath"
28372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28373    unix_path=`$CYGPATH -u "$windows_path"`
28374    testpath="$unix_path"
28375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28377    testpath="$unix_path"
28378  fi
28379
28380          if test -d "$testpath"; then
28381
28382  # Only process if variable expands to non-empty
28383
28384  if test "x$ipath" != x; then
28385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28386
28387  # Input might be given as Windows format, start by converting to
28388  # unix format.
28389  path="$ipath"
28390  new_path=`$CYGPATH -u "$path"`
28391
28392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28395  # "foo.exe" is OK but "foo" is an error.
28396  #
28397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28398  # It is also a way to make sure we got the proper file name for the real test later on.
28399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28400  if test "x$test_shortpath" = x; then
28401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28402$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28403    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28404  fi
28405
28406  # Call helper function which possibly converts this using DOS-style short mode.
28407  # If so, the updated path is stored in $new_path.
28408
28409  input_path="$new_path"
28410  # Check if we need to convert this using DOS-style short mode. If the path
28411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28412  # take no chances and rewrite it.
28413  # Note: m4 eats our [], so we need to use [ and ] instead.
28414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28415  if test "x$has_forbidden_chars" != x; then
28416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28420      # Going to short mode and back again did indeed matter. Since short mode is
28421      # case insensitive, let's make it lowercase to improve readability.
28422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28423      # Now convert it back to Unix-style (cygpath)
28424      input_path=`$CYGPATH -u "$shortmode_path"`
28425      new_path="$input_path"
28426    fi
28427  fi
28428
28429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28430  if test "x$test_cygdrive_prefix" = x; then
28431    # As a simple fix, exclude /usr/bin since it's not a real path.
28432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28434      # a path prefixed by /cygdrive for fixpath to work.
28435      new_path="$CYGWIN_ROOT_PATH$input_path"
28436    fi
28437  fi
28438
28439
28440  if test "x$path" != "x$new_path"; then
28441    ipath="$new_path"
28442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28443$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28444  fi
28445
28446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28447
28448  path="$ipath"
28449  has_colon=`$ECHO $path | $GREP ^.:`
28450  new_path="$path"
28451  if test "x$has_colon" = x; then
28452    # Not in mixed or Windows style, start by that.
28453    new_path=`cmd //c echo $path`
28454  fi
28455
28456
28457  input_path="$new_path"
28458  # Check if we need to convert this using DOS-style short mode. If the path
28459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28460  # take no chances and rewrite it.
28461  # Note: m4 eats our [], so we need to use [ and ] instead.
28462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28463  if test "x$has_forbidden_chars" != x; then
28464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28466  fi
28467
28468
28469  windows_path="$new_path"
28470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28471    unix_path=`$CYGPATH -u "$windows_path"`
28472    new_path="$unix_path"
28473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28475    new_path="$unix_path"
28476  fi
28477
28478  if test "x$path" != "x$new_path"; then
28479    ipath="$new_path"
28480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28481$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28482  fi
28483
28484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28486
28487    else
28488      # We're on a unix platform. Hooray! :)
28489      path="$ipath"
28490      has_space=`$ECHO "$path" | $GREP " "`
28491      if test "x$has_space" != x; then
28492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28493$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28495      fi
28496
28497      # Use eval to expand a potential ~
28498      eval path="$path"
28499      if test ! -f "$path" && test ! -d "$path"; then
28500        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28501      fi
28502
28503      ipath="`cd "$path"; $THEPWDCMD -L`"
28504    fi
28505  fi
28506
28507            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28508          fi
28509          IFS=";"
28510        fi
28511      done
28512      # Convert VS_LIB into SYSROOT_LDFLAGS
28513      for i in $VS_LIB; do
28514        libpath=$i
28515        # Only process non-empty elements
28516        if test "x$libpath" != x; then
28517          IFS="$OLDIFS"
28518          # Check that directory exists before calling fixup_path
28519          testpath=$libpath
28520
28521  windows_path="$testpath"
28522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28523    unix_path=`$CYGPATH -u "$windows_path"`
28524    testpath="$unix_path"
28525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28527    testpath="$unix_path"
28528  fi
28529
28530          if test -d "$testpath"; then
28531
28532  # Only process if variable expands to non-empty
28533
28534  if test "x$libpath" != x; then
28535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28536
28537  # Input might be given as Windows format, start by converting to
28538  # unix format.
28539  path="$libpath"
28540  new_path=`$CYGPATH -u "$path"`
28541
28542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28545  # "foo.exe" is OK but "foo" is an error.
28546  #
28547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28548  # It is also a way to make sure we got the proper file name for the real test later on.
28549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28550  if test "x$test_shortpath" = x; then
28551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28552$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28553    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28554  fi
28555
28556  # Call helper function which possibly converts this using DOS-style short mode.
28557  # If so, the updated path is stored in $new_path.
28558
28559  input_path="$new_path"
28560  # Check if we need to convert this using DOS-style short mode. If the path
28561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28562  # take no chances and rewrite it.
28563  # Note: m4 eats our [], so we need to use [ and ] instead.
28564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28565  if test "x$has_forbidden_chars" != x; then
28566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28570      # Going to short mode and back again did indeed matter. Since short mode is
28571      # case insensitive, let's make it lowercase to improve readability.
28572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28573      # Now convert it back to Unix-style (cygpath)
28574      input_path=`$CYGPATH -u "$shortmode_path"`
28575      new_path="$input_path"
28576    fi
28577  fi
28578
28579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28580  if test "x$test_cygdrive_prefix" = x; then
28581    # As a simple fix, exclude /usr/bin since it's not a real path.
28582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28584      # a path prefixed by /cygdrive for fixpath to work.
28585      new_path="$CYGWIN_ROOT_PATH$input_path"
28586    fi
28587  fi
28588
28589
28590  if test "x$path" != "x$new_path"; then
28591    libpath="$new_path"
28592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28593$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28594  fi
28595
28596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28597
28598  path="$libpath"
28599  has_colon=`$ECHO $path | $GREP ^.:`
28600  new_path="$path"
28601  if test "x$has_colon" = x; then
28602    # Not in mixed or Windows style, start by that.
28603    new_path=`cmd //c echo $path`
28604  fi
28605
28606
28607  input_path="$new_path"
28608  # Check if we need to convert this using DOS-style short mode. If the path
28609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28610  # take no chances and rewrite it.
28611  # Note: m4 eats our [], so we need to use [ and ] instead.
28612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28613  if test "x$has_forbidden_chars" != x; then
28614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28616  fi
28617
28618
28619  windows_path="$new_path"
28620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28621    unix_path=`$CYGPATH -u "$windows_path"`
28622    new_path="$unix_path"
28623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28625    new_path="$unix_path"
28626  fi
28627
28628  if test "x$path" != "x$new_path"; then
28629    libpath="$new_path"
28630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28631$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28632  fi
28633
28634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28636
28637    else
28638      # We're on a unix platform. Hooray! :)
28639      path="$libpath"
28640      has_space=`$ECHO "$path" | $GREP " "`
28641      if test "x$has_space" != x; then
28642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28643$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28645      fi
28646
28647      # Use eval to expand a potential ~
28648      eval path="$path"
28649      if test ! -f "$path" && test ! -d "$path"; then
28650        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28651      fi
28652
28653      libpath="`cd "$path"; $THEPWDCMD -L`"
28654    fi
28655  fi
28656
28657            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28658          fi
28659          IFS=";"
28660        fi
28661      done
28662      IFS="$OLDIFS"
28663    fi
28664  else
28665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28666$as_echo "not found" >&6; }
28667
28668    if test "x$VS_ENV_CMD" = x; then
28669      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28670$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28671      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28672$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28673    else
28674      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28675$as_echo "$as_me: Running the extraction script failed." >&6;}
28676    fi
28677    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28678$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28679    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28680$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28681    as_fn_error $? "Cannot continue" "$LINENO" 5
28682  fi
28683
28684    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28685    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28686    PATH="$VS_PATH"
28687    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28688    export INCLUDE="$VS_INCLUDE"
28689    export LIB="$VS_LIB"
28690  fi
28691
28692  # For solaris we really need solaris tools, and not the GNU equivalent.
28693  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28694  # so add that to path before starting to probe.
28695  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28696  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28697    PATH="/usr/ccs/bin:$PATH"
28698  fi
28699
28700  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28701  # override all other locations.
28702  if test "x$TOOLCHAIN_PATH" != x; then
28703    PATH=$TOOLCHAIN_PATH:$PATH
28704  fi
28705
28706
28707  #
28708  # Setup the compilers (CC and CXX)
28709  #
28710
28711  COMPILER_NAME=C
28712  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28713
28714  if test "x$CC" != x; then
28715    # User has supplied compiler name already, always let that override.
28716    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28717$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28718    if test "x`basename $CC`" = "x$CC"; then
28719      # A command without a complete path is provided, search $PATH.
28720
28721      for ac_prog in $CC
28722do
28723  # Extract the first word of "$ac_prog", so it can be a program name with args.
28724set dummy $ac_prog; ac_word=$2
28725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28726$as_echo_n "checking for $ac_word... " >&6; }
28727if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28728  $as_echo_n "(cached) " >&6
28729else
28730  case $POTENTIAL_CC in
28731  [\\/]* | ?:[\\/]*)
28732  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28733  ;;
28734  *)
28735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28736for as_dir in $PATH
28737do
28738  IFS=$as_save_IFS
28739  test -z "$as_dir" && as_dir=.
28740    for ac_exec_ext in '' $ac_executable_extensions; do
28741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28742    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28744    break 2
28745  fi
28746done
28747  done
28748IFS=$as_save_IFS
28749
28750  ;;
28751esac
28752fi
28753POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28754if test -n "$POTENTIAL_CC"; then
28755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28756$as_echo "$POTENTIAL_CC" >&6; }
28757else
28758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28759$as_echo "no" >&6; }
28760fi
28761
28762
28763  test -n "$POTENTIAL_CC" && break
28764done
28765
28766      if test "x$POTENTIAL_CC" != x; then
28767        CC=$POTENTIAL_CC
28768      else
28769        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28770      fi
28771    else
28772      # Otherwise it might already be a complete path
28773      if test ! -x "$CC"; then
28774        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28775      fi
28776    fi
28777  else
28778    # No user supplied value. Locate compiler ourselves.
28779
28780    # If we are cross compiling, assume cross compilation tools follows the
28781    # cross compilation standard where they are prefixed with the autoconf
28782    # standard name for the target. For example the binary
28783    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28784    # If we are not cross compiling, then the default compiler name will be
28785    # used.
28786
28787    CC=
28788    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28789    # before checking the rest of the PATH.
28790    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28791    # step, this should not be necessary.
28792    if test -n "$TOOLCHAIN_PATH"; then
28793      PATH_save="$PATH"
28794      PATH="$TOOLCHAIN_PATH"
28795      for ac_prog in $SEARCH_LIST
28796do
28797  # Extract the first word of "$ac_prog", so it can be a program name with args.
28798set dummy $ac_prog; ac_word=$2
28799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28800$as_echo_n "checking for $ac_word... " >&6; }
28801if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28802  $as_echo_n "(cached) " >&6
28803else
28804  case $TOOLCHAIN_PATH_CC in
28805  [\\/]* | ?:[\\/]*)
28806  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28807  ;;
28808  *)
28809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28810for as_dir in $PATH
28811do
28812  IFS=$as_save_IFS
28813  test -z "$as_dir" && as_dir=.
28814    for ac_exec_ext in '' $ac_executable_extensions; do
28815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28816    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28818    break 2
28819  fi
28820done
28821  done
28822IFS=$as_save_IFS
28823
28824  ;;
28825esac
28826fi
28827TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28828if test -n "$TOOLCHAIN_PATH_CC"; then
28829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28830$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28831else
28832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28833$as_echo "no" >&6; }
28834fi
28835
28836
28837  test -n "$TOOLCHAIN_PATH_CC" && break
28838done
28839
28840      CC=$TOOLCHAIN_PATH_CC
28841      PATH="$PATH_save"
28842    fi
28843
28844    # AC_PATH_PROGS can't be run multiple times with the same variable,
28845    # so create a new name for this run.
28846    if test "x$CC" = x; then
28847      for ac_prog in $SEARCH_LIST
28848do
28849  # Extract the first word of "$ac_prog", so it can be a program name with args.
28850set dummy $ac_prog; ac_word=$2
28851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28852$as_echo_n "checking for $ac_word... " >&6; }
28853if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28854  $as_echo_n "(cached) " >&6
28855else
28856  case $POTENTIAL_CC in
28857  [\\/]* | ?:[\\/]*)
28858  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28859  ;;
28860  *)
28861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28862for as_dir in $PATH
28863do
28864  IFS=$as_save_IFS
28865  test -z "$as_dir" && as_dir=.
28866    for ac_exec_ext in '' $ac_executable_extensions; do
28867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28868    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28870    break 2
28871  fi
28872done
28873  done
28874IFS=$as_save_IFS
28875
28876  ;;
28877esac
28878fi
28879POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28880if test -n "$POTENTIAL_CC"; then
28881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28882$as_echo "$POTENTIAL_CC" >&6; }
28883else
28884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28885$as_echo "no" >&6; }
28886fi
28887
28888
28889  test -n "$POTENTIAL_CC" && break
28890done
28891
28892      CC=$POTENTIAL_CC
28893    fi
28894
28895    if test "x$CC" = x; then
28896
28897  # Print a helpful message on how to acquire the necessary build dependency.
28898  # devkit is the help tag: freetype, cups, pulse, alsa etc
28899  MISSING_DEPENDENCY=devkit
28900
28901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28902    cygwin_help $MISSING_DEPENDENCY
28903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28904    msys_help $MISSING_DEPENDENCY
28905  else
28906    PKGHANDLER_COMMAND=
28907
28908    case $PKGHANDLER in
28909      apt-get)
28910        apt_help     $MISSING_DEPENDENCY ;;
28911      yum)
28912        yum_help     $MISSING_DEPENDENCY ;;
28913      port)
28914        port_help    $MISSING_DEPENDENCY ;;
28915      pkgutil)
28916        pkgutil_help $MISSING_DEPENDENCY ;;
28917      pkgadd)
28918        pkgadd_help  $MISSING_DEPENDENCY ;;
28919    esac
28920
28921    if test "x$PKGHANDLER_COMMAND" != x; then
28922      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28923    fi
28924  fi
28925
28926      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28927    fi
28928  fi
28929
28930  # Now we have a compiler binary in CC. Make sure it's okay.
28931
28932  # Only process if variable expands to non-empty
28933
28934  if test "x$CC" != x; then
28935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28936
28937  # First separate the path from the arguments. This will split at the first
28938  # space.
28939  complete="$CC"
28940  path="${complete%% *}"
28941  tmp="$complete EOL"
28942  arguments="${tmp#* }"
28943
28944  # Input might be given as Windows format, start by converting to
28945  # unix format.
28946  new_path=`$CYGPATH -u "$path"`
28947
28948  # Now try to locate executable using which
28949  new_path=`$WHICH "$new_path" 2> /dev/null`
28950  # bat and cmd files are not always considered executable in cygwin causing which
28951  # to not find them
28952  if test "x$new_path" = x \
28953      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28954      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28955    new_path=`$CYGPATH -u "$path"`
28956  fi
28957  if test "x$new_path" = x; then
28958    # Oops. Which didn't find the executable.
28959    # The splitting of arguments from the executable at a space might have been incorrect,
28960    # since paths with space are more likely in Windows. Give it another try with the whole
28961    # argument.
28962    path="$complete"
28963    arguments="EOL"
28964    new_path=`$CYGPATH -u "$path"`
28965    new_path=`$WHICH "$new_path" 2> /dev/null`
28966    # bat and cmd files are not always considered executable in cygwin causing which
28967    # to not find them
28968    if test "x$new_path" = x \
28969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28971      new_path=`$CYGPATH -u "$path"`
28972    fi
28973    if test "x$new_path" = x; then
28974      # It's still not found. Now this is an unrecoverable error.
28975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28976$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28977      has_space=`$ECHO "$complete" | $GREP " "`
28978      if test "x$has_space" != x; then
28979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28981      fi
28982      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28983    fi
28984  fi
28985
28986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28989  # "foo.exe" is OK but "foo" is an error.
28990  #
28991  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28992  # It is also a way to make sure we got the proper file name for the real test later on.
28993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28994  if test "x$test_shortpath" = x; then
28995    # Short path failed, file does not exist as specified.
28996    # Try adding .exe or .cmd
28997    if test -f "${new_path}.exe"; then
28998      input_to_shortpath="${new_path}.exe"
28999    elif test -f "${new_path}.cmd"; then
29000      input_to_shortpath="${new_path}.cmd"
29001    else
29002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29003$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29004      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29005$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29006      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29007    fi
29008  else
29009    input_to_shortpath="$new_path"
29010  fi
29011
29012  # Call helper function which possibly converts this using DOS-style short mode.
29013  # If so, the updated path is stored in $new_path.
29014  new_path="$input_to_shortpath"
29015
29016  input_path="$input_to_shortpath"
29017  # Check if we need to convert this using DOS-style short mode. If the path
29018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29019  # take no chances and rewrite it.
29020  # Note: m4 eats our [], so we need to use [ and ] instead.
29021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29022  if test "x$has_forbidden_chars" != x; then
29023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29027      # Going to short mode and back again did indeed matter. Since short mode is
29028      # case insensitive, let's make it lowercase to improve readability.
29029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29030      # Now convert it back to Unix-style (cygpath)
29031      input_path=`$CYGPATH -u "$shortmode_path"`
29032      new_path="$input_path"
29033    fi
29034  fi
29035
29036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29037  if test "x$test_cygdrive_prefix" = x; then
29038    # As a simple fix, exclude /usr/bin since it's not a real path.
29039    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29041      # a path prefixed by /cygdrive for fixpath to work.
29042      new_path="$CYGWIN_ROOT_PATH$input_path"
29043    fi
29044  fi
29045
29046  # remove trailing .exe if any
29047  new_path="${new_path/%.exe/}"
29048
29049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29050
29051  # First separate the path from the arguments. This will split at the first
29052  # space.
29053  complete="$CC"
29054  path="${complete%% *}"
29055  tmp="$complete EOL"
29056  arguments="${tmp#* }"
29057
29058  # Input might be given as Windows format, start by converting to
29059  # unix format.
29060  new_path="$path"
29061
29062  windows_path="$new_path"
29063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29064    unix_path=`$CYGPATH -u "$windows_path"`
29065    new_path="$unix_path"
29066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29068    new_path="$unix_path"
29069  fi
29070
29071
29072  # Now try to locate executable using which
29073  new_path=`$WHICH "$new_path" 2> /dev/null`
29074
29075  if test "x$new_path" = x; then
29076    # Oops. Which didn't find the executable.
29077    # The splitting of arguments from the executable at a space might have been incorrect,
29078    # since paths with space are more likely in Windows. Give it another try with the whole
29079    # argument.
29080    path="$complete"
29081    arguments="EOL"
29082    new_path="$path"
29083
29084  windows_path="$new_path"
29085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29086    unix_path=`$CYGPATH -u "$windows_path"`
29087    new_path="$unix_path"
29088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29090    new_path="$unix_path"
29091  fi
29092
29093
29094    new_path=`$WHICH "$new_path" 2> /dev/null`
29095    # bat and cmd files are not always considered executable in MSYS causing which
29096    # to not find them
29097    if test "x$new_path" = x \
29098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29100      new_path="$path"
29101
29102  windows_path="$new_path"
29103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29104    unix_path=`$CYGPATH -u "$windows_path"`
29105    new_path="$unix_path"
29106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29108    new_path="$unix_path"
29109  fi
29110
29111    fi
29112
29113    if test "x$new_path" = x; then
29114      # It's still not found. Now this is an unrecoverable error.
29115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29116$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29117      has_space=`$ECHO "$complete" | $GREP " "`
29118      if test "x$has_space" != x; then
29119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29121      fi
29122      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29123    fi
29124  fi
29125
29126  # Now new_path has a complete unix path to the binary
29127  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29128    # Keep paths in /bin as-is, but remove trailing .exe if any
29129    new_path="${new_path/%.exe/}"
29130    # Do not save /bin paths to all_fixpath_prefixes!
29131  else
29132    # Not in mixed or Windows style, start by that.
29133    new_path=`cmd //c echo $new_path`
29134
29135  input_path="$new_path"
29136  # Check if we need to convert this using DOS-style short mode. If the path
29137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29138  # take no chances and rewrite it.
29139  # Note: m4 eats our [], so we need to use [ and ] instead.
29140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29141  if test "x$has_forbidden_chars" != x; then
29142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29144  fi
29145
29146    # Output is in $new_path
29147
29148  windows_path="$new_path"
29149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29150    unix_path=`$CYGPATH -u "$windows_path"`
29151    new_path="$unix_path"
29152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29154    new_path="$unix_path"
29155  fi
29156
29157    # remove trailing .exe if any
29158    new_path="${new_path/%.exe/}"
29159
29160    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29161    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29162  fi
29163
29164    else
29165      # We're on a unix platform. Hooray! :)
29166      # First separate the path from the arguments. This will split at the first
29167      # space.
29168      complete="$CC"
29169      path="${complete%% *}"
29170      tmp="$complete EOL"
29171      arguments="${tmp#* }"
29172
29173      # Cannot rely on the command "which" here since it doesn't always work.
29174      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29175      if test -z "$is_absolute_path"; then
29176        # Path to executable is not absolute. Find it.
29177        IFS_save="$IFS"
29178        IFS=:
29179        for p in $PATH; do
29180          if test -f "$p/$path" && test -x "$p/$path"; then
29181            new_path="$p/$path"
29182            break
29183          fi
29184        done
29185        IFS="$IFS_save"
29186      else
29187        # This is an absolute path, we can use it without further modifications.
29188        new_path="$path"
29189      fi
29190
29191      if test "x$new_path" = x; then
29192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29193$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29194        has_space=`$ECHO "$complete" | $GREP " "`
29195        if test "x$has_space" != x; then
29196          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29197$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29198        fi
29199        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29200      fi
29201    fi
29202
29203    # Now join together the path and the arguments once again
29204    if test "x$arguments" != xEOL; then
29205      new_complete="$new_path ${arguments% *}"
29206    else
29207      new_complete="$new_path"
29208    fi
29209
29210    if test "x$complete" != "x$new_complete"; then
29211      CC="$new_complete"
29212      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29213$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29214    fi
29215  fi
29216
29217  TEST_COMPILER="$CC"
29218  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29219  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29220  if test "x$OPENJDK_BUILD_OS" != xaix; then
29221    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29223$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29224
29225  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29226    # Follow a chain of symbolic links. Use readlink
29227    # where it exists, else fall back to horribly
29228    # complicated shell code.
29229    if test "x$READLINK_TESTED" != yes; then
29230      # On MacOSX there is a readlink tool with a different
29231      # purpose than the GNU readlink tool. Check the found readlink.
29232      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29233      if test "x$ISGNU" = x; then
29234        # A readlink that we do not know how to use.
29235        # Are there other non-GNU readlinks out there?
29236        READLINK_TESTED=yes
29237        READLINK=
29238      fi
29239    fi
29240
29241    if test "x$READLINK" != x; then
29242      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29243    else
29244      # Save the current directory for restoring afterwards
29245      STARTDIR=$PWD
29246      COUNTER=0
29247      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29248      sym_link_file=`$BASENAME $TEST_COMPILER`
29249      cd $sym_link_dir
29250      # Use -P flag to resolve symlinks in directories.
29251      cd `$THEPWDCMD -P`
29252      sym_link_dir=`$THEPWDCMD -P`
29253      # Resolve file symlinks
29254      while test $COUNTER -lt 20; do
29255        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29256        if test "x$ISLINK" == x; then
29257          # This is not a symbolic link! We are done!
29258          break
29259        fi
29260        # Again resolve directory symlinks since the target of the just found
29261        # link could be in a different directory
29262        cd `$DIRNAME $ISLINK`
29263        sym_link_dir=`$THEPWDCMD -P`
29264        sym_link_file=`$BASENAME $ISLINK`
29265        let COUNTER=COUNTER+1
29266      done
29267      cd $STARTDIR
29268      TEST_COMPILER=$sym_link_dir/$sym_link_file
29269    fi
29270  fi
29271
29272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29273$as_echo "$TEST_COMPILER" >&6; }
29274  fi
29275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29276$as_echo_n "checking if CC is disguised ccache... " >&6; }
29277
29278  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29279  if test "x$COMPILER_BASENAME" = "xccache"; then
29280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29281$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29282    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29283    # We want to control ccache invocation ourselves, so ignore this cc and try
29284    # searching again.
29285
29286    # Remove the path to the fake ccache cc from the PATH
29287    RETRY_COMPILER_SAVED_PATH="$PATH"
29288    COMPILER_DIRNAME=`$DIRNAME $CC`
29289    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29290
29291    # Try again looking for our compiler
29292    if test -n "$ac_tool_prefix"; then
29293  for ac_prog in $TOOLCHAIN_CC_BINARY
29294  do
29295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29298$as_echo_n "checking for $ac_word... " >&6; }
29299if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29300  $as_echo_n "(cached) " >&6
29301else
29302  if test -n "$PROPER_COMPILER_CC"; then
29303  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29304else
29305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29306for as_dir in $PATH
29307do
29308  IFS=$as_save_IFS
29309  test -z "$as_dir" && as_dir=.
29310    for ac_exec_ext in '' $ac_executable_extensions; do
29311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29312    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29314    break 2
29315  fi
29316done
29317  done
29318IFS=$as_save_IFS
29319
29320fi
29321fi
29322PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29323if test -n "$PROPER_COMPILER_CC"; then
29324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29325$as_echo "$PROPER_COMPILER_CC" >&6; }
29326else
29327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29328$as_echo "no" >&6; }
29329fi
29330
29331
29332    test -n "$PROPER_COMPILER_CC" && break
29333  done
29334fi
29335if test -z "$PROPER_COMPILER_CC"; then
29336  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29337  for ac_prog in $TOOLCHAIN_CC_BINARY
29338do
29339  # Extract the first word of "$ac_prog", so it can be a program name with args.
29340set dummy $ac_prog; ac_word=$2
29341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29342$as_echo_n "checking for $ac_word... " >&6; }
29343if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29344  $as_echo_n "(cached) " >&6
29345else
29346  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29347  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29348else
29349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29350for as_dir in $PATH
29351do
29352  IFS=$as_save_IFS
29353  test -z "$as_dir" && as_dir=.
29354    for ac_exec_ext in '' $ac_executable_extensions; do
29355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29356    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29358    break 2
29359  fi
29360done
29361  done
29362IFS=$as_save_IFS
29363
29364fi
29365fi
29366ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29367if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29369$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29370else
29371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29372$as_echo "no" >&6; }
29373fi
29374
29375
29376  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29377done
29378
29379  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29380    PROPER_COMPILER_CC=""
29381  else
29382    case $cross_compiling:$ac_tool_warned in
29383yes:)
29384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29386ac_tool_warned=yes ;;
29387esac
29388    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29389  fi
29390fi
29391
29392
29393  # Only process if variable expands to non-empty
29394
29395  if test "x$PROPER_COMPILER_CC" != x; then
29396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29397
29398  # First separate the path from the arguments. This will split at the first
29399  # space.
29400  complete="$PROPER_COMPILER_CC"
29401  path="${complete%% *}"
29402  tmp="$complete EOL"
29403  arguments="${tmp#* }"
29404
29405  # Input might be given as Windows format, start by converting to
29406  # unix format.
29407  new_path=`$CYGPATH -u "$path"`
29408
29409  # Now try to locate executable using which
29410  new_path=`$WHICH "$new_path" 2> /dev/null`
29411  # bat and cmd files are not always considered executable in cygwin causing which
29412  # to not find them
29413  if test "x$new_path" = x \
29414      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29415      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29416    new_path=`$CYGPATH -u "$path"`
29417  fi
29418  if test "x$new_path" = x; then
29419    # Oops. Which didn't find the executable.
29420    # The splitting of arguments from the executable at a space might have been incorrect,
29421    # since paths with space are more likely in Windows. Give it another try with the whole
29422    # argument.
29423    path="$complete"
29424    arguments="EOL"
29425    new_path=`$CYGPATH -u "$path"`
29426    new_path=`$WHICH "$new_path" 2> /dev/null`
29427    # bat and cmd files are not always considered executable in cygwin causing which
29428    # to not find them
29429    if test "x$new_path" = x \
29430        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29431        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29432      new_path=`$CYGPATH -u "$path"`
29433    fi
29434    if test "x$new_path" = x; then
29435      # It's still not found. Now this is an unrecoverable error.
29436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29437$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29438      has_space=`$ECHO "$complete" | $GREP " "`
29439      if test "x$has_space" != x; then
29440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29442      fi
29443      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29444    fi
29445  fi
29446
29447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29450  # "foo.exe" is OK but "foo" is an error.
29451  #
29452  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29453  # It is also a way to make sure we got the proper file name for the real test later on.
29454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29455  if test "x$test_shortpath" = x; then
29456    # Short path failed, file does not exist as specified.
29457    # Try adding .exe or .cmd
29458    if test -f "${new_path}.exe"; then
29459      input_to_shortpath="${new_path}.exe"
29460    elif test -f "${new_path}.cmd"; then
29461      input_to_shortpath="${new_path}.cmd"
29462    else
29463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29464$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29465      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29466$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29467      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29468    fi
29469  else
29470    input_to_shortpath="$new_path"
29471  fi
29472
29473  # Call helper function which possibly converts this using DOS-style short mode.
29474  # If so, the updated path is stored in $new_path.
29475  new_path="$input_to_shortpath"
29476
29477  input_path="$input_to_shortpath"
29478  # Check if we need to convert this using DOS-style short mode. If the path
29479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29480  # take no chances and rewrite it.
29481  # Note: m4 eats our [], so we need to use [ and ] instead.
29482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29483  if test "x$has_forbidden_chars" != x; then
29484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29488      # Going to short mode and back again did indeed matter. Since short mode is
29489      # case insensitive, let's make it lowercase to improve readability.
29490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29491      # Now convert it back to Unix-style (cygpath)
29492      input_path=`$CYGPATH -u "$shortmode_path"`
29493      new_path="$input_path"
29494    fi
29495  fi
29496
29497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29498  if test "x$test_cygdrive_prefix" = x; then
29499    # As a simple fix, exclude /usr/bin since it's not a real path.
29500    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29502      # a path prefixed by /cygdrive for fixpath to work.
29503      new_path="$CYGWIN_ROOT_PATH$input_path"
29504    fi
29505  fi
29506
29507  # remove trailing .exe if any
29508  new_path="${new_path/%.exe/}"
29509
29510    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29511
29512  # First separate the path from the arguments. This will split at the first
29513  # space.
29514  complete="$PROPER_COMPILER_CC"
29515  path="${complete%% *}"
29516  tmp="$complete EOL"
29517  arguments="${tmp#* }"
29518
29519  # Input might be given as Windows format, start by converting to
29520  # unix format.
29521  new_path="$path"
29522
29523  windows_path="$new_path"
29524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29525    unix_path=`$CYGPATH -u "$windows_path"`
29526    new_path="$unix_path"
29527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29529    new_path="$unix_path"
29530  fi
29531
29532
29533  # Now try to locate executable using which
29534  new_path=`$WHICH "$new_path" 2> /dev/null`
29535
29536  if test "x$new_path" = x; then
29537    # Oops. Which didn't find the executable.
29538    # The splitting of arguments from the executable at a space might have been incorrect,
29539    # since paths with space are more likely in Windows. Give it another try with the whole
29540    # argument.
29541    path="$complete"
29542    arguments="EOL"
29543    new_path="$path"
29544
29545  windows_path="$new_path"
29546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29547    unix_path=`$CYGPATH -u "$windows_path"`
29548    new_path="$unix_path"
29549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29551    new_path="$unix_path"
29552  fi
29553
29554
29555    new_path=`$WHICH "$new_path" 2> /dev/null`
29556    # bat and cmd files are not always considered executable in MSYS causing which
29557    # to not find them
29558    if test "x$new_path" = x \
29559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29561      new_path="$path"
29562
29563  windows_path="$new_path"
29564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29565    unix_path=`$CYGPATH -u "$windows_path"`
29566    new_path="$unix_path"
29567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29569    new_path="$unix_path"
29570  fi
29571
29572    fi
29573
29574    if test "x$new_path" = x; then
29575      # It's still not found. Now this is an unrecoverable error.
29576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29577$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29578      has_space=`$ECHO "$complete" | $GREP " "`
29579      if test "x$has_space" != x; then
29580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29582      fi
29583      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29584    fi
29585  fi
29586
29587  # Now new_path has a complete unix path to the binary
29588  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29589    # Keep paths in /bin as-is, but remove trailing .exe if any
29590    new_path="${new_path/%.exe/}"
29591    # Do not save /bin paths to all_fixpath_prefixes!
29592  else
29593    # Not in mixed or Windows style, start by that.
29594    new_path=`cmd //c echo $new_path`
29595
29596  input_path="$new_path"
29597  # Check if we need to convert this using DOS-style short mode. If the path
29598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29599  # take no chances and rewrite it.
29600  # Note: m4 eats our [], so we need to use [ and ] instead.
29601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29602  if test "x$has_forbidden_chars" != x; then
29603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29605  fi
29606
29607    # Output is in $new_path
29608
29609  windows_path="$new_path"
29610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29611    unix_path=`$CYGPATH -u "$windows_path"`
29612    new_path="$unix_path"
29613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29615    new_path="$unix_path"
29616  fi
29617
29618    # remove trailing .exe if any
29619    new_path="${new_path/%.exe/}"
29620
29621    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29622    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29623  fi
29624
29625    else
29626      # We're on a unix platform. Hooray! :)
29627      # First separate the path from the arguments. This will split at the first
29628      # space.
29629      complete="$PROPER_COMPILER_CC"
29630      path="${complete%% *}"
29631      tmp="$complete EOL"
29632      arguments="${tmp#* }"
29633
29634      # Cannot rely on the command "which" here since it doesn't always work.
29635      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29636      if test -z "$is_absolute_path"; then
29637        # Path to executable is not absolute. Find it.
29638        IFS_save="$IFS"
29639        IFS=:
29640        for p in $PATH; do
29641          if test -f "$p/$path" && test -x "$p/$path"; then
29642            new_path="$p/$path"
29643            break
29644          fi
29645        done
29646        IFS="$IFS_save"
29647      else
29648        # This is an absolute path, we can use it without further modifications.
29649        new_path="$path"
29650      fi
29651
29652      if test "x$new_path" = x; then
29653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29654$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29655        has_space=`$ECHO "$complete" | $GREP " "`
29656        if test "x$has_space" != x; then
29657          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29658$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29659        fi
29660        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29661      fi
29662    fi
29663
29664    # Now join together the path and the arguments once again
29665    if test "x$arguments" != xEOL; then
29666      new_complete="$new_path ${arguments% *}"
29667    else
29668      new_complete="$new_path"
29669    fi
29670
29671    if test "x$complete" != "x$new_complete"; then
29672      PROPER_COMPILER_CC="$new_complete"
29673      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29674$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29675    fi
29676  fi
29677
29678    PATH="$RETRY_COMPILER_SAVED_PATH"
29679
29680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29681$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29682
29683  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29684    # Follow a chain of symbolic links. Use readlink
29685    # where it exists, else fall back to horribly
29686    # complicated shell code.
29687    if test "x$READLINK_TESTED" != yes; then
29688      # On MacOSX there is a readlink tool with a different
29689      # purpose than the GNU readlink tool. Check the found readlink.
29690      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29691      if test "x$ISGNU" = x; then
29692        # A readlink that we do not know how to use.
29693        # Are there other non-GNU readlinks out there?
29694        READLINK_TESTED=yes
29695        READLINK=
29696      fi
29697    fi
29698
29699    if test "x$READLINK" != x; then
29700      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29701    else
29702      # Save the current directory for restoring afterwards
29703      STARTDIR=$PWD
29704      COUNTER=0
29705      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29706      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29707      cd $sym_link_dir
29708      # Use -P flag to resolve symlinks in directories.
29709      cd `$THEPWDCMD -P`
29710      sym_link_dir=`$THEPWDCMD -P`
29711      # Resolve file symlinks
29712      while test $COUNTER -lt 20; do
29713        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29714        if test "x$ISLINK" == x; then
29715          # This is not a symbolic link! We are done!
29716          break
29717        fi
29718        # Again resolve directory symlinks since the target of the just found
29719        # link could be in a different directory
29720        cd `$DIRNAME $ISLINK`
29721        sym_link_dir=`$THEPWDCMD -P`
29722        sym_link_file=`$BASENAME $ISLINK`
29723        let COUNTER=COUNTER+1
29724      done
29725      cd $STARTDIR
29726      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29727    fi
29728  fi
29729
29730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29731$as_echo "$PROPER_COMPILER_CC" >&6; }
29732    CC="$PROPER_COMPILER_CC"
29733  else
29734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29735$as_echo "no, keeping CC" >&6; }
29736  fi
29737
29738
29739  COMPILER=$CC
29740  COMPILER_NAME=$COMPILER_NAME
29741
29742  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29743    # cc -V output typically looks like
29744    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29745    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29746    # Check that this is likely to be the Solaris Studio cc.
29747    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29748    if test $? -ne 0; then
29749      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29750      { $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
29751$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29752      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29753$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29754      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29755$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29756      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29757    fi
29758    # Remove usage instructions (if present), and
29759    # collapse compiler output into a single line
29760    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29761        $SED -e 's/ *[Uu]sage:.*//'`
29762    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29763        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29764  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29765    # xlc -qversion output typically looks like
29766    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29767    #     Version: 11.01.0000.0015
29768    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29769    # Check that this is likely to be the IBM XL C compiler.
29770    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29771    if test $? -ne 0; then
29772      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29773      { $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
29774$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29775      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29776$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29777      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29778$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29779      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29780    fi
29781    # Collapse compiler output into a single line
29782    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29783    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29784        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29785  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29786    # There is no specific version flag, but all output starts with a version string.
29787    # First line typically looks something like:
29788    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29789    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29790    # Check that this is likely to be Microsoft CL.EXE.
29791    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29792    if test $? -ne 0; then
29793      { $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
29794$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29795      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29796$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29797      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29798    fi
29799    # Collapse compiler output into a single line
29800    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29801    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29802        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29803  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29804    # gcc --version output typically looks like
29805    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29806    #     Copyright (C) 2013 Free Software Foundation, Inc.
29807    #     This is free software; see the source for copying conditions.  There is NO
29808    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29809    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29810    # Check that this is likely to be GCC.
29811    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29812    if test $? -ne 0; then
29813      { $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
29814$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29815      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29816$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29817      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29818    fi
29819    # Remove Copyright and legalese from version string, and
29820    # collapse into a single line
29821    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29822        $SED -e 's/ *Copyright .*//'`
29823    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29824        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29825  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29826    # clang --version output typically looks like
29827    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29828    #    clang version 3.3 (tags/RELEASE_33/final)
29829    # or
29830    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29831    #    Target: x86_64-pc-linux-gnu
29832    #    Thread model: posix
29833    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29834    # Check that this is likely to be clang
29835    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29836    if test $? -ne 0; then
29837      { $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
29838$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29839      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29840$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29841      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29842    fi
29843    # Collapse compiler output into a single line
29844    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29845    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29846        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29847  else
29848      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29849  fi
29850  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29851  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29852  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29853  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29854
29855  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29856$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29857
29858
29859  # Now that we have resolved CC ourself, let autoconf have its go at it
29860  ac_ext=c
29861ac_cpp='$CPP $CPPFLAGS'
29862ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29863ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29864ac_compiler_gnu=$ac_cv_c_compiler_gnu
29865if test -n "$ac_tool_prefix"; then
29866  for ac_prog in $CC
29867  do
29868    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29871$as_echo_n "checking for $ac_word... " >&6; }
29872if ${ac_cv_prog_CC+:} false; then :
29873  $as_echo_n "(cached) " >&6
29874else
29875  if test -n "$CC"; then
29876  ac_cv_prog_CC="$CC" # Let the user override the test.
29877else
29878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29879for as_dir in $PATH
29880do
29881  IFS=$as_save_IFS
29882  test -z "$as_dir" && as_dir=.
29883    for ac_exec_ext in '' $ac_executable_extensions; do
29884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29885    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29887    break 2
29888  fi
29889done
29890  done
29891IFS=$as_save_IFS
29892
29893fi
29894fi
29895CC=$ac_cv_prog_CC
29896if test -n "$CC"; then
29897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29898$as_echo "$CC" >&6; }
29899else
29900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29901$as_echo "no" >&6; }
29902fi
29903
29904
29905    test -n "$CC" && break
29906  done
29907fi
29908if test -z "$CC"; then
29909  ac_ct_CC=$CC
29910  for ac_prog in $CC
29911do
29912  # Extract the first word of "$ac_prog", so it can be a program name with args.
29913set dummy $ac_prog; ac_word=$2
29914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29915$as_echo_n "checking for $ac_word... " >&6; }
29916if ${ac_cv_prog_ac_ct_CC+:} false; then :
29917  $as_echo_n "(cached) " >&6
29918else
29919  if test -n "$ac_ct_CC"; then
29920  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29921else
29922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29923for as_dir in $PATH
29924do
29925  IFS=$as_save_IFS
29926  test -z "$as_dir" && as_dir=.
29927    for ac_exec_ext in '' $ac_executable_extensions; do
29928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29929    ac_cv_prog_ac_ct_CC="$ac_prog"
29930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29931    break 2
29932  fi
29933done
29934  done
29935IFS=$as_save_IFS
29936
29937fi
29938fi
29939ac_ct_CC=$ac_cv_prog_ac_ct_CC
29940if test -n "$ac_ct_CC"; then
29941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29942$as_echo "$ac_ct_CC" >&6; }
29943else
29944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29945$as_echo "no" >&6; }
29946fi
29947
29948
29949  test -n "$ac_ct_CC" && break
29950done
29951
29952  if test "x$ac_ct_CC" = x; then
29953    CC=""
29954  else
29955    case $cross_compiling:$ac_tool_warned in
29956yes:)
29957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29959ac_tool_warned=yes ;;
29960esac
29961    CC=$ac_ct_CC
29962  fi
29963fi
29964
29965
29966test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29968as_fn_error $? "no acceptable C compiler found in \$PATH
29969See \`config.log' for more details" "$LINENO" 5; }
29970
29971# Provide some information about the compiler.
29972$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29973set X $ac_compile
29974ac_compiler=$2
29975for ac_option in --version -v -V -qversion; do
29976  { { ac_try="$ac_compiler $ac_option >&5"
29977case "(($ac_try" in
29978  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29979  *) ac_try_echo=$ac_try;;
29980esac
29981eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29982$as_echo "$ac_try_echo"; } >&5
29983  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29984  ac_status=$?
29985  if test -s conftest.err; then
29986    sed '10a\
29987... rest of stderr output deleted ...
29988         10q' conftest.err >conftest.er1
29989    cat conftest.er1 >&5
29990  fi
29991  rm -f conftest.er1 conftest.err
29992  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29993  test $ac_status = 0; }
29994done
29995
29996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29997/* end confdefs.h.  */
29998
29999int
30000main ()
30001{
30002
30003  ;
30004  return 0;
30005}
30006_ACEOF
30007ac_clean_files_save=$ac_clean_files
30008ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30009# Try to create an executable without -o first, disregard a.out.
30010# It will help us diagnose broken compilers, and finding out an intuition
30011# of exeext.
30012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30013$as_echo_n "checking whether the C compiler works... " >&6; }
30014ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30015
30016# The possible output files:
30017ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30018
30019ac_rmfiles=
30020for ac_file in $ac_files
30021do
30022  case $ac_file in
30023    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30024    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30025  esac
30026done
30027rm -f $ac_rmfiles
30028
30029if { { ac_try="$ac_link_default"
30030case "(($ac_try" in
30031  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30032  *) ac_try_echo=$ac_try;;
30033esac
30034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30035$as_echo "$ac_try_echo"; } >&5
30036  (eval "$ac_link_default") 2>&5
30037  ac_status=$?
30038  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30039  test $ac_status = 0; }; then :
30040  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30041# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30042# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30043# so that the user can short-circuit this test for compilers unknown to
30044# Autoconf.
30045for ac_file in $ac_files ''
30046do
30047  test -f "$ac_file" || continue
30048  case $ac_file in
30049    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30050	;;
30051    [ab].out )
30052	# We found the default executable, but exeext='' is most
30053	# certainly right.
30054	break;;
30055    *.* )
30056	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30057	then :; else
30058	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30059	fi
30060	# We set ac_cv_exeext here because the later test for it is not
30061	# safe: cross compilers may not add the suffix if given an `-o'
30062	# argument, so we may need to know it at that point already.
30063	# Even if this section looks crufty: it has the advantage of
30064	# actually working.
30065	break;;
30066    * )
30067	break;;
30068  esac
30069done
30070test "$ac_cv_exeext" = no && ac_cv_exeext=
30071
30072else
30073  ac_file=''
30074fi
30075if test -z "$ac_file"; then :
30076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30077$as_echo "no" >&6; }
30078$as_echo "$as_me: failed program was:" >&5
30079sed 's/^/| /' conftest.$ac_ext >&5
30080
30081{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30083as_fn_error 77 "C compiler cannot create executables
30084See \`config.log' for more details" "$LINENO" 5; }
30085else
30086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30087$as_echo "yes" >&6; }
30088fi
30089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30090$as_echo_n "checking for C compiler default output file name... " >&6; }
30091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30092$as_echo "$ac_file" >&6; }
30093ac_exeext=$ac_cv_exeext
30094
30095rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30096ac_clean_files=$ac_clean_files_save
30097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30098$as_echo_n "checking for suffix of executables... " >&6; }
30099if { { ac_try="$ac_link"
30100case "(($ac_try" in
30101  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30102  *) ac_try_echo=$ac_try;;
30103esac
30104eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30105$as_echo "$ac_try_echo"; } >&5
30106  (eval "$ac_link") 2>&5
30107  ac_status=$?
30108  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30109  test $ac_status = 0; }; then :
30110  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30111# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30112# work properly (i.e., refer to `conftest.exe'), while it won't with
30113# `rm'.
30114for ac_file in conftest.exe conftest conftest.*; do
30115  test -f "$ac_file" || continue
30116  case $ac_file in
30117    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30118    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30119	  break;;
30120    * ) break;;
30121  esac
30122done
30123else
30124  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30126as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30127See \`config.log' for more details" "$LINENO" 5; }
30128fi
30129rm -f conftest conftest$ac_cv_exeext
30130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30131$as_echo "$ac_cv_exeext" >&6; }
30132
30133rm -f conftest.$ac_ext
30134EXEEXT=$ac_cv_exeext
30135ac_exeext=$EXEEXT
30136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30137/* end confdefs.h.  */
30138#include <stdio.h>
30139int
30140main ()
30141{
30142FILE *f = fopen ("conftest.out", "w");
30143 return ferror (f) || fclose (f) != 0;
30144
30145  ;
30146  return 0;
30147}
30148_ACEOF
30149ac_clean_files="$ac_clean_files conftest.out"
30150# Check that the compiler produces executables we can run.  If not, either
30151# the compiler is broken, or we cross compile.
30152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30153$as_echo_n "checking whether we are cross compiling... " >&6; }
30154if test "$cross_compiling" != yes; then
30155  { { ac_try="$ac_link"
30156case "(($ac_try" in
30157  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30158  *) ac_try_echo=$ac_try;;
30159esac
30160eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30161$as_echo "$ac_try_echo"; } >&5
30162  (eval "$ac_link") 2>&5
30163  ac_status=$?
30164  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30165  test $ac_status = 0; }
30166  if { ac_try='./conftest$ac_cv_exeext'
30167  { { case "(($ac_try" in
30168  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30169  *) ac_try_echo=$ac_try;;
30170esac
30171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30172$as_echo "$ac_try_echo"; } >&5
30173  (eval "$ac_try") 2>&5
30174  ac_status=$?
30175  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30176  test $ac_status = 0; }; }; then
30177    cross_compiling=no
30178  else
30179    if test "$cross_compiling" = maybe; then
30180	cross_compiling=yes
30181    else
30182	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30184as_fn_error $? "cannot run C compiled programs.
30185If you meant to cross compile, use \`--host'.
30186See \`config.log' for more details" "$LINENO" 5; }
30187    fi
30188  fi
30189fi
30190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30191$as_echo "$cross_compiling" >&6; }
30192
30193rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30194ac_clean_files=$ac_clean_files_save
30195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30196$as_echo_n "checking for suffix of object files... " >&6; }
30197if ${ac_cv_objext+:} false; then :
30198  $as_echo_n "(cached) " >&6
30199else
30200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30201/* end confdefs.h.  */
30202
30203int
30204main ()
30205{
30206
30207  ;
30208  return 0;
30209}
30210_ACEOF
30211rm -f conftest.o conftest.obj
30212if { { ac_try="$ac_compile"
30213case "(($ac_try" in
30214  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30215  *) ac_try_echo=$ac_try;;
30216esac
30217eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30218$as_echo "$ac_try_echo"; } >&5
30219  (eval "$ac_compile") 2>&5
30220  ac_status=$?
30221  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30222  test $ac_status = 0; }; then :
30223  for ac_file in conftest.o conftest.obj conftest.*; do
30224  test -f "$ac_file" || continue;
30225  case $ac_file in
30226    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30227    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30228       break;;
30229  esac
30230done
30231else
30232  $as_echo "$as_me: failed program was:" >&5
30233sed 's/^/| /' conftest.$ac_ext >&5
30234
30235{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30237as_fn_error $? "cannot compute suffix of object files: cannot compile
30238See \`config.log' for more details" "$LINENO" 5; }
30239fi
30240rm -f conftest.$ac_cv_objext conftest.$ac_ext
30241fi
30242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30243$as_echo "$ac_cv_objext" >&6; }
30244OBJEXT=$ac_cv_objext
30245ac_objext=$OBJEXT
30246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30247$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30248if ${ac_cv_c_compiler_gnu+:} false; then :
30249  $as_echo_n "(cached) " >&6
30250else
30251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30252/* end confdefs.h.  */
30253
30254int
30255main ()
30256{
30257#ifndef __GNUC__
30258       choke me
30259#endif
30260
30261  ;
30262  return 0;
30263}
30264_ACEOF
30265if ac_fn_c_try_compile "$LINENO"; then :
30266  ac_compiler_gnu=yes
30267else
30268  ac_compiler_gnu=no
30269fi
30270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30271ac_cv_c_compiler_gnu=$ac_compiler_gnu
30272
30273fi
30274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30275$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30276if test $ac_compiler_gnu = yes; then
30277  GCC=yes
30278else
30279  GCC=
30280fi
30281ac_test_CFLAGS=${CFLAGS+set}
30282ac_save_CFLAGS=$CFLAGS
30283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30284$as_echo_n "checking whether $CC accepts -g... " >&6; }
30285if ${ac_cv_prog_cc_g+:} false; then :
30286  $as_echo_n "(cached) " >&6
30287else
30288  ac_save_c_werror_flag=$ac_c_werror_flag
30289   ac_c_werror_flag=yes
30290   ac_cv_prog_cc_g=no
30291   CFLAGS="-g"
30292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30293/* end confdefs.h.  */
30294
30295int
30296main ()
30297{
30298
30299  ;
30300  return 0;
30301}
30302_ACEOF
30303if ac_fn_c_try_compile "$LINENO"; then :
30304  ac_cv_prog_cc_g=yes
30305else
30306  CFLAGS=""
30307      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30308/* end confdefs.h.  */
30309
30310int
30311main ()
30312{
30313
30314  ;
30315  return 0;
30316}
30317_ACEOF
30318if ac_fn_c_try_compile "$LINENO"; then :
30319
30320else
30321  ac_c_werror_flag=$ac_save_c_werror_flag
30322	 CFLAGS="-g"
30323	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30324/* end confdefs.h.  */
30325
30326int
30327main ()
30328{
30329
30330  ;
30331  return 0;
30332}
30333_ACEOF
30334if ac_fn_c_try_compile "$LINENO"; then :
30335  ac_cv_prog_cc_g=yes
30336fi
30337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30338fi
30339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30340fi
30341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30342   ac_c_werror_flag=$ac_save_c_werror_flag
30343fi
30344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30345$as_echo "$ac_cv_prog_cc_g" >&6; }
30346if test "$ac_test_CFLAGS" = set; then
30347  CFLAGS=$ac_save_CFLAGS
30348elif test $ac_cv_prog_cc_g = yes; then
30349  if test "$GCC" = yes; then
30350    CFLAGS="-g -O2"
30351  else
30352    CFLAGS="-g"
30353  fi
30354else
30355  if test "$GCC" = yes; then
30356    CFLAGS="-O2"
30357  else
30358    CFLAGS=
30359  fi
30360fi
30361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30362$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30363if ${ac_cv_prog_cc_c89+:} false; then :
30364  $as_echo_n "(cached) " >&6
30365else
30366  ac_cv_prog_cc_c89=no
30367ac_save_CC=$CC
30368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30369/* end confdefs.h.  */
30370#include <stdarg.h>
30371#include <stdio.h>
30372struct stat;
30373/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30374struct buf { int x; };
30375FILE * (*rcsopen) (struct buf *, struct stat *, int);
30376static char *e (p, i)
30377     char **p;
30378     int i;
30379{
30380  return p[i];
30381}
30382static char *f (char * (*g) (char **, int), char **p, ...)
30383{
30384  char *s;
30385  va_list v;
30386  va_start (v,p);
30387  s = g (p, va_arg (v,int));
30388  va_end (v);
30389  return s;
30390}
30391
30392/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30393   function prototypes and stuff, but not '\xHH' hex character constants.
30394   These don't provoke an error unfortunately, instead are silently treated
30395   as 'x'.  The following induces an error, until -std is added to get
30396   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30397   array size at least.  It's necessary to write '\x00'==0 to get something
30398   that's true only with -std.  */
30399int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30400
30401/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30402   inside strings and character constants.  */
30403#define FOO(x) 'x'
30404int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30405
30406int test (int i, double x);
30407struct s1 {int (*f) (int a);};
30408struct s2 {int (*f) (double a);};
30409int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30410int argc;
30411char **argv;
30412int
30413main ()
30414{
30415return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30416  ;
30417  return 0;
30418}
30419_ACEOF
30420for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30421	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30422do
30423  CC="$ac_save_CC $ac_arg"
30424  if ac_fn_c_try_compile "$LINENO"; then :
30425  ac_cv_prog_cc_c89=$ac_arg
30426fi
30427rm -f core conftest.err conftest.$ac_objext
30428  test "x$ac_cv_prog_cc_c89" != "xno" && break
30429done
30430rm -f conftest.$ac_ext
30431CC=$ac_save_CC
30432
30433fi
30434# AC_CACHE_VAL
30435case "x$ac_cv_prog_cc_c89" in
30436  x)
30437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30438$as_echo "none needed" >&6; } ;;
30439  xno)
30440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30441$as_echo "unsupported" >&6; } ;;
30442  *)
30443    CC="$CC $ac_cv_prog_cc_c89"
30444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30445$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30446esac
30447if test "x$ac_cv_prog_cc_c89" != xno; then :
30448
30449fi
30450
30451ac_ext=cpp
30452ac_cpp='$CXXCPP $CPPFLAGS'
30453ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30454ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30455ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30456
30457
30458
30459  COMPILER_NAME=C++
30460  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30461
30462  if test "x$CXX" != x; then
30463    # User has supplied compiler name already, always let that override.
30464    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30465$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30466    if test "x`basename $CXX`" = "x$CXX"; then
30467      # A command without a complete path is provided, search $PATH.
30468
30469      for ac_prog in $CXX
30470do
30471  # Extract the first word of "$ac_prog", so it can be a program name with args.
30472set dummy $ac_prog; ac_word=$2
30473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30474$as_echo_n "checking for $ac_word... " >&6; }
30475if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30476  $as_echo_n "(cached) " >&6
30477else
30478  case $POTENTIAL_CXX in
30479  [\\/]* | ?:[\\/]*)
30480  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30481  ;;
30482  *)
30483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30484for as_dir in $PATH
30485do
30486  IFS=$as_save_IFS
30487  test -z "$as_dir" && as_dir=.
30488    for ac_exec_ext in '' $ac_executable_extensions; do
30489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30490    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30492    break 2
30493  fi
30494done
30495  done
30496IFS=$as_save_IFS
30497
30498  ;;
30499esac
30500fi
30501POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30502if test -n "$POTENTIAL_CXX"; then
30503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30504$as_echo "$POTENTIAL_CXX" >&6; }
30505else
30506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30507$as_echo "no" >&6; }
30508fi
30509
30510
30511  test -n "$POTENTIAL_CXX" && break
30512done
30513
30514      if test "x$POTENTIAL_CXX" != x; then
30515        CXX=$POTENTIAL_CXX
30516      else
30517        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30518      fi
30519    else
30520      # Otherwise it might already be a complete path
30521      if test ! -x "$CXX"; then
30522        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30523      fi
30524    fi
30525  else
30526    # No user supplied value. Locate compiler ourselves.
30527
30528    # If we are cross compiling, assume cross compilation tools follows the
30529    # cross compilation standard where they are prefixed with the autoconf
30530    # standard name for the target. For example the binary
30531    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30532    # If we are not cross compiling, then the default compiler name will be
30533    # used.
30534
30535    CXX=
30536    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30537    # before checking the rest of the PATH.
30538    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30539    # step, this should not be necessary.
30540    if test -n "$TOOLCHAIN_PATH"; then
30541      PATH_save="$PATH"
30542      PATH="$TOOLCHAIN_PATH"
30543      for ac_prog in $SEARCH_LIST
30544do
30545  # Extract the first word of "$ac_prog", so it can be a program name with args.
30546set dummy $ac_prog; ac_word=$2
30547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30548$as_echo_n "checking for $ac_word... " >&6; }
30549if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30550  $as_echo_n "(cached) " >&6
30551else
30552  case $TOOLCHAIN_PATH_CXX in
30553  [\\/]* | ?:[\\/]*)
30554  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30555  ;;
30556  *)
30557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30558for as_dir in $PATH
30559do
30560  IFS=$as_save_IFS
30561  test -z "$as_dir" && as_dir=.
30562    for ac_exec_ext in '' $ac_executable_extensions; do
30563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30564    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30566    break 2
30567  fi
30568done
30569  done
30570IFS=$as_save_IFS
30571
30572  ;;
30573esac
30574fi
30575TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30576if test -n "$TOOLCHAIN_PATH_CXX"; then
30577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30578$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30579else
30580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30581$as_echo "no" >&6; }
30582fi
30583
30584
30585  test -n "$TOOLCHAIN_PATH_CXX" && break
30586done
30587
30588      CXX=$TOOLCHAIN_PATH_CXX
30589      PATH="$PATH_save"
30590    fi
30591
30592    # AC_PATH_PROGS can't be run multiple times with the same variable,
30593    # so create a new name for this run.
30594    if test "x$CXX" = x; then
30595      for ac_prog in $SEARCH_LIST
30596do
30597  # Extract the first word of "$ac_prog", so it can be a program name with args.
30598set dummy $ac_prog; ac_word=$2
30599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30600$as_echo_n "checking for $ac_word... " >&6; }
30601if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30602  $as_echo_n "(cached) " >&6
30603else
30604  case $POTENTIAL_CXX in
30605  [\\/]* | ?:[\\/]*)
30606  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30607  ;;
30608  *)
30609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30610for as_dir in $PATH
30611do
30612  IFS=$as_save_IFS
30613  test -z "$as_dir" && as_dir=.
30614    for ac_exec_ext in '' $ac_executable_extensions; do
30615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30616    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30618    break 2
30619  fi
30620done
30621  done
30622IFS=$as_save_IFS
30623
30624  ;;
30625esac
30626fi
30627POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30628if test -n "$POTENTIAL_CXX"; then
30629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30630$as_echo "$POTENTIAL_CXX" >&6; }
30631else
30632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30633$as_echo "no" >&6; }
30634fi
30635
30636
30637  test -n "$POTENTIAL_CXX" && break
30638done
30639
30640      CXX=$POTENTIAL_CXX
30641    fi
30642
30643    if test "x$CXX" = x; then
30644
30645  # Print a helpful message on how to acquire the necessary build dependency.
30646  # devkit is the help tag: freetype, cups, pulse, alsa etc
30647  MISSING_DEPENDENCY=devkit
30648
30649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30650    cygwin_help $MISSING_DEPENDENCY
30651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30652    msys_help $MISSING_DEPENDENCY
30653  else
30654    PKGHANDLER_COMMAND=
30655
30656    case $PKGHANDLER in
30657      apt-get)
30658        apt_help     $MISSING_DEPENDENCY ;;
30659      yum)
30660        yum_help     $MISSING_DEPENDENCY ;;
30661      port)
30662        port_help    $MISSING_DEPENDENCY ;;
30663      pkgutil)
30664        pkgutil_help $MISSING_DEPENDENCY ;;
30665      pkgadd)
30666        pkgadd_help  $MISSING_DEPENDENCY ;;
30667    esac
30668
30669    if test "x$PKGHANDLER_COMMAND" != x; then
30670      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30671    fi
30672  fi
30673
30674      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30675    fi
30676  fi
30677
30678  # Now we have a compiler binary in CXX. Make sure it's okay.
30679
30680  # Only process if variable expands to non-empty
30681
30682  if test "x$CXX" != x; then
30683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30684
30685  # First separate the path from the arguments. This will split at the first
30686  # space.
30687  complete="$CXX"
30688  path="${complete%% *}"
30689  tmp="$complete EOL"
30690  arguments="${tmp#* }"
30691
30692  # Input might be given as Windows format, start by converting to
30693  # unix format.
30694  new_path=`$CYGPATH -u "$path"`
30695
30696  # Now try to locate executable using which
30697  new_path=`$WHICH "$new_path" 2> /dev/null`
30698  # bat and cmd files are not always considered executable in cygwin causing which
30699  # to not find them
30700  if test "x$new_path" = x \
30701      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30702      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30703    new_path=`$CYGPATH -u "$path"`
30704  fi
30705  if test "x$new_path" = x; then
30706    # Oops. Which didn't find the executable.
30707    # The splitting of arguments from the executable at a space might have been incorrect,
30708    # since paths with space are more likely in Windows. Give it another try with the whole
30709    # argument.
30710    path="$complete"
30711    arguments="EOL"
30712    new_path=`$CYGPATH -u "$path"`
30713    new_path=`$WHICH "$new_path" 2> /dev/null`
30714    # bat and cmd files are not always considered executable in cygwin causing which
30715    # to not find them
30716    if test "x$new_path" = x \
30717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30719      new_path=`$CYGPATH -u "$path"`
30720    fi
30721    if test "x$new_path" = x; then
30722      # It's still not found. Now this is an unrecoverable error.
30723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30724$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30725      has_space=`$ECHO "$complete" | $GREP " "`
30726      if test "x$has_space" != x; then
30727        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30728$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30729      fi
30730      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30731    fi
30732  fi
30733
30734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30737  # "foo.exe" is OK but "foo" is an error.
30738  #
30739  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30740  # It is also a way to make sure we got the proper file name for the real test later on.
30741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30742  if test "x$test_shortpath" = x; then
30743    # Short path failed, file does not exist as specified.
30744    # Try adding .exe or .cmd
30745    if test -f "${new_path}.exe"; then
30746      input_to_shortpath="${new_path}.exe"
30747    elif test -f "${new_path}.cmd"; then
30748      input_to_shortpath="${new_path}.cmd"
30749    else
30750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30751$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30752      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30753$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30754      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30755    fi
30756  else
30757    input_to_shortpath="$new_path"
30758  fi
30759
30760  # Call helper function which possibly converts this using DOS-style short mode.
30761  # If so, the updated path is stored in $new_path.
30762  new_path="$input_to_shortpath"
30763
30764  input_path="$input_to_shortpath"
30765  # Check if we need to convert this using DOS-style short mode. If the path
30766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30767  # take no chances and rewrite it.
30768  # Note: m4 eats our [], so we need to use [ and ] instead.
30769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30770  if test "x$has_forbidden_chars" != x; then
30771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30775      # Going to short mode and back again did indeed matter. Since short mode is
30776      # case insensitive, let's make it lowercase to improve readability.
30777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30778      # Now convert it back to Unix-style (cygpath)
30779      input_path=`$CYGPATH -u "$shortmode_path"`
30780      new_path="$input_path"
30781    fi
30782  fi
30783
30784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30785  if test "x$test_cygdrive_prefix" = x; then
30786    # As a simple fix, exclude /usr/bin since it's not a real path.
30787    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30789      # a path prefixed by /cygdrive for fixpath to work.
30790      new_path="$CYGWIN_ROOT_PATH$input_path"
30791    fi
30792  fi
30793
30794  # remove trailing .exe if any
30795  new_path="${new_path/%.exe/}"
30796
30797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30798
30799  # First separate the path from the arguments. This will split at the first
30800  # space.
30801  complete="$CXX"
30802  path="${complete%% *}"
30803  tmp="$complete EOL"
30804  arguments="${tmp#* }"
30805
30806  # Input might be given as Windows format, start by converting to
30807  # unix format.
30808  new_path="$path"
30809
30810  windows_path="$new_path"
30811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30812    unix_path=`$CYGPATH -u "$windows_path"`
30813    new_path="$unix_path"
30814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30816    new_path="$unix_path"
30817  fi
30818
30819
30820  # Now try to locate executable using which
30821  new_path=`$WHICH "$new_path" 2> /dev/null`
30822
30823  if test "x$new_path" = x; then
30824    # Oops. Which didn't find the executable.
30825    # The splitting of arguments from the executable at a space might have been incorrect,
30826    # since paths with space are more likely in Windows. Give it another try with the whole
30827    # argument.
30828    path="$complete"
30829    arguments="EOL"
30830    new_path="$path"
30831
30832  windows_path="$new_path"
30833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30834    unix_path=`$CYGPATH -u "$windows_path"`
30835    new_path="$unix_path"
30836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30838    new_path="$unix_path"
30839  fi
30840
30841
30842    new_path=`$WHICH "$new_path" 2> /dev/null`
30843    # bat and cmd files are not always considered executable in MSYS causing which
30844    # to not find them
30845    if test "x$new_path" = x \
30846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30848      new_path="$path"
30849
30850  windows_path="$new_path"
30851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30852    unix_path=`$CYGPATH -u "$windows_path"`
30853    new_path="$unix_path"
30854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30856    new_path="$unix_path"
30857  fi
30858
30859    fi
30860
30861    if test "x$new_path" = x; then
30862      # It's still not found. Now this is an unrecoverable error.
30863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30864$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30865      has_space=`$ECHO "$complete" | $GREP " "`
30866      if test "x$has_space" != x; then
30867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30869      fi
30870      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30871    fi
30872  fi
30873
30874  # Now new_path has a complete unix path to the binary
30875  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30876    # Keep paths in /bin as-is, but remove trailing .exe if any
30877    new_path="${new_path/%.exe/}"
30878    # Do not save /bin paths to all_fixpath_prefixes!
30879  else
30880    # Not in mixed or Windows style, start by that.
30881    new_path=`cmd //c echo $new_path`
30882
30883  input_path="$new_path"
30884  # Check if we need to convert this using DOS-style short mode. If the path
30885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30886  # take no chances and rewrite it.
30887  # Note: m4 eats our [], so we need to use [ and ] instead.
30888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30889  if test "x$has_forbidden_chars" != x; then
30890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30892  fi
30893
30894    # Output is in $new_path
30895
30896  windows_path="$new_path"
30897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30898    unix_path=`$CYGPATH -u "$windows_path"`
30899    new_path="$unix_path"
30900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30902    new_path="$unix_path"
30903  fi
30904
30905    # remove trailing .exe if any
30906    new_path="${new_path/%.exe/}"
30907
30908    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30909    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30910  fi
30911
30912    else
30913      # We're on a unix platform. Hooray! :)
30914      # First separate the path from the arguments. This will split at the first
30915      # space.
30916      complete="$CXX"
30917      path="${complete%% *}"
30918      tmp="$complete EOL"
30919      arguments="${tmp#* }"
30920
30921      # Cannot rely on the command "which" here since it doesn't always work.
30922      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30923      if test -z "$is_absolute_path"; then
30924        # Path to executable is not absolute. Find it.
30925        IFS_save="$IFS"
30926        IFS=:
30927        for p in $PATH; do
30928          if test -f "$p/$path" && test -x "$p/$path"; then
30929            new_path="$p/$path"
30930            break
30931          fi
30932        done
30933        IFS="$IFS_save"
30934      else
30935        # This is an absolute path, we can use it without further modifications.
30936        new_path="$path"
30937      fi
30938
30939      if test "x$new_path" = x; then
30940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30941$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30942        has_space=`$ECHO "$complete" | $GREP " "`
30943        if test "x$has_space" != x; then
30944          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30945$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30946        fi
30947        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30948      fi
30949    fi
30950
30951    # Now join together the path and the arguments once again
30952    if test "x$arguments" != xEOL; then
30953      new_complete="$new_path ${arguments% *}"
30954    else
30955      new_complete="$new_path"
30956    fi
30957
30958    if test "x$complete" != "x$new_complete"; then
30959      CXX="$new_complete"
30960      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30961$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30962    fi
30963  fi
30964
30965  TEST_COMPILER="$CXX"
30966  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30967  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30968  if test "x$OPENJDK_BUILD_OS" != xaix; then
30969    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30971$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30972
30973  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30974    # Follow a chain of symbolic links. Use readlink
30975    # where it exists, else fall back to horribly
30976    # complicated shell code.
30977    if test "x$READLINK_TESTED" != yes; then
30978      # On MacOSX there is a readlink tool with a different
30979      # purpose than the GNU readlink tool. Check the found readlink.
30980      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30981      if test "x$ISGNU" = x; then
30982        # A readlink that we do not know how to use.
30983        # Are there other non-GNU readlinks out there?
30984        READLINK_TESTED=yes
30985        READLINK=
30986      fi
30987    fi
30988
30989    if test "x$READLINK" != x; then
30990      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30991    else
30992      # Save the current directory for restoring afterwards
30993      STARTDIR=$PWD
30994      COUNTER=0
30995      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30996      sym_link_file=`$BASENAME $TEST_COMPILER`
30997      cd $sym_link_dir
30998      # Use -P flag to resolve symlinks in directories.
30999      cd `$THEPWDCMD -P`
31000      sym_link_dir=`$THEPWDCMD -P`
31001      # Resolve file symlinks
31002      while test $COUNTER -lt 20; do
31003        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31004        if test "x$ISLINK" == x; then
31005          # This is not a symbolic link! We are done!
31006          break
31007        fi
31008        # Again resolve directory symlinks since the target of the just found
31009        # link could be in a different directory
31010        cd `$DIRNAME $ISLINK`
31011        sym_link_dir=`$THEPWDCMD -P`
31012        sym_link_file=`$BASENAME $ISLINK`
31013        let COUNTER=COUNTER+1
31014      done
31015      cd $STARTDIR
31016      TEST_COMPILER=$sym_link_dir/$sym_link_file
31017    fi
31018  fi
31019
31020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31021$as_echo "$TEST_COMPILER" >&6; }
31022  fi
31023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31024$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31025
31026  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31027  if test "x$COMPILER_BASENAME" = "xccache"; then
31028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31029$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31030    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31031    # We want to control ccache invocation ourselves, so ignore this cc and try
31032    # searching again.
31033
31034    # Remove the path to the fake ccache cc from the PATH
31035    RETRY_COMPILER_SAVED_PATH="$PATH"
31036    COMPILER_DIRNAME=`$DIRNAME $CXX`
31037    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31038
31039    # Try again looking for our compiler
31040    if test -n "$ac_tool_prefix"; then
31041  for ac_prog in $TOOLCHAIN_CXX_BINARY
31042  do
31043    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31046$as_echo_n "checking for $ac_word... " >&6; }
31047if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31048  $as_echo_n "(cached) " >&6
31049else
31050  if test -n "$PROPER_COMPILER_CXX"; then
31051  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31052else
31053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31054for as_dir in $PATH
31055do
31056  IFS=$as_save_IFS
31057  test -z "$as_dir" && as_dir=.
31058    for ac_exec_ext in '' $ac_executable_extensions; do
31059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31060    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31062    break 2
31063  fi
31064done
31065  done
31066IFS=$as_save_IFS
31067
31068fi
31069fi
31070PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31071if test -n "$PROPER_COMPILER_CXX"; then
31072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31073$as_echo "$PROPER_COMPILER_CXX" >&6; }
31074else
31075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31076$as_echo "no" >&6; }
31077fi
31078
31079
31080    test -n "$PROPER_COMPILER_CXX" && break
31081  done
31082fi
31083if test -z "$PROPER_COMPILER_CXX"; then
31084  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31085  for ac_prog in $TOOLCHAIN_CXX_BINARY
31086do
31087  # Extract the first word of "$ac_prog", so it can be a program name with args.
31088set dummy $ac_prog; ac_word=$2
31089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31090$as_echo_n "checking for $ac_word... " >&6; }
31091if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31092  $as_echo_n "(cached) " >&6
31093else
31094  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31095  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31096else
31097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31098for as_dir in $PATH
31099do
31100  IFS=$as_save_IFS
31101  test -z "$as_dir" && as_dir=.
31102    for ac_exec_ext in '' $ac_executable_extensions; do
31103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31104    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31106    break 2
31107  fi
31108done
31109  done
31110IFS=$as_save_IFS
31111
31112fi
31113fi
31114ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31115if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31117$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31118else
31119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31120$as_echo "no" >&6; }
31121fi
31122
31123
31124  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31125done
31126
31127  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31128    PROPER_COMPILER_CXX=""
31129  else
31130    case $cross_compiling:$ac_tool_warned in
31131yes:)
31132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31134ac_tool_warned=yes ;;
31135esac
31136    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31137  fi
31138fi
31139
31140
31141  # Only process if variable expands to non-empty
31142
31143  if test "x$PROPER_COMPILER_CXX" != x; then
31144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31145
31146  # First separate the path from the arguments. This will split at the first
31147  # space.
31148  complete="$PROPER_COMPILER_CXX"
31149  path="${complete%% *}"
31150  tmp="$complete EOL"
31151  arguments="${tmp#* }"
31152
31153  # Input might be given as Windows format, start by converting to
31154  # unix format.
31155  new_path=`$CYGPATH -u "$path"`
31156
31157  # Now try to locate executable using which
31158  new_path=`$WHICH "$new_path" 2> /dev/null`
31159  # bat and cmd files are not always considered executable in cygwin causing which
31160  # to not find them
31161  if test "x$new_path" = x \
31162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31164    new_path=`$CYGPATH -u "$path"`
31165  fi
31166  if test "x$new_path" = x; then
31167    # Oops. Which didn't find the executable.
31168    # The splitting of arguments from the executable at a space might have been incorrect,
31169    # since paths with space are more likely in Windows. Give it another try with the whole
31170    # argument.
31171    path="$complete"
31172    arguments="EOL"
31173    new_path=`$CYGPATH -u "$path"`
31174    new_path=`$WHICH "$new_path" 2> /dev/null`
31175    # bat and cmd files are not always considered executable in cygwin causing which
31176    # to not find them
31177    if test "x$new_path" = x \
31178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31180      new_path=`$CYGPATH -u "$path"`
31181    fi
31182    if test "x$new_path" = x; then
31183      # It's still not found. Now this is an unrecoverable error.
31184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31185$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31186      has_space=`$ECHO "$complete" | $GREP " "`
31187      if test "x$has_space" != x; then
31188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31190      fi
31191      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31192    fi
31193  fi
31194
31195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31198  # "foo.exe" is OK but "foo" is an error.
31199  #
31200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31201  # It is also a way to make sure we got the proper file name for the real test later on.
31202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31203  if test "x$test_shortpath" = x; then
31204    # Short path failed, file does not exist as specified.
31205    # Try adding .exe or .cmd
31206    if test -f "${new_path}.exe"; then
31207      input_to_shortpath="${new_path}.exe"
31208    elif test -f "${new_path}.cmd"; then
31209      input_to_shortpath="${new_path}.cmd"
31210    else
31211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31212$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31215      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31216    fi
31217  else
31218    input_to_shortpath="$new_path"
31219  fi
31220
31221  # Call helper function which possibly converts this using DOS-style short mode.
31222  # If so, the updated path is stored in $new_path.
31223  new_path="$input_to_shortpath"
31224
31225  input_path="$input_to_shortpath"
31226  # Check if we need to convert this using DOS-style short mode. If the path
31227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31228  # take no chances and rewrite it.
31229  # Note: m4 eats our [], so we need to use [ and ] instead.
31230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31231  if test "x$has_forbidden_chars" != x; then
31232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31236      # Going to short mode and back again did indeed matter. Since short mode is
31237      # case insensitive, let's make it lowercase to improve readability.
31238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31239      # Now convert it back to Unix-style (cygpath)
31240      input_path=`$CYGPATH -u "$shortmode_path"`
31241      new_path="$input_path"
31242    fi
31243  fi
31244
31245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31246  if test "x$test_cygdrive_prefix" = x; then
31247    # As a simple fix, exclude /usr/bin since it's not a real path.
31248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31250      # a path prefixed by /cygdrive for fixpath to work.
31251      new_path="$CYGWIN_ROOT_PATH$input_path"
31252    fi
31253  fi
31254
31255  # remove trailing .exe if any
31256  new_path="${new_path/%.exe/}"
31257
31258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31259
31260  # First separate the path from the arguments. This will split at the first
31261  # space.
31262  complete="$PROPER_COMPILER_CXX"
31263  path="${complete%% *}"
31264  tmp="$complete EOL"
31265  arguments="${tmp#* }"
31266
31267  # Input might be given as Windows format, start by converting to
31268  # unix format.
31269  new_path="$path"
31270
31271  windows_path="$new_path"
31272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31273    unix_path=`$CYGPATH -u "$windows_path"`
31274    new_path="$unix_path"
31275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31277    new_path="$unix_path"
31278  fi
31279
31280
31281  # Now try to locate executable using which
31282  new_path=`$WHICH "$new_path" 2> /dev/null`
31283
31284  if test "x$new_path" = x; then
31285    # Oops. Which didn't find the executable.
31286    # The splitting of arguments from the executable at a space might have been incorrect,
31287    # since paths with space are more likely in Windows. Give it another try with the whole
31288    # argument.
31289    path="$complete"
31290    arguments="EOL"
31291    new_path="$path"
31292
31293  windows_path="$new_path"
31294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31295    unix_path=`$CYGPATH -u "$windows_path"`
31296    new_path="$unix_path"
31297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31299    new_path="$unix_path"
31300  fi
31301
31302
31303    new_path=`$WHICH "$new_path" 2> /dev/null`
31304    # bat and cmd files are not always considered executable in MSYS causing which
31305    # to not find them
31306    if test "x$new_path" = x \
31307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31309      new_path="$path"
31310
31311  windows_path="$new_path"
31312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31313    unix_path=`$CYGPATH -u "$windows_path"`
31314    new_path="$unix_path"
31315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31317    new_path="$unix_path"
31318  fi
31319
31320    fi
31321
31322    if test "x$new_path" = x; then
31323      # It's still not found. Now this is an unrecoverable error.
31324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31325$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31326      has_space=`$ECHO "$complete" | $GREP " "`
31327      if test "x$has_space" != x; then
31328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31330      fi
31331      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31332    fi
31333  fi
31334
31335  # Now new_path has a complete unix path to the binary
31336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31337    # Keep paths in /bin as-is, but remove trailing .exe if any
31338    new_path="${new_path/%.exe/}"
31339    # Do not save /bin paths to all_fixpath_prefixes!
31340  else
31341    # Not in mixed or Windows style, start by that.
31342    new_path=`cmd //c echo $new_path`
31343
31344  input_path="$new_path"
31345  # Check if we need to convert this using DOS-style short mode. If the path
31346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31347  # take no chances and rewrite it.
31348  # Note: m4 eats our [], so we need to use [ and ] instead.
31349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31350  if test "x$has_forbidden_chars" != x; then
31351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31353  fi
31354
31355    # Output is in $new_path
31356
31357  windows_path="$new_path"
31358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31359    unix_path=`$CYGPATH -u "$windows_path"`
31360    new_path="$unix_path"
31361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31363    new_path="$unix_path"
31364  fi
31365
31366    # remove trailing .exe if any
31367    new_path="${new_path/%.exe/}"
31368
31369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31371  fi
31372
31373    else
31374      # We're on a unix platform. Hooray! :)
31375      # First separate the path from the arguments. This will split at the first
31376      # space.
31377      complete="$PROPER_COMPILER_CXX"
31378      path="${complete%% *}"
31379      tmp="$complete EOL"
31380      arguments="${tmp#* }"
31381
31382      # Cannot rely on the command "which" here since it doesn't always work.
31383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31384      if test -z "$is_absolute_path"; then
31385        # Path to executable is not absolute. Find it.
31386        IFS_save="$IFS"
31387        IFS=:
31388        for p in $PATH; do
31389          if test -f "$p/$path" && test -x "$p/$path"; then
31390            new_path="$p/$path"
31391            break
31392          fi
31393        done
31394        IFS="$IFS_save"
31395      else
31396        # This is an absolute path, we can use it without further modifications.
31397        new_path="$path"
31398      fi
31399
31400      if test "x$new_path" = x; then
31401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31402$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31403        has_space=`$ECHO "$complete" | $GREP " "`
31404        if test "x$has_space" != x; then
31405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31407        fi
31408        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31409      fi
31410    fi
31411
31412    # Now join together the path and the arguments once again
31413    if test "x$arguments" != xEOL; then
31414      new_complete="$new_path ${arguments% *}"
31415    else
31416      new_complete="$new_path"
31417    fi
31418
31419    if test "x$complete" != "x$new_complete"; then
31420      PROPER_COMPILER_CXX="$new_complete"
31421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31422$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31423    fi
31424  fi
31425
31426    PATH="$RETRY_COMPILER_SAVED_PATH"
31427
31428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31429$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31430
31431  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31432    # Follow a chain of symbolic links. Use readlink
31433    # where it exists, else fall back to horribly
31434    # complicated shell code.
31435    if test "x$READLINK_TESTED" != yes; then
31436      # On MacOSX there is a readlink tool with a different
31437      # purpose than the GNU readlink tool. Check the found readlink.
31438      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31439      if test "x$ISGNU" = x; then
31440        # A readlink that we do not know how to use.
31441        # Are there other non-GNU readlinks out there?
31442        READLINK_TESTED=yes
31443        READLINK=
31444      fi
31445    fi
31446
31447    if test "x$READLINK" != x; then
31448      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31449    else
31450      # Save the current directory for restoring afterwards
31451      STARTDIR=$PWD
31452      COUNTER=0
31453      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31454      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31455      cd $sym_link_dir
31456      # Use -P flag to resolve symlinks in directories.
31457      cd `$THEPWDCMD -P`
31458      sym_link_dir=`$THEPWDCMD -P`
31459      # Resolve file symlinks
31460      while test $COUNTER -lt 20; do
31461        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31462        if test "x$ISLINK" == x; then
31463          # This is not a symbolic link! We are done!
31464          break
31465        fi
31466        # Again resolve directory symlinks since the target of the just found
31467        # link could be in a different directory
31468        cd `$DIRNAME $ISLINK`
31469        sym_link_dir=`$THEPWDCMD -P`
31470        sym_link_file=`$BASENAME $ISLINK`
31471        let COUNTER=COUNTER+1
31472      done
31473      cd $STARTDIR
31474      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31475    fi
31476  fi
31477
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31479$as_echo "$PROPER_COMPILER_CXX" >&6; }
31480    CXX="$PROPER_COMPILER_CXX"
31481  else
31482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31483$as_echo "no, keeping CXX" >&6; }
31484  fi
31485
31486
31487  COMPILER=$CXX
31488  COMPILER_NAME=$COMPILER_NAME
31489
31490  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31491    # cc -V output typically looks like
31492    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31493    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31494    # Check that this is likely to be the Solaris Studio cc.
31495    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31496    if test $? -ne 0; then
31497      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31498      { $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
31499$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31500      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31501$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31502      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31503$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31504      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31505    fi
31506    # Remove usage instructions (if present), and
31507    # collapse compiler output into a single line
31508    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31509        $SED -e 's/ *[Uu]sage:.*//'`
31510    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31511        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31512  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31513    # xlc -qversion output typically looks like
31514    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31515    #     Version: 11.01.0000.0015
31516    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31517    # Check that this is likely to be the IBM XL C compiler.
31518    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31519    if test $? -ne 0; then
31520      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31521      { $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
31522$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31523      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31524$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31525      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31526$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31527      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31528    fi
31529    # Collapse compiler output into a single line
31530    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31531    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31532        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31533  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31534    # There is no specific version flag, but all output starts with a version string.
31535    # First line typically looks something like:
31536    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31537    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31538    # Check that this is likely to be Microsoft CL.EXE.
31539    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31540    if test $? -ne 0; then
31541      { $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
31542$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31543      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31544$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31545      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31546    fi
31547    # Collapse compiler output into a single line
31548    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31549    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31550        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31551  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31552    # gcc --version output typically looks like
31553    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31554    #     Copyright (C) 2013 Free Software Foundation, Inc.
31555    #     This is free software; see the source for copying conditions.  There is NO
31556    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31557    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31558    # Check that this is likely to be GCC.
31559    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31560    if test $? -ne 0; then
31561      { $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
31562$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31563      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31564$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31565      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31566    fi
31567    # Remove Copyright and legalese from version string, and
31568    # collapse into a single line
31569    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31570        $SED -e 's/ *Copyright .*//'`
31571    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31572        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31573  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31574    # clang --version output typically looks like
31575    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31576    #    clang version 3.3 (tags/RELEASE_33/final)
31577    # or
31578    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31579    #    Target: x86_64-pc-linux-gnu
31580    #    Thread model: posix
31581    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31582    # Check that this is likely to be clang
31583    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31584    if test $? -ne 0; then
31585      { $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
31586$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31587      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31588$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31589      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31590    fi
31591    # Collapse compiler output into a single line
31592    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31593    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31594        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31595  else
31596      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31597  fi
31598  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31599  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31600  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31601  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31602
31603  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31604$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31605
31606
31607  # Now that we have resolved CXX ourself, let autoconf have its go at it
31608  ac_ext=cpp
31609ac_cpp='$CXXCPP $CPPFLAGS'
31610ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31611ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31612ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31613if test -z "$CXX"; then
31614  if test -n "$CCC"; then
31615    CXX=$CCC
31616  else
31617    if test -n "$ac_tool_prefix"; then
31618  for ac_prog in $CXX
31619  do
31620    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31621set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31623$as_echo_n "checking for $ac_word... " >&6; }
31624if ${ac_cv_prog_CXX+:} false; then :
31625  $as_echo_n "(cached) " >&6
31626else
31627  if test -n "$CXX"; then
31628  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31629else
31630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31631for as_dir in $PATH
31632do
31633  IFS=$as_save_IFS
31634  test -z "$as_dir" && as_dir=.
31635    for ac_exec_ext in '' $ac_executable_extensions; do
31636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31637    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31639    break 2
31640  fi
31641done
31642  done
31643IFS=$as_save_IFS
31644
31645fi
31646fi
31647CXX=$ac_cv_prog_CXX
31648if test -n "$CXX"; then
31649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31650$as_echo "$CXX" >&6; }
31651else
31652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31653$as_echo "no" >&6; }
31654fi
31655
31656
31657    test -n "$CXX" && break
31658  done
31659fi
31660if test -z "$CXX"; then
31661  ac_ct_CXX=$CXX
31662  for ac_prog in $CXX
31663do
31664  # Extract the first word of "$ac_prog", so it can be a program name with args.
31665set dummy $ac_prog; ac_word=$2
31666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31667$as_echo_n "checking for $ac_word... " >&6; }
31668if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31669  $as_echo_n "(cached) " >&6
31670else
31671  if test -n "$ac_ct_CXX"; then
31672  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31673else
31674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31675for as_dir in $PATH
31676do
31677  IFS=$as_save_IFS
31678  test -z "$as_dir" && as_dir=.
31679    for ac_exec_ext in '' $ac_executable_extensions; do
31680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31681    ac_cv_prog_ac_ct_CXX="$ac_prog"
31682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31683    break 2
31684  fi
31685done
31686  done
31687IFS=$as_save_IFS
31688
31689fi
31690fi
31691ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31692if test -n "$ac_ct_CXX"; then
31693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31694$as_echo "$ac_ct_CXX" >&6; }
31695else
31696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31697$as_echo "no" >&6; }
31698fi
31699
31700
31701  test -n "$ac_ct_CXX" && break
31702done
31703
31704  if test "x$ac_ct_CXX" = x; then
31705    CXX="g++"
31706  else
31707    case $cross_compiling:$ac_tool_warned in
31708yes:)
31709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31711ac_tool_warned=yes ;;
31712esac
31713    CXX=$ac_ct_CXX
31714  fi
31715fi
31716
31717  fi
31718fi
31719# Provide some information about the compiler.
31720$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31721set X $ac_compile
31722ac_compiler=$2
31723for ac_option in --version -v -V -qversion; do
31724  { { ac_try="$ac_compiler $ac_option >&5"
31725case "(($ac_try" in
31726  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31727  *) ac_try_echo=$ac_try;;
31728esac
31729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31730$as_echo "$ac_try_echo"; } >&5
31731  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31732  ac_status=$?
31733  if test -s conftest.err; then
31734    sed '10a\
31735... rest of stderr output deleted ...
31736         10q' conftest.err >conftest.er1
31737    cat conftest.er1 >&5
31738  fi
31739  rm -f conftest.er1 conftest.err
31740  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31741  test $ac_status = 0; }
31742done
31743
31744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31745$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31746if ${ac_cv_cxx_compiler_gnu+:} false; then :
31747  $as_echo_n "(cached) " >&6
31748else
31749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31750/* end confdefs.h.  */
31751
31752int
31753main ()
31754{
31755#ifndef __GNUC__
31756       choke me
31757#endif
31758
31759  ;
31760  return 0;
31761}
31762_ACEOF
31763if ac_fn_cxx_try_compile "$LINENO"; then :
31764  ac_compiler_gnu=yes
31765else
31766  ac_compiler_gnu=no
31767fi
31768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31769ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31770
31771fi
31772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31773$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31774if test $ac_compiler_gnu = yes; then
31775  GXX=yes
31776else
31777  GXX=
31778fi
31779ac_test_CXXFLAGS=${CXXFLAGS+set}
31780ac_save_CXXFLAGS=$CXXFLAGS
31781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31782$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31783if ${ac_cv_prog_cxx_g+:} false; then :
31784  $as_echo_n "(cached) " >&6
31785else
31786  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31787   ac_cxx_werror_flag=yes
31788   ac_cv_prog_cxx_g=no
31789   CXXFLAGS="-g"
31790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31791/* end confdefs.h.  */
31792
31793int
31794main ()
31795{
31796
31797  ;
31798  return 0;
31799}
31800_ACEOF
31801if ac_fn_cxx_try_compile "$LINENO"; then :
31802  ac_cv_prog_cxx_g=yes
31803else
31804  CXXFLAGS=""
31805      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31806/* end confdefs.h.  */
31807
31808int
31809main ()
31810{
31811
31812  ;
31813  return 0;
31814}
31815_ACEOF
31816if ac_fn_cxx_try_compile "$LINENO"; then :
31817
31818else
31819  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31820	 CXXFLAGS="-g"
31821	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31822/* end confdefs.h.  */
31823
31824int
31825main ()
31826{
31827
31828  ;
31829  return 0;
31830}
31831_ACEOF
31832if ac_fn_cxx_try_compile "$LINENO"; then :
31833  ac_cv_prog_cxx_g=yes
31834fi
31835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31836fi
31837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31838fi
31839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31840   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31841fi
31842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31843$as_echo "$ac_cv_prog_cxx_g" >&6; }
31844if test "$ac_test_CXXFLAGS" = set; then
31845  CXXFLAGS=$ac_save_CXXFLAGS
31846elif test $ac_cv_prog_cxx_g = yes; then
31847  if test "$GXX" = yes; then
31848    CXXFLAGS="-g -O2"
31849  else
31850    CXXFLAGS="-g"
31851  fi
31852else
31853  if test "$GXX" = yes; then
31854    CXXFLAGS="-O2"
31855  else
31856    CXXFLAGS=
31857  fi
31858fi
31859ac_ext=cpp
31860ac_cpp='$CXXCPP $CPPFLAGS'
31861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31864
31865
31866  #
31867  # Setup the preprocessor (CPP and CXXCPP)
31868  #
31869  ac_ext=c
31870ac_cpp='$CPP $CPPFLAGS'
31871ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31872ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31873ac_compiler_gnu=$ac_cv_c_compiler_gnu
31874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31875$as_echo_n "checking how to run the C preprocessor... " >&6; }
31876# On Suns, sometimes $CPP names a directory.
31877if test -n "$CPP" && test -d "$CPP"; then
31878  CPP=
31879fi
31880if test -z "$CPP"; then
31881  if ${ac_cv_prog_CPP+:} false; then :
31882  $as_echo_n "(cached) " >&6
31883else
31884      # Double quotes because CPP needs to be expanded
31885    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31886    do
31887      ac_preproc_ok=false
31888for ac_c_preproc_warn_flag in '' yes
31889do
31890  # Use a header file that comes with gcc, so configuring glibc
31891  # with a fresh cross-compiler works.
31892  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31893  # <limits.h> exists even on freestanding compilers.
31894  # On the NeXT, cc -E runs the code through the compiler's parser,
31895  # not just through cpp. "Syntax error" is here to catch this case.
31896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31897/* end confdefs.h.  */
31898#ifdef __STDC__
31899# include <limits.h>
31900#else
31901# include <assert.h>
31902#endif
31903		     Syntax error
31904_ACEOF
31905if ac_fn_c_try_cpp "$LINENO"; then :
31906
31907else
31908  # Broken: fails on valid input.
31909continue
31910fi
31911rm -f conftest.err conftest.i conftest.$ac_ext
31912
31913  # OK, works on sane cases.  Now check whether nonexistent headers
31914  # can be detected and how.
31915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31916/* end confdefs.h.  */
31917#include <ac_nonexistent.h>
31918_ACEOF
31919if ac_fn_c_try_cpp "$LINENO"; then :
31920  # Broken: success on invalid input.
31921continue
31922else
31923  # Passes both tests.
31924ac_preproc_ok=:
31925break
31926fi
31927rm -f conftest.err conftest.i conftest.$ac_ext
31928
31929done
31930# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31931rm -f conftest.i conftest.err conftest.$ac_ext
31932if $ac_preproc_ok; then :
31933  break
31934fi
31935
31936    done
31937    ac_cv_prog_CPP=$CPP
31938
31939fi
31940  CPP=$ac_cv_prog_CPP
31941else
31942  ac_cv_prog_CPP=$CPP
31943fi
31944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31945$as_echo "$CPP" >&6; }
31946ac_preproc_ok=false
31947for ac_c_preproc_warn_flag in '' yes
31948do
31949  # Use a header file that comes with gcc, so configuring glibc
31950  # with a fresh cross-compiler works.
31951  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31952  # <limits.h> exists even on freestanding compilers.
31953  # On the NeXT, cc -E runs the code through the compiler's parser,
31954  # not just through cpp. "Syntax error" is here to catch this case.
31955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31956/* end confdefs.h.  */
31957#ifdef __STDC__
31958# include <limits.h>
31959#else
31960# include <assert.h>
31961#endif
31962		     Syntax error
31963_ACEOF
31964if ac_fn_c_try_cpp "$LINENO"; then :
31965
31966else
31967  # Broken: fails on valid input.
31968continue
31969fi
31970rm -f conftest.err conftest.i conftest.$ac_ext
31971
31972  # OK, works on sane cases.  Now check whether nonexistent headers
31973  # can be detected and how.
31974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31975/* end confdefs.h.  */
31976#include <ac_nonexistent.h>
31977_ACEOF
31978if ac_fn_c_try_cpp "$LINENO"; then :
31979  # Broken: success on invalid input.
31980continue
31981else
31982  # Passes both tests.
31983ac_preproc_ok=:
31984break
31985fi
31986rm -f conftest.err conftest.i conftest.$ac_ext
31987
31988done
31989# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31990rm -f conftest.i conftest.err conftest.$ac_ext
31991if $ac_preproc_ok; then :
31992
31993else
31994  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31996as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31997See \`config.log' for more details" "$LINENO" 5; }
31998fi
31999
32000ac_ext=cpp
32001ac_cpp='$CXXCPP $CPPFLAGS'
32002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32005
32006
32007  # Only process if variable expands to non-empty
32008
32009  if test "x$CPP" != x; then
32010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32011
32012  # First separate the path from the arguments. This will split at the first
32013  # space.
32014  complete="$CPP"
32015  path="${complete%% *}"
32016  tmp="$complete EOL"
32017  arguments="${tmp#* }"
32018
32019  # Input might be given as Windows format, start by converting to
32020  # unix format.
32021  new_path=`$CYGPATH -u "$path"`
32022
32023  # Now try to locate executable using which
32024  new_path=`$WHICH "$new_path" 2> /dev/null`
32025  # bat and cmd files are not always considered executable in cygwin causing which
32026  # to not find them
32027  if test "x$new_path" = x \
32028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32030    new_path=`$CYGPATH -u "$path"`
32031  fi
32032  if test "x$new_path" = x; then
32033    # Oops. Which didn't find the executable.
32034    # The splitting of arguments from the executable at a space might have been incorrect,
32035    # since paths with space are more likely in Windows. Give it another try with the whole
32036    # argument.
32037    path="$complete"
32038    arguments="EOL"
32039    new_path=`$CYGPATH -u "$path"`
32040    new_path=`$WHICH "$new_path" 2> /dev/null`
32041    # bat and cmd files are not always considered executable in cygwin causing which
32042    # to not find them
32043    if test "x$new_path" = x \
32044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32046      new_path=`$CYGPATH -u "$path"`
32047    fi
32048    if test "x$new_path" = x; then
32049      # It's still not found. Now this is an unrecoverable error.
32050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32051$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32052      has_space=`$ECHO "$complete" | $GREP " "`
32053      if test "x$has_space" != x; then
32054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32056      fi
32057      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32058    fi
32059  fi
32060
32061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32064  # "foo.exe" is OK but "foo" is an error.
32065  #
32066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32067  # It is also a way to make sure we got the proper file name for the real test later on.
32068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32069  if test "x$test_shortpath" = x; then
32070    # Short path failed, file does not exist as specified.
32071    # Try adding .exe or .cmd
32072    if test -f "${new_path}.exe"; then
32073      input_to_shortpath="${new_path}.exe"
32074    elif test -f "${new_path}.cmd"; then
32075      input_to_shortpath="${new_path}.cmd"
32076    else
32077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
32078$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
32079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32081      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32082    fi
32083  else
32084    input_to_shortpath="$new_path"
32085  fi
32086
32087  # Call helper function which possibly converts this using DOS-style short mode.
32088  # If so, the updated path is stored in $new_path.
32089  new_path="$input_to_shortpath"
32090
32091  input_path="$input_to_shortpath"
32092  # Check if we need to convert this using DOS-style short mode. If the path
32093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32094  # take no chances and rewrite it.
32095  # Note: m4 eats our [], so we need to use [ and ] instead.
32096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32097  if test "x$has_forbidden_chars" != x; then
32098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32102      # Going to short mode and back again did indeed matter. Since short mode is
32103      # case insensitive, let's make it lowercase to improve readability.
32104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32105      # Now convert it back to Unix-style (cygpath)
32106      input_path=`$CYGPATH -u "$shortmode_path"`
32107      new_path="$input_path"
32108    fi
32109  fi
32110
32111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32112  if test "x$test_cygdrive_prefix" = x; then
32113    # As a simple fix, exclude /usr/bin since it's not a real path.
32114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32116      # a path prefixed by /cygdrive for fixpath to work.
32117      new_path="$CYGWIN_ROOT_PATH$input_path"
32118    fi
32119  fi
32120
32121  # remove trailing .exe if any
32122  new_path="${new_path/%.exe/}"
32123
32124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32125
32126  # First separate the path from the arguments. This will split at the first
32127  # space.
32128  complete="$CPP"
32129  path="${complete%% *}"
32130  tmp="$complete EOL"
32131  arguments="${tmp#* }"
32132
32133  # Input might be given as Windows format, start by converting to
32134  # unix format.
32135  new_path="$path"
32136
32137  windows_path="$new_path"
32138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32139    unix_path=`$CYGPATH -u "$windows_path"`
32140    new_path="$unix_path"
32141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32143    new_path="$unix_path"
32144  fi
32145
32146
32147  # Now try to locate executable using which
32148  new_path=`$WHICH "$new_path" 2> /dev/null`
32149
32150  if test "x$new_path" = x; then
32151    # Oops. Which didn't find the executable.
32152    # The splitting of arguments from the executable at a space might have been incorrect,
32153    # since paths with space are more likely in Windows. Give it another try with the whole
32154    # argument.
32155    path="$complete"
32156    arguments="EOL"
32157    new_path="$path"
32158
32159  windows_path="$new_path"
32160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32161    unix_path=`$CYGPATH -u "$windows_path"`
32162    new_path="$unix_path"
32163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32165    new_path="$unix_path"
32166  fi
32167
32168
32169    new_path=`$WHICH "$new_path" 2> /dev/null`
32170    # bat and cmd files are not always considered executable in MSYS causing which
32171    # to not find them
32172    if test "x$new_path" = x \
32173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32175      new_path="$path"
32176
32177  windows_path="$new_path"
32178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32179    unix_path=`$CYGPATH -u "$windows_path"`
32180    new_path="$unix_path"
32181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32183    new_path="$unix_path"
32184  fi
32185
32186    fi
32187
32188    if test "x$new_path" = x; then
32189      # It's still not found. Now this is an unrecoverable error.
32190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32191$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32192      has_space=`$ECHO "$complete" | $GREP " "`
32193      if test "x$has_space" != x; then
32194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32196      fi
32197      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32198    fi
32199  fi
32200
32201  # Now new_path has a complete unix path to the binary
32202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32203    # Keep paths in /bin as-is, but remove trailing .exe if any
32204    new_path="${new_path/%.exe/}"
32205    # Do not save /bin paths to all_fixpath_prefixes!
32206  else
32207    # Not in mixed or Windows style, start by that.
32208    new_path=`cmd //c echo $new_path`
32209
32210  input_path="$new_path"
32211  # Check if we need to convert this using DOS-style short mode. If the path
32212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32213  # take no chances and rewrite it.
32214  # Note: m4 eats our [], so we need to use [ and ] instead.
32215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32216  if test "x$has_forbidden_chars" != x; then
32217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32219  fi
32220
32221    # Output is in $new_path
32222
32223  windows_path="$new_path"
32224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32225    unix_path=`$CYGPATH -u "$windows_path"`
32226    new_path="$unix_path"
32227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32229    new_path="$unix_path"
32230  fi
32231
32232    # remove trailing .exe if any
32233    new_path="${new_path/%.exe/}"
32234
32235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32237  fi
32238
32239    else
32240      # We're on a unix platform. Hooray! :)
32241      # First separate the path from the arguments. This will split at the first
32242      # space.
32243      complete="$CPP"
32244      path="${complete%% *}"
32245      tmp="$complete EOL"
32246      arguments="${tmp#* }"
32247
32248      # Cannot rely on the command "which" here since it doesn't always work.
32249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32250      if test -z "$is_absolute_path"; then
32251        # Path to executable is not absolute. Find it.
32252        IFS_save="$IFS"
32253        IFS=:
32254        for p in $PATH; do
32255          if test -f "$p/$path" && test -x "$p/$path"; then
32256            new_path="$p/$path"
32257            break
32258          fi
32259        done
32260        IFS="$IFS_save"
32261      else
32262        # This is an absolute path, we can use it without further modifications.
32263        new_path="$path"
32264      fi
32265
32266      if test "x$new_path" = x; then
32267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32268$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32269        has_space=`$ECHO "$complete" | $GREP " "`
32270        if test "x$has_space" != x; then
32271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32273        fi
32274        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32275      fi
32276    fi
32277
32278    # Now join together the path and the arguments once again
32279    if test "x$arguments" != xEOL; then
32280      new_complete="$new_path ${arguments% *}"
32281    else
32282      new_complete="$new_path"
32283    fi
32284
32285    if test "x$complete" != "x$new_complete"; then
32286      CPP="$new_complete"
32287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32288$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32289    fi
32290  fi
32291
32292  ac_ext=cpp
32293ac_cpp='$CXXCPP $CPPFLAGS'
32294ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32295ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32296ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32298$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32299if test -z "$CXXCPP"; then
32300  if ${ac_cv_prog_CXXCPP+:} false; then :
32301  $as_echo_n "(cached) " >&6
32302else
32303      # Double quotes because CXXCPP needs to be expanded
32304    for CXXCPP in "$CXX -E" "/lib/cpp"
32305    do
32306      ac_preproc_ok=false
32307for ac_cxx_preproc_warn_flag in '' yes
32308do
32309  # Use a header file that comes with gcc, so configuring glibc
32310  # with a fresh cross-compiler works.
32311  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32312  # <limits.h> exists even on freestanding compilers.
32313  # On the NeXT, cc -E runs the code through the compiler's parser,
32314  # not just through cpp. "Syntax error" is here to catch this case.
32315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32316/* end confdefs.h.  */
32317#ifdef __STDC__
32318# include <limits.h>
32319#else
32320# include <assert.h>
32321#endif
32322		     Syntax error
32323_ACEOF
32324if ac_fn_cxx_try_cpp "$LINENO"; then :
32325
32326else
32327  # Broken: fails on valid input.
32328continue
32329fi
32330rm -f conftest.err conftest.i conftest.$ac_ext
32331
32332  # OK, works on sane cases.  Now check whether nonexistent headers
32333  # can be detected and how.
32334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32335/* end confdefs.h.  */
32336#include <ac_nonexistent.h>
32337_ACEOF
32338if ac_fn_cxx_try_cpp "$LINENO"; then :
32339  # Broken: success on invalid input.
32340continue
32341else
32342  # Passes both tests.
32343ac_preproc_ok=:
32344break
32345fi
32346rm -f conftest.err conftest.i conftest.$ac_ext
32347
32348done
32349# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32350rm -f conftest.i conftest.err conftest.$ac_ext
32351if $ac_preproc_ok; then :
32352  break
32353fi
32354
32355    done
32356    ac_cv_prog_CXXCPP=$CXXCPP
32357
32358fi
32359  CXXCPP=$ac_cv_prog_CXXCPP
32360else
32361  ac_cv_prog_CXXCPP=$CXXCPP
32362fi
32363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32364$as_echo "$CXXCPP" >&6; }
32365ac_preproc_ok=false
32366for ac_cxx_preproc_warn_flag in '' yes
32367do
32368  # Use a header file that comes with gcc, so configuring glibc
32369  # with a fresh cross-compiler works.
32370  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32371  # <limits.h> exists even on freestanding compilers.
32372  # On the NeXT, cc -E runs the code through the compiler's parser,
32373  # not just through cpp. "Syntax error" is here to catch this case.
32374  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32375/* end confdefs.h.  */
32376#ifdef __STDC__
32377# include <limits.h>
32378#else
32379# include <assert.h>
32380#endif
32381		     Syntax error
32382_ACEOF
32383if ac_fn_cxx_try_cpp "$LINENO"; then :
32384
32385else
32386  # Broken: fails on valid input.
32387continue
32388fi
32389rm -f conftest.err conftest.i conftest.$ac_ext
32390
32391  # OK, works on sane cases.  Now check whether nonexistent headers
32392  # can be detected and how.
32393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32394/* end confdefs.h.  */
32395#include <ac_nonexistent.h>
32396_ACEOF
32397if ac_fn_cxx_try_cpp "$LINENO"; then :
32398  # Broken: success on invalid input.
32399continue
32400else
32401  # Passes both tests.
32402ac_preproc_ok=:
32403break
32404fi
32405rm -f conftest.err conftest.i conftest.$ac_ext
32406
32407done
32408# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32409rm -f conftest.i conftest.err conftest.$ac_ext
32410if $ac_preproc_ok; then :
32411
32412else
32413  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32415as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32416See \`config.log' for more details" "$LINENO" 5; }
32417fi
32418
32419ac_ext=cpp
32420ac_cpp='$CXXCPP $CPPFLAGS'
32421ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32422ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32423ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32424
32425
32426  # Only process if variable expands to non-empty
32427
32428  if test "x$CXXCPP" != x; then
32429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32430
32431  # First separate the path from the arguments. This will split at the first
32432  # space.
32433  complete="$CXXCPP"
32434  path="${complete%% *}"
32435  tmp="$complete EOL"
32436  arguments="${tmp#* }"
32437
32438  # Input might be given as Windows format, start by converting to
32439  # unix format.
32440  new_path=`$CYGPATH -u "$path"`
32441
32442  # Now try to locate executable using which
32443  new_path=`$WHICH "$new_path" 2> /dev/null`
32444  # bat and cmd files are not always considered executable in cygwin causing which
32445  # to not find them
32446  if test "x$new_path" = x \
32447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32449    new_path=`$CYGPATH -u "$path"`
32450  fi
32451  if test "x$new_path" = x; then
32452    # Oops. Which didn't find the executable.
32453    # The splitting of arguments from the executable at a space might have been incorrect,
32454    # since paths with space are more likely in Windows. Give it another try with the whole
32455    # argument.
32456    path="$complete"
32457    arguments="EOL"
32458    new_path=`$CYGPATH -u "$path"`
32459    new_path=`$WHICH "$new_path" 2> /dev/null`
32460    # bat and cmd files are not always considered executable in cygwin causing which
32461    # to not find them
32462    if test "x$new_path" = x \
32463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32465      new_path=`$CYGPATH -u "$path"`
32466    fi
32467    if test "x$new_path" = x; then
32468      # It's still not found. Now this is an unrecoverable error.
32469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32470$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32471      has_space=`$ECHO "$complete" | $GREP " "`
32472      if test "x$has_space" != x; then
32473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32475      fi
32476      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32477    fi
32478  fi
32479
32480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32483  # "foo.exe" is OK but "foo" is an error.
32484  #
32485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32486  # It is also a way to make sure we got the proper file name for the real test later on.
32487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32488  if test "x$test_shortpath" = x; then
32489    # Short path failed, file does not exist as specified.
32490    # Try adding .exe or .cmd
32491    if test -f "${new_path}.exe"; then
32492      input_to_shortpath="${new_path}.exe"
32493    elif test -f "${new_path}.cmd"; then
32494      input_to_shortpath="${new_path}.cmd"
32495    else
32496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32497$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32500      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32501    fi
32502  else
32503    input_to_shortpath="$new_path"
32504  fi
32505
32506  # Call helper function which possibly converts this using DOS-style short mode.
32507  # If so, the updated path is stored in $new_path.
32508  new_path="$input_to_shortpath"
32509
32510  input_path="$input_to_shortpath"
32511  # Check if we need to convert this using DOS-style short mode. If the path
32512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32513  # take no chances and rewrite it.
32514  # Note: m4 eats our [], so we need to use [ and ] instead.
32515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32516  if test "x$has_forbidden_chars" != x; then
32517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32521      # Going to short mode and back again did indeed matter. Since short mode is
32522      # case insensitive, let's make it lowercase to improve readability.
32523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32524      # Now convert it back to Unix-style (cygpath)
32525      input_path=`$CYGPATH -u "$shortmode_path"`
32526      new_path="$input_path"
32527    fi
32528  fi
32529
32530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32531  if test "x$test_cygdrive_prefix" = x; then
32532    # As a simple fix, exclude /usr/bin since it's not a real path.
32533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32535      # a path prefixed by /cygdrive for fixpath to work.
32536      new_path="$CYGWIN_ROOT_PATH$input_path"
32537    fi
32538  fi
32539
32540  # remove trailing .exe if any
32541  new_path="${new_path/%.exe/}"
32542
32543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32544
32545  # First separate the path from the arguments. This will split at the first
32546  # space.
32547  complete="$CXXCPP"
32548  path="${complete%% *}"
32549  tmp="$complete EOL"
32550  arguments="${tmp#* }"
32551
32552  # Input might be given as Windows format, start by converting to
32553  # unix format.
32554  new_path="$path"
32555
32556  windows_path="$new_path"
32557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32558    unix_path=`$CYGPATH -u "$windows_path"`
32559    new_path="$unix_path"
32560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32562    new_path="$unix_path"
32563  fi
32564
32565
32566  # Now try to locate executable using which
32567  new_path=`$WHICH "$new_path" 2> /dev/null`
32568
32569  if test "x$new_path" = x; then
32570    # Oops. Which didn't find the executable.
32571    # The splitting of arguments from the executable at a space might have been incorrect,
32572    # since paths with space are more likely in Windows. Give it another try with the whole
32573    # argument.
32574    path="$complete"
32575    arguments="EOL"
32576    new_path="$path"
32577
32578  windows_path="$new_path"
32579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32580    unix_path=`$CYGPATH -u "$windows_path"`
32581    new_path="$unix_path"
32582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32584    new_path="$unix_path"
32585  fi
32586
32587
32588    new_path=`$WHICH "$new_path" 2> /dev/null`
32589    # bat and cmd files are not always considered executable in MSYS causing which
32590    # to not find them
32591    if test "x$new_path" = x \
32592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32594      new_path="$path"
32595
32596  windows_path="$new_path"
32597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32598    unix_path=`$CYGPATH -u "$windows_path"`
32599    new_path="$unix_path"
32600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32602    new_path="$unix_path"
32603  fi
32604
32605    fi
32606
32607    if test "x$new_path" = x; then
32608      # It's still not found. Now this is an unrecoverable error.
32609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32610$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32611      has_space=`$ECHO "$complete" | $GREP " "`
32612      if test "x$has_space" != x; then
32613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32615      fi
32616      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32617    fi
32618  fi
32619
32620  # Now new_path has a complete unix path to the binary
32621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32622    # Keep paths in /bin as-is, but remove trailing .exe if any
32623    new_path="${new_path/%.exe/}"
32624    # Do not save /bin paths to all_fixpath_prefixes!
32625  else
32626    # Not in mixed or Windows style, start by that.
32627    new_path=`cmd //c echo $new_path`
32628
32629  input_path="$new_path"
32630  # Check if we need to convert this using DOS-style short mode. If the path
32631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32632  # take no chances and rewrite it.
32633  # Note: m4 eats our [], so we need to use [ and ] instead.
32634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32635  if test "x$has_forbidden_chars" != x; then
32636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32638  fi
32639
32640    # Output is in $new_path
32641
32642  windows_path="$new_path"
32643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32644    unix_path=`$CYGPATH -u "$windows_path"`
32645    new_path="$unix_path"
32646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32648    new_path="$unix_path"
32649  fi
32650
32651    # remove trailing .exe if any
32652    new_path="${new_path/%.exe/}"
32653
32654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32656  fi
32657
32658    else
32659      # We're on a unix platform. Hooray! :)
32660      # First separate the path from the arguments. This will split at the first
32661      # space.
32662      complete="$CXXCPP"
32663      path="${complete%% *}"
32664      tmp="$complete EOL"
32665      arguments="${tmp#* }"
32666
32667      # Cannot rely on the command "which" here since it doesn't always work.
32668      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32669      if test -z "$is_absolute_path"; then
32670        # Path to executable is not absolute. Find it.
32671        IFS_save="$IFS"
32672        IFS=:
32673        for p in $PATH; do
32674          if test -f "$p/$path" && test -x "$p/$path"; then
32675            new_path="$p/$path"
32676            break
32677          fi
32678        done
32679        IFS="$IFS_save"
32680      else
32681        # This is an absolute path, we can use it without further modifications.
32682        new_path="$path"
32683      fi
32684
32685      if test "x$new_path" = x; then
32686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32687$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32688        has_space=`$ECHO "$complete" | $GREP " "`
32689        if test "x$has_space" != x; then
32690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32692        fi
32693        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32694      fi
32695    fi
32696
32697    # Now join together the path and the arguments once again
32698    if test "x$arguments" != xEOL; then
32699      new_complete="$new_path ${arguments% *}"
32700    else
32701      new_complete="$new_path"
32702    fi
32703
32704    if test "x$complete" != "x$new_complete"; then
32705      CXXCPP="$new_complete"
32706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32707$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32708    fi
32709  fi
32710
32711
32712  #
32713  # Setup the linker (LD)
32714  #
32715  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32716    # In the Microsoft toolchain we have a separate LD command "link".
32717    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32718    # a cygwin program for something completely different.
32719    # Extract the first word of "link", so it can be a program name with args.
32720set dummy link; ac_word=$2
32721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32722$as_echo_n "checking for $ac_word... " >&6; }
32723if ${ac_cv_prog_LD+:} false; then :
32724  $as_echo_n "(cached) " >&6
32725else
32726  if test -n "$LD"; then
32727  ac_cv_prog_LD="$LD" # Let the user override the test.
32728else
32729  ac_prog_rejected=no
32730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32731for as_dir in $PATH
32732do
32733  IFS=$as_save_IFS
32734  test -z "$as_dir" && as_dir=.
32735    for ac_exec_ext in '' $ac_executable_extensions; do
32736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32737    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32738       ac_prog_rejected=yes
32739       continue
32740     fi
32741    ac_cv_prog_LD="link"
32742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32743    break 2
32744  fi
32745done
32746  done
32747IFS=$as_save_IFS
32748
32749if test $ac_prog_rejected = yes; then
32750  # We found a bogon in the path, so make sure we never use it.
32751  set dummy $ac_cv_prog_LD
32752  shift
32753  if test $# != 0; then
32754    # We chose a different compiler from the bogus one.
32755    # However, it has the same basename, so the bogon will be chosen
32756    # first if we set LD to just the basename; use the full file name.
32757    shift
32758    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32759  fi
32760fi
32761fi
32762fi
32763LD=$ac_cv_prog_LD
32764if test -n "$LD"; then
32765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32766$as_echo "$LD" >&6; }
32767else
32768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32769$as_echo "no" >&6; }
32770fi
32771
32772
32773
32774  # Only process if variable expands to non-empty
32775
32776  if test "x$LD" != x; then
32777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32778
32779  # First separate the path from the arguments. This will split at the first
32780  # space.
32781  complete="$LD"
32782  path="${complete%% *}"
32783  tmp="$complete EOL"
32784  arguments="${tmp#* }"
32785
32786  # Input might be given as Windows format, start by converting to
32787  # unix format.
32788  new_path=`$CYGPATH -u "$path"`
32789
32790  # Now try to locate executable using which
32791  new_path=`$WHICH "$new_path" 2> /dev/null`
32792  # bat and cmd files are not always considered executable in cygwin causing which
32793  # to not find them
32794  if test "x$new_path" = x \
32795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32797    new_path=`$CYGPATH -u "$path"`
32798  fi
32799  if test "x$new_path" = x; then
32800    # Oops. Which didn't find the executable.
32801    # The splitting of arguments from the executable at a space might have been incorrect,
32802    # since paths with space are more likely in Windows. Give it another try with the whole
32803    # argument.
32804    path="$complete"
32805    arguments="EOL"
32806    new_path=`$CYGPATH -u "$path"`
32807    new_path=`$WHICH "$new_path" 2> /dev/null`
32808    # bat and cmd files are not always considered executable in cygwin causing which
32809    # to not find them
32810    if test "x$new_path" = x \
32811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32813      new_path=`$CYGPATH -u "$path"`
32814    fi
32815    if test "x$new_path" = x; then
32816      # It's still not found. Now this is an unrecoverable error.
32817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32818$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32819      has_space=`$ECHO "$complete" | $GREP " "`
32820      if test "x$has_space" != x; then
32821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32823      fi
32824      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32825    fi
32826  fi
32827
32828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32831  # "foo.exe" is OK but "foo" is an error.
32832  #
32833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32834  # It is also a way to make sure we got the proper file name for the real test later on.
32835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32836  if test "x$test_shortpath" = x; then
32837    # Short path failed, file does not exist as specified.
32838    # Try adding .exe or .cmd
32839    if test -f "${new_path}.exe"; then
32840      input_to_shortpath="${new_path}.exe"
32841    elif test -f "${new_path}.cmd"; then
32842      input_to_shortpath="${new_path}.cmd"
32843    else
32844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32845$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32848      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32849    fi
32850  else
32851    input_to_shortpath="$new_path"
32852  fi
32853
32854  # Call helper function which possibly converts this using DOS-style short mode.
32855  # If so, the updated path is stored in $new_path.
32856  new_path="$input_to_shortpath"
32857
32858  input_path="$input_to_shortpath"
32859  # Check if we need to convert this using DOS-style short mode. If the path
32860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32861  # take no chances and rewrite it.
32862  # Note: m4 eats our [], so we need to use [ and ] instead.
32863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32864  if test "x$has_forbidden_chars" != x; then
32865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32869      # Going to short mode and back again did indeed matter. Since short mode is
32870      # case insensitive, let's make it lowercase to improve readability.
32871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32872      # Now convert it back to Unix-style (cygpath)
32873      input_path=`$CYGPATH -u "$shortmode_path"`
32874      new_path="$input_path"
32875    fi
32876  fi
32877
32878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32879  if test "x$test_cygdrive_prefix" = x; then
32880    # As a simple fix, exclude /usr/bin since it's not a real path.
32881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32883      # a path prefixed by /cygdrive for fixpath to work.
32884      new_path="$CYGWIN_ROOT_PATH$input_path"
32885    fi
32886  fi
32887
32888  # remove trailing .exe if any
32889  new_path="${new_path/%.exe/}"
32890
32891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32892
32893  # First separate the path from the arguments. This will split at the first
32894  # space.
32895  complete="$LD"
32896  path="${complete%% *}"
32897  tmp="$complete EOL"
32898  arguments="${tmp#* }"
32899
32900  # Input might be given as Windows format, start by converting to
32901  # unix format.
32902  new_path="$path"
32903
32904  windows_path="$new_path"
32905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32906    unix_path=`$CYGPATH -u "$windows_path"`
32907    new_path="$unix_path"
32908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32910    new_path="$unix_path"
32911  fi
32912
32913
32914  # Now try to locate executable using which
32915  new_path=`$WHICH "$new_path" 2> /dev/null`
32916
32917  if test "x$new_path" = x; then
32918    # Oops. Which didn't find the executable.
32919    # The splitting of arguments from the executable at a space might have been incorrect,
32920    # since paths with space are more likely in Windows. Give it another try with the whole
32921    # argument.
32922    path="$complete"
32923    arguments="EOL"
32924    new_path="$path"
32925
32926  windows_path="$new_path"
32927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32928    unix_path=`$CYGPATH -u "$windows_path"`
32929    new_path="$unix_path"
32930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32932    new_path="$unix_path"
32933  fi
32934
32935
32936    new_path=`$WHICH "$new_path" 2> /dev/null`
32937    # bat and cmd files are not always considered executable in MSYS causing which
32938    # to not find them
32939    if test "x$new_path" = x \
32940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32942      new_path="$path"
32943
32944  windows_path="$new_path"
32945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32946    unix_path=`$CYGPATH -u "$windows_path"`
32947    new_path="$unix_path"
32948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32950    new_path="$unix_path"
32951  fi
32952
32953    fi
32954
32955    if test "x$new_path" = x; then
32956      # It's still not found. Now this is an unrecoverable error.
32957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32958$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32959      has_space=`$ECHO "$complete" | $GREP " "`
32960      if test "x$has_space" != x; then
32961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32963      fi
32964      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32965    fi
32966  fi
32967
32968  # Now new_path has a complete unix path to the binary
32969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32970    # Keep paths in /bin as-is, but remove trailing .exe if any
32971    new_path="${new_path/%.exe/}"
32972    # Do not save /bin paths to all_fixpath_prefixes!
32973  else
32974    # Not in mixed or Windows style, start by that.
32975    new_path=`cmd //c echo $new_path`
32976
32977  input_path="$new_path"
32978  # Check if we need to convert this using DOS-style short mode. If the path
32979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32980  # take no chances and rewrite it.
32981  # Note: m4 eats our [], so we need to use [ and ] instead.
32982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32983  if test "x$has_forbidden_chars" != x; then
32984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32986  fi
32987
32988    # Output is in $new_path
32989
32990  windows_path="$new_path"
32991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32992    unix_path=`$CYGPATH -u "$windows_path"`
32993    new_path="$unix_path"
32994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32996    new_path="$unix_path"
32997  fi
32998
32999    # remove trailing .exe if any
33000    new_path="${new_path/%.exe/}"
33001
33002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33004  fi
33005
33006    else
33007      # We're on a unix platform. Hooray! :)
33008      # First separate the path from the arguments. This will split at the first
33009      # space.
33010      complete="$LD"
33011      path="${complete%% *}"
33012      tmp="$complete EOL"
33013      arguments="${tmp#* }"
33014
33015      # Cannot rely on the command "which" here since it doesn't always work.
33016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33017      if test -z "$is_absolute_path"; then
33018        # Path to executable is not absolute. Find it.
33019        IFS_save="$IFS"
33020        IFS=:
33021        for p in $PATH; do
33022          if test -f "$p/$path" && test -x "$p/$path"; then
33023            new_path="$p/$path"
33024            break
33025          fi
33026        done
33027        IFS="$IFS_save"
33028      else
33029        # This is an absolute path, we can use it without further modifications.
33030        new_path="$path"
33031      fi
33032
33033      if test "x$new_path" = x; then
33034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33035$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33036        has_space=`$ECHO "$complete" | $GREP " "`
33037        if test "x$has_space" != x; then
33038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33040        fi
33041        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33042      fi
33043    fi
33044
33045    # Now join together the path and the arguments once again
33046    if test "x$arguments" != xEOL; then
33047      new_complete="$new_path ${arguments% *}"
33048    else
33049      new_complete="$new_path"
33050    fi
33051
33052    if test "x$complete" != "x$new_complete"; then
33053      LD="$new_complete"
33054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
33055$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
33056    fi
33057  fi
33058
33059    # Verify that we indeed succeeded with this trick.
33060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33061$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33062    "$LD" --version > /dev/null
33063    if test $? -eq 0 ; then
33064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33065$as_echo "no" >&6; }
33066      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33067    else
33068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33069$as_echo "yes" >&6; }
33070    fi
33071    LDCXX="$LD"
33072  else
33073    # All other toolchains use the compiler to link.
33074    LD="$CC"
33075    LDCXX="$CXX"
33076  fi
33077
33078  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
33079
33080
33081  #
33082  # Setup the assembler (AS)
33083  #
33084  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
33085    # FIXME: should this really be solaris, or solstudio?
33086
33087
33088  # Publish this variable in the help.
33089
33090
33091  if test "x$AS" = x; then
33092    # The variable is not set by user, try to locate tool using the code snippet
33093    for ac_prog in as
33094do
33095  # Extract the first word of "$ac_prog", so it can be a program name with args.
33096set dummy $ac_prog; ac_word=$2
33097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33098$as_echo_n "checking for $ac_word... " >&6; }
33099if ${ac_cv_path_AS+:} false; then :
33100  $as_echo_n "(cached) " >&6
33101else
33102  case $AS in
33103  [\\/]* | ?:[\\/]*)
33104  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33105  ;;
33106  *)
33107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33108for as_dir in $PATH
33109do
33110  IFS=$as_save_IFS
33111  test -z "$as_dir" && as_dir=.
33112    for ac_exec_ext in '' $ac_executable_extensions; do
33113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33114    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33116    break 2
33117  fi
33118done
33119  done
33120IFS=$as_save_IFS
33121
33122  ;;
33123esac
33124fi
33125AS=$ac_cv_path_AS
33126if test -n "$AS"; then
33127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33128$as_echo "$AS" >&6; }
33129else
33130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33131$as_echo "no" >&6; }
33132fi
33133
33134
33135  test -n "$AS" && break
33136done
33137
33138  else
33139    # The variable is set, but is it from the command line or the environment?
33140
33141    # Try to remove the string !AS! from our list.
33142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33144      # If it failed, the variable was not from the command line. Ignore it,
33145      # but warn the user (except for BASH, which is always set by the calling BASH).
33146      if test "xAS" != xBASH; then
33147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33148$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33149      fi
33150      # Try to locate tool using the code snippet
33151      for ac_prog in as
33152do
33153  # Extract the first word of "$ac_prog", so it can be a program name with args.
33154set dummy $ac_prog; ac_word=$2
33155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33156$as_echo_n "checking for $ac_word... " >&6; }
33157if ${ac_cv_path_AS+:} false; then :
33158  $as_echo_n "(cached) " >&6
33159else
33160  case $AS in
33161  [\\/]* | ?:[\\/]*)
33162  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33163  ;;
33164  *)
33165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33166for as_dir in $PATH
33167do
33168  IFS=$as_save_IFS
33169  test -z "$as_dir" && as_dir=.
33170    for ac_exec_ext in '' $ac_executable_extensions; do
33171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33172    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33174    break 2
33175  fi
33176done
33177  done
33178IFS=$as_save_IFS
33179
33180  ;;
33181esac
33182fi
33183AS=$ac_cv_path_AS
33184if test -n "$AS"; then
33185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33186$as_echo "$AS" >&6; }
33187else
33188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33189$as_echo "no" >&6; }
33190fi
33191
33192
33193  test -n "$AS" && break
33194done
33195
33196    else
33197      # If it succeeded, then it was overridden by the user. We will use it
33198      # for the tool.
33199
33200      # First remove it from the list of overridden variables, so we can test
33201      # for unknown variables in the end.
33202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33203
33204      # Check if the provided tool contains a complete path.
33205      tool_specified="$AS"
33206      tool_basename="${tool_specified##*/}"
33207      if test "x$tool_basename" = "x$tool_specified"; then
33208        # A command without a complete path is provided, search $PATH.
33209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33210$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33211        # Extract the first word of "$tool_basename", so it can be a program name with args.
33212set dummy $tool_basename; ac_word=$2
33213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33214$as_echo_n "checking for $ac_word... " >&6; }
33215if ${ac_cv_path_AS+:} false; then :
33216  $as_echo_n "(cached) " >&6
33217else
33218  case $AS in
33219  [\\/]* | ?:[\\/]*)
33220  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33221  ;;
33222  *)
33223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33224for as_dir in $PATH
33225do
33226  IFS=$as_save_IFS
33227  test -z "$as_dir" && as_dir=.
33228    for ac_exec_ext in '' $ac_executable_extensions; do
33229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33230    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33232    break 2
33233  fi
33234done
33235  done
33236IFS=$as_save_IFS
33237
33238  ;;
33239esac
33240fi
33241AS=$ac_cv_path_AS
33242if test -n "$AS"; then
33243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33244$as_echo "$AS" >&6; }
33245else
33246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33247$as_echo "no" >&6; }
33248fi
33249
33250
33251        if test "x$AS" = x; then
33252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33253        fi
33254      else
33255        # Otherwise we believe it is a complete path. Use it as it is.
33256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33257$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33259$as_echo_n "checking for AS... " >&6; }
33260        if test ! -x "$tool_specified"; then
33261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33262$as_echo "not found" >&6; }
33263          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33264        fi
33265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33266$as_echo "$tool_specified" >&6; }
33267      fi
33268    fi
33269  fi
33270
33271
33272
33273  # Only process if variable expands to non-empty
33274
33275  if test "x$AS" != x; then
33276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33277
33278  # First separate the path from the arguments. This will split at the first
33279  # space.
33280  complete="$AS"
33281  path="${complete%% *}"
33282  tmp="$complete EOL"
33283  arguments="${tmp#* }"
33284
33285  # Input might be given as Windows format, start by converting to
33286  # unix format.
33287  new_path=`$CYGPATH -u "$path"`
33288
33289  # Now try to locate executable using which
33290  new_path=`$WHICH "$new_path" 2> /dev/null`
33291  # bat and cmd files are not always considered executable in cygwin causing which
33292  # to not find them
33293  if test "x$new_path" = x \
33294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33296    new_path=`$CYGPATH -u "$path"`
33297  fi
33298  if test "x$new_path" = x; then
33299    # Oops. Which didn't find the executable.
33300    # The splitting of arguments from the executable at a space might have been incorrect,
33301    # since paths with space are more likely in Windows. Give it another try with the whole
33302    # argument.
33303    path="$complete"
33304    arguments="EOL"
33305    new_path=`$CYGPATH -u "$path"`
33306    new_path=`$WHICH "$new_path" 2> /dev/null`
33307    # bat and cmd files are not always considered executable in cygwin causing which
33308    # to not find them
33309    if test "x$new_path" = x \
33310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33312      new_path=`$CYGPATH -u "$path"`
33313    fi
33314    if test "x$new_path" = x; then
33315      # It's still not found. Now this is an unrecoverable error.
33316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33317$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33318      has_space=`$ECHO "$complete" | $GREP " "`
33319      if test "x$has_space" != x; then
33320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33322      fi
33323      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33324    fi
33325  fi
33326
33327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33330  # "foo.exe" is OK but "foo" is an error.
33331  #
33332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33333  # It is also a way to make sure we got the proper file name for the real test later on.
33334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33335  if test "x$test_shortpath" = x; then
33336    # Short path failed, file does not exist as specified.
33337    # Try adding .exe or .cmd
33338    if test -f "${new_path}.exe"; then
33339      input_to_shortpath="${new_path}.exe"
33340    elif test -f "${new_path}.cmd"; then
33341      input_to_shortpath="${new_path}.cmd"
33342    else
33343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33344$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33347      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33348    fi
33349  else
33350    input_to_shortpath="$new_path"
33351  fi
33352
33353  # Call helper function which possibly converts this using DOS-style short mode.
33354  # If so, the updated path is stored in $new_path.
33355  new_path="$input_to_shortpath"
33356
33357  input_path="$input_to_shortpath"
33358  # Check if we need to convert this using DOS-style short mode. If the path
33359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33360  # take no chances and rewrite it.
33361  # Note: m4 eats our [], so we need to use [ and ] instead.
33362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33363  if test "x$has_forbidden_chars" != x; then
33364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33368      # Going to short mode and back again did indeed matter. Since short mode is
33369      # case insensitive, let's make it lowercase to improve readability.
33370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33371      # Now convert it back to Unix-style (cygpath)
33372      input_path=`$CYGPATH -u "$shortmode_path"`
33373      new_path="$input_path"
33374    fi
33375  fi
33376
33377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33378  if test "x$test_cygdrive_prefix" = x; then
33379    # As a simple fix, exclude /usr/bin since it's not a real path.
33380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33382      # a path prefixed by /cygdrive for fixpath to work.
33383      new_path="$CYGWIN_ROOT_PATH$input_path"
33384    fi
33385  fi
33386
33387  # remove trailing .exe if any
33388  new_path="${new_path/%.exe/}"
33389
33390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33391
33392  # First separate the path from the arguments. This will split at the first
33393  # space.
33394  complete="$AS"
33395  path="${complete%% *}"
33396  tmp="$complete EOL"
33397  arguments="${tmp#* }"
33398
33399  # Input might be given as Windows format, start by converting to
33400  # unix format.
33401  new_path="$path"
33402
33403  windows_path="$new_path"
33404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33405    unix_path=`$CYGPATH -u "$windows_path"`
33406    new_path="$unix_path"
33407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33409    new_path="$unix_path"
33410  fi
33411
33412
33413  # Now try to locate executable using which
33414  new_path=`$WHICH "$new_path" 2> /dev/null`
33415
33416  if test "x$new_path" = x; then
33417    # Oops. Which didn't find the executable.
33418    # The splitting of arguments from the executable at a space might have been incorrect,
33419    # since paths with space are more likely in Windows. Give it another try with the whole
33420    # argument.
33421    path="$complete"
33422    arguments="EOL"
33423    new_path="$path"
33424
33425  windows_path="$new_path"
33426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33427    unix_path=`$CYGPATH -u "$windows_path"`
33428    new_path="$unix_path"
33429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33431    new_path="$unix_path"
33432  fi
33433
33434
33435    new_path=`$WHICH "$new_path" 2> /dev/null`
33436    # bat and cmd files are not always considered executable in MSYS causing which
33437    # to not find them
33438    if test "x$new_path" = x \
33439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33441      new_path="$path"
33442
33443  windows_path="$new_path"
33444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33445    unix_path=`$CYGPATH -u "$windows_path"`
33446    new_path="$unix_path"
33447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33449    new_path="$unix_path"
33450  fi
33451
33452    fi
33453
33454    if test "x$new_path" = x; then
33455      # It's still not found. Now this is an unrecoverable error.
33456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33457$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33458      has_space=`$ECHO "$complete" | $GREP " "`
33459      if test "x$has_space" != x; then
33460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33462      fi
33463      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33464    fi
33465  fi
33466
33467  # Now new_path has a complete unix path to the binary
33468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33469    # Keep paths in /bin as-is, but remove trailing .exe if any
33470    new_path="${new_path/%.exe/}"
33471    # Do not save /bin paths to all_fixpath_prefixes!
33472  else
33473    # Not in mixed or Windows style, start by that.
33474    new_path=`cmd //c echo $new_path`
33475
33476  input_path="$new_path"
33477  # Check if we need to convert this using DOS-style short mode. If the path
33478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33479  # take no chances and rewrite it.
33480  # Note: m4 eats our [], so we need to use [ and ] instead.
33481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33482  if test "x$has_forbidden_chars" != x; then
33483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33485  fi
33486
33487    # Output is in $new_path
33488
33489  windows_path="$new_path"
33490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33491    unix_path=`$CYGPATH -u "$windows_path"`
33492    new_path="$unix_path"
33493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33495    new_path="$unix_path"
33496  fi
33497
33498    # remove trailing .exe if any
33499    new_path="${new_path/%.exe/}"
33500
33501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33503  fi
33504
33505    else
33506      # We're on a unix platform. Hooray! :)
33507      # First separate the path from the arguments. This will split at the first
33508      # space.
33509      complete="$AS"
33510      path="${complete%% *}"
33511      tmp="$complete EOL"
33512      arguments="${tmp#* }"
33513
33514      # Cannot rely on the command "which" here since it doesn't always work.
33515      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33516      if test -z "$is_absolute_path"; then
33517        # Path to executable is not absolute. Find it.
33518        IFS_save="$IFS"
33519        IFS=:
33520        for p in $PATH; do
33521          if test -f "$p/$path" && test -x "$p/$path"; then
33522            new_path="$p/$path"
33523            break
33524          fi
33525        done
33526        IFS="$IFS_save"
33527      else
33528        # This is an absolute path, we can use it without further modifications.
33529        new_path="$path"
33530      fi
33531
33532      if test "x$new_path" = x; then
33533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33534$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33535        has_space=`$ECHO "$complete" | $GREP " "`
33536        if test "x$has_space" != x; then
33537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33539        fi
33540        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33541      fi
33542    fi
33543
33544    # Now join together the path and the arguments once again
33545    if test "x$arguments" != xEOL; then
33546      new_complete="$new_path ${arguments% *}"
33547    else
33548      new_complete="$new_path"
33549    fi
33550
33551    if test "x$complete" != "x$new_complete"; then
33552      AS="$new_complete"
33553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33554$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33555    fi
33556  fi
33557
33558  else
33559    # FIXME: is this correct for microsoft?
33560    AS="$CC -c"
33561  fi
33562
33563
33564  #
33565  # Setup the archiver (AR)
33566  #
33567  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33568    # The corresponding ar tool is lib.exe (used to create static libraries)
33569    # Extract the first word of "lib", so it can be a program name with args.
33570set dummy lib; ac_word=$2
33571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33572$as_echo_n "checking for $ac_word... " >&6; }
33573if ${ac_cv_prog_AR+:} false; then :
33574  $as_echo_n "(cached) " >&6
33575else
33576  if test -n "$AR"; then
33577  ac_cv_prog_AR="$AR" # Let the user override the test.
33578else
33579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33580for as_dir in $PATH
33581do
33582  IFS=$as_save_IFS
33583  test -z "$as_dir" && as_dir=.
33584    for ac_exec_ext in '' $ac_executable_extensions; do
33585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33586    ac_cv_prog_AR="lib"
33587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33588    break 2
33589  fi
33590done
33591  done
33592IFS=$as_save_IFS
33593
33594fi
33595fi
33596AR=$ac_cv_prog_AR
33597if test -n "$AR"; then
33598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33599$as_echo "$AR" >&6; }
33600else
33601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33602$as_echo "no" >&6; }
33603fi
33604
33605
33606  else
33607
33608
33609  # Publish this variable in the help.
33610
33611
33612  if test "x$AR" = x; then
33613    # The variable is not set by user, try to locate tool using the code snippet
33614    if test -n "$ac_tool_prefix"; then
33615  for ac_prog in ar
33616  do
33617    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33618set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33620$as_echo_n "checking for $ac_word... " >&6; }
33621if ${ac_cv_prog_AR+:} false; then :
33622  $as_echo_n "(cached) " >&6
33623else
33624  if test -n "$AR"; then
33625  ac_cv_prog_AR="$AR" # Let the user override the test.
33626else
33627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33628for as_dir in $PATH
33629do
33630  IFS=$as_save_IFS
33631  test -z "$as_dir" && as_dir=.
33632    for ac_exec_ext in '' $ac_executable_extensions; do
33633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33634    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33636    break 2
33637  fi
33638done
33639  done
33640IFS=$as_save_IFS
33641
33642fi
33643fi
33644AR=$ac_cv_prog_AR
33645if test -n "$AR"; then
33646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33647$as_echo "$AR" >&6; }
33648else
33649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33650$as_echo "no" >&6; }
33651fi
33652
33653
33654    test -n "$AR" && break
33655  done
33656fi
33657if test -z "$AR"; then
33658  ac_ct_AR=$AR
33659  for ac_prog in ar
33660do
33661  # Extract the first word of "$ac_prog", so it can be a program name with args.
33662set dummy $ac_prog; ac_word=$2
33663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33664$as_echo_n "checking for $ac_word... " >&6; }
33665if ${ac_cv_prog_ac_ct_AR+:} false; then :
33666  $as_echo_n "(cached) " >&6
33667else
33668  if test -n "$ac_ct_AR"; then
33669  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33670else
33671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33672for as_dir in $PATH
33673do
33674  IFS=$as_save_IFS
33675  test -z "$as_dir" && as_dir=.
33676    for ac_exec_ext in '' $ac_executable_extensions; do
33677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33678    ac_cv_prog_ac_ct_AR="$ac_prog"
33679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33680    break 2
33681  fi
33682done
33683  done
33684IFS=$as_save_IFS
33685
33686fi
33687fi
33688ac_ct_AR=$ac_cv_prog_ac_ct_AR
33689if test -n "$ac_ct_AR"; then
33690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33691$as_echo "$ac_ct_AR" >&6; }
33692else
33693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33694$as_echo "no" >&6; }
33695fi
33696
33697
33698  test -n "$ac_ct_AR" && break
33699done
33700
33701  if test "x$ac_ct_AR" = x; then
33702    AR=""
33703  else
33704    case $cross_compiling:$ac_tool_warned in
33705yes:)
33706{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33707$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33708ac_tool_warned=yes ;;
33709esac
33710    AR=$ac_ct_AR
33711  fi
33712fi
33713
33714  else
33715    # The variable is set, but is it from the command line or the environment?
33716
33717    # Try to remove the string !AR! from our list.
33718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33720      # If it failed, the variable was not from the command line. Ignore it,
33721      # but warn the user (except for BASH, which is always set by the calling BASH).
33722      if test "xAR" != xBASH; then
33723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33724$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33725      fi
33726      # Try to locate tool using the code snippet
33727      if test -n "$ac_tool_prefix"; then
33728  for ac_prog in ar
33729  do
33730    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33733$as_echo_n "checking for $ac_word... " >&6; }
33734if ${ac_cv_prog_AR+:} false; then :
33735  $as_echo_n "(cached) " >&6
33736else
33737  if test -n "$AR"; then
33738  ac_cv_prog_AR="$AR" # Let the user override the test.
33739else
33740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33741for as_dir in $PATH
33742do
33743  IFS=$as_save_IFS
33744  test -z "$as_dir" && as_dir=.
33745    for ac_exec_ext in '' $ac_executable_extensions; do
33746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33747    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33749    break 2
33750  fi
33751done
33752  done
33753IFS=$as_save_IFS
33754
33755fi
33756fi
33757AR=$ac_cv_prog_AR
33758if test -n "$AR"; then
33759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33760$as_echo "$AR" >&6; }
33761else
33762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33763$as_echo "no" >&6; }
33764fi
33765
33766
33767    test -n "$AR" && break
33768  done
33769fi
33770if test -z "$AR"; then
33771  ac_ct_AR=$AR
33772  for ac_prog in ar
33773do
33774  # Extract the first word of "$ac_prog", so it can be a program name with args.
33775set dummy $ac_prog; ac_word=$2
33776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33777$as_echo_n "checking for $ac_word... " >&6; }
33778if ${ac_cv_prog_ac_ct_AR+:} false; then :
33779  $as_echo_n "(cached) " >&6
33780else
33781  if test -n "$ac_ct_AR"; then
33782  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33783else
33784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33785for as_dir in $PATH
33786do
33787  IFS=$as_save_IFS
33788  test -z "$as_dir" && as_dir=.
33789    for ac_exec_ext in '' $ac_executable_extensions; do
33790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33791    ac_cv_prog_ac_ct_AR="$ac_prog"
33792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33793    break 2
33794  fi
33795done
33796  done
33797IFS=$as_save_IFS
33798
33799fi
33800fi
33801ac_ct_AR=$ac_cv_prog_ac_ct_AR
33802if test -n "$ac_ct_AR"; then
33803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33804$as_echo "$ac_ct_AR" >&6; }
33805else
33806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33807$as_echo "no" >&6; }
33808fi
33809
33810
33811  test -n "$ac_ct_AR" && break
33812done
33813
33814  if test "x$ac_ct_AR" = x; then
33815    AR=""
33816  else
33817    case $cross_compiling:$ac_tool_warned in
33818yes:)
33819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33821ac_tool_warned=yes ;;
33822esac
33823    AR=$ac_ct_AR
33824  fi
33825fi
33826
33827    else
33828      # If it succeeded, then it was overridden by the user. We will use it
33829      # for the tool.
33830
33831      # First remove it from the list of overridden variables, so we can test
33832      # for unknown variables in the end.
33833      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33834
33835      # Check if the provided tool contains a complete path.
33836      tool_specified="$AR"
33837      tool_basename="${tool_specified##*/}"
33838      if test "x$tool_basename" = "x$tool_specified"; then
33839        # A command without a complete path is provided, search $PATH.
33840        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33841$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33842        # Extract the first word of "$tool_basename", so it can be a program name with args.
33843set dummy $tool_basename; ac_word=$2
33844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33845$as_echo_n "checking for $ac_word... " >&6; }
33846if ${ac_cv_path_AR+:} false; then :
33847  $as_echo_n "(cached) " >&6
33848else
33849  case $AR in
33850  [\\/]* | ?:[\\/]*)
33851  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33852  ;;
33853  *)
33854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33855for as_dir in $PATH
33856do
33857  IFS=$as_save_IFS
33858  test -z "$as_dir" && as_dir=.
33859    for ac_exec_ext in '' $ac_executable_extensions; do
33860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33861    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33863    break 2
33864  fi
33865done
33866  done
33867IFS=$as_save_IFS
33868
33869  ;;
33870esac
33871fi
33872AR=$ac_cv_path_AR
33873if test -n "$AR"; then
33874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33875$as_echo "$AR" >&6; }
33876else
33877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33878$as_echo "no" >&6; }
33879fi
33880
33881
33882        if test "x$AR" = x; then
33883          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33884        fi
33885      else
33886        # Otherwise we believe it is a complete path. Use it as it is.
33887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33888$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33890$as_echo_n "checking for AR... " >&6; }
33891        if test ! -x "$tool_specified"; then
33892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33893$as_echo "not found" >&6; }
33894          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33895        fi
33896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33897$as_echo "$tool_specified" >&6; }
33898      fi
33899    fi
33900  fi
33901
33902
33903  fi
33904
33905  # Only process if variable expands to non-empty
33906
33907  if test "x$AR" != x; then
33908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33909
33910  # First separate the path from the arguments. This will split at the first
33911  # space.
33912  complete="$AR"
33913  path="${complete%% *}"
33914  tmp="$complete EOL"
33915  arguments="${tmp#* }"
33916
33917  # Input might be given as Windows format, start by converting to
33918  # unix format.
33919  new_path=`$CYGPATH -u "$path"`
33920
33921  # Now try to locate executable using which
33922  new_path=`$WHICH "$new_path" 2> /dev/null`
33923  # bat and cmd files are not always considered executable in cygwin causing which
33924  # to not find them
33925  if test "x$new_path" = x \
33926      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33927      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33928    new_path=`$CYGPATH -u "$path"`
33929  fi
33930  if test "x$new_path" = x; then
33931    # Oops. Which didn't find the executable.
33932    # The splitting of arguments from the executable at a space might have been incorrect,
33933    # since paths with space are more likely in Windows. Give it another try with the whole
33934    # argument.
33935    path="$complete"
33936    arguments="EOL"
33937    new_path=`$CYGPATH -u "$path"`
33938    new_path=`$WHICH "$new_path" 2> /dev/null`
33939    # bat and cmd files are not always considered executable in cygwin causing which
33940    # to not find them
33941    if test "x$new_path" = x \
33942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33944      new_path=`$CYGPATH -u "$path"`
33945    fi
33946    if test "x$new_path" = x; then
33947      # It's still not found. Now this is an unrecoverable error.
33948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33949$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33950      has_space=`$ECHO "$complete" | $GREP " "`
33951      if test "x$has_space" != x; then
33952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33954      fi
33955      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33956    fi
33957  fi
33958
33959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33962  # "foo.exe" is OK but "foo" is an error.
33963  #
33964  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33965  # It is also a way to make sure we got the proper file name for the real test later on.
33966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33967  if test "x$test_shortpath" = x; then
33968    # Short path failed, file does not exist as specified.
33969    # Try adding .exe or .cmd
33970    if test -f "${new_path}.exe"; then
33971      input_to_shortpath="${new_path}.exe"
33972    elif test -f "${new_path}.cmd"; then
33973      input_to_shortpath="${new_path}.cmd"
33974    else
33975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33976$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33979      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33980    fi
33981  else
33982    input_to_shortpath="$new_path"
33983  fi
33984
33985  # Call helper function which possibly converts this using DOS-style short mode.
33986  # If so, the updated path is stored in $new_path.
33987  new_path="$input_to_shortpath"
33988
33989  input_path="$input_to_shortpath"
33990  # Check if we need to convert this using DOS-style short mode. If the path
33991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33992  # take no chances and rewrite it.
33993  # Note: m4 eats our [], so we need to use [ and ] instead.
33994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33995  if test "x$has_forbidden_chars" != x; then
33996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34000      # Going to short mode and back again did indeed matter. Since short mode is
34001      # case insensitive, let's make it lowercase to improve readability.
34002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34003      # Now convert it back to Unix-style (cygpath)
34004      input_path=`$CYGPATH -u "$shortmode_path"`
34005      new_path="$input_path"
34006    fi
34007  fi
34008
34009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34010  if test "x$test_cygdrive_prefix" = x; then
34011    # As a simple fix, exclude /usr/bin since it's not a real path.
34012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34014      # a path prefixed by /cygdrive for fixpath to work.
34015      new_path="$CYGWIN_ROOT_PATH$input_path"
34016    fi
34017  fi
34018
34019  # remove trailing .exe if any
34020  new_path="${new_path/%.exe/}"
34021
34022    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34023
34024  # First separate the path from the arguments. This will split at the first
34025  # space.
34026  complete="$AR"
34027  path="${complete%% *}"
34028  tmp="$complete EOL"
34029  arguments="${tmp#* }"
34030
34031  # Input might be given as Windows format, start by converting to
34032  # unix format.
34033  new_path="$path"
34034
34035  windows_path="$new_path"
34036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34037    unix_path=`$CYGPATH -u "$windows_path"`
34038    new_path="$unix_path"
34039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34041    new_path="$unix_path"
34042  fi
34043
34044
34045  # Now try to locate executable using which
34046  new_path=`$WHICH "$new_path" 2> /dev/null`
34047
34048  if test "x$new_path" = x; then
34049    # Oops. Which didn't find the executable.
34050    # The splitting of arguments from the executable at a space might have been incorrect,
34051    # since paths with space are more likely in Windows. Give it another try with the whole
34052    # argument.
34053    path="$complete"
34054    arguments="EOL"
34055    new_path="$path"
34056
34057  windows_path="$new_path"
34058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34059    unix_path=`$CYGPATH -u "$windows_path"`
34060    new_path="$unix_path"
34061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34063    new_path="$unix_path"
34064  fi
34065
34066
34067    new_path=`$WHICH "$new_path" 2> /dev/null`
34068    # bat and cmd files are not always considered executable in MSYS causing which
34069    # to not find them
34070    if test "x$new_path" = x \
34071        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34072        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34073      new_path="$path"
34074
34075  windows_path="$new_path"
34076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34077    unix_path=`$CYGPATH -u "$windows_path"`
34078    new_path="$unix_path"
34079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34081    new_path="$unix_path"
34082  fi
34083
34084    fi
34085
34086    if test "x$new_path" = x; then
34087      # It's still not found. Now this is an unrecoverable error.
34088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34089$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34090      has_space=`$ECHO "$complete" | $GREP " "`
34091      if test "x$has_space" != x; then
34092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34094      fi
34095      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34096    fi
34097  fi
34098
34099  # Now new_path has a complete unix path to the binary
34100  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34101    # Keep paths in /bin as-is, but remove trailing .exe if any
34102    new_path="${new_path/%.exe/}"
34103    # Do not save /bin paths to all_fixpath_prefixes!
34104  else
34105    # Not in mixed or Windows style, start by that.
34106    new_path=`cmd //c echo $new_path`
34107
34108  input_path="$new_path"
34109  # Check if we need to convert this using DOS-style short mode. If the path
34110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34111  # take no chances and rewrite it.
34112  # Note: m4 eats our [], so we need to use [ and ] instead.
34113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34114  if test "x$has_forbidden_chars" != x; then
34115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34117  fi
34118
34119    # Output is in $new_path
34120
34121  windows_path="$new_path"
34122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34123    unix_path=`$CYGPATH -u "$windows_path"`
34124    new_path="$unix_path"
34125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34127    new_path="$unix_path"
34128  fi
34129
34130    # remove trailing .exe if any
34131    new_path="${new_path/%.exe/}"
34132
34133    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34134    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34135  fi
34136
34137    else
34138      # We're on a unix platform. Hooray! :)
34139      # First separate the path from the arguments. This will split at the first
34140      # space.
34141      complete="$AR"
34142      path="${complete%% *}"
34143      tmp="$complete EOL"
34144      arguments="${tmp#* }"
34145
34146      # Cannot rely on the command "which" here since it doesn't always work.
34147      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34148      if test -z "$is_absolute_path"; then
34149        # Path to executable is not absolute. Find it.
34150        IFS_save="$IFS"
34151        IFS=:
34152        for p in $PATH; do
34153          if test -f "$p/$path" && test -x "$p/$path"; then
34154            new_path="$p/$path"
34155            break
34156          fi
34157        done
34158        IFS="$IFS_save"
34159      else
34160        # This is an absolute path, we can use it without further modifications.
34161        new_path="$path"
34162      fi
34163
34164      if test "x$new_path" = x; then
34165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34166$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34167        has_space=`$ECHO "$complete" | $GREP " "`
34168        if test "x$has_space" != x; then
34169          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34170$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34171        fi
34172        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34173      fi
34174    fi
34175
34176    # Now join together the path and the arguments once again
34177    if test "x$arguments" != xEOL; then
34178      new_complete="$new_path ${arguments% *}"
34179    else
34180      new_complete="$new_path"
34181    fi
34182
34183    if test "x$complete" != "x$new_complete"; then
34184      AR="$new_complete"
34185      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34186$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34187    fi
34188  fi
34189
34190
34191
34192  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34193
34194
34195  # Publish this variable in the help.
34196
34197
34198  if test "x$LIPO" = x; then
34199    # The variable is not set by user, try to locate tool using the code snippet
34200    for ac_prog in lipo
34201do
34202  # Extract the first word of "$ac_prog", so it can be a program name with args.
34203set dummy $ac_prog; ac_word=$2
34204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34205$as_echo_n "checking for $ac_word... " >&6; }
34206if ${ac_cv_path_LIPO+:} false; then :
34207  $as_echo_n "(cached) " >&6
34208else
34209  case $LIPO in
34210  [\\/]* | ?:[\\/]*)
34211  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34212  ;;
34213  *)
34214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34215for as_dir in $PATH
34216do
34217  IFS=$as_save_IFS
34218  test -z "$as_dir" && as_dir=.
34219    for ac_exec_ext in '' $ac_executable_extensions; do
34220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34221    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34223    break 2
34224  fi
34225done
34226  done
34227IFS=$as_save_IFS
34228
34229  ;;
34230esac
34231fi
34232LIPO=$ac_cv_path_LIPO
34233if test -n "$LIPO"; then
34234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34235$as_echo "$LIPO" >&6; }
34236else
34237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34238$as_echo "no" >&6; }
34239fi
34240
34241
34242  test -n "$LIPO" && break
34243done
34244
34245  else
34246    # The variable is set, but is it from the command line or the environment?
34247
34248    # Try to remove the string !LIPO! from our list.
34249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34251      # If it failed, the variable was not from the command line. Ignore it,
34252      # but warn the user (except for BASH, which is always set by the calling BASH).
34253      if test "xLIPO" != xBASH; then
34254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34255$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34256      fi
34257      # Try to locate tool using the code snippet
34258      for ac_prog in lipo
34259do
34260  # Extract the first word of "$ac_prog", so it can be a program name with args.
34261set dummy $ac_prog; ac_word=$2
34262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34263$as_echo_n "checking for $ac_word... " >&6; }
34264if ${ac_cv_path_LIPO+:} false; then :
34265  $as_echo_n "(cached) " >&6
34266else
34267  case $LIPO in
34268  [\\/]* | ?:[\\/]*)
34269  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34270  ;;
34271  *)
34272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34273for as_dir in $PATH
34274do
34275  IFS=$as_save_IFS
34276  test -z "$as_dir" && as_dir=.
34277    for ac_exec_ext in '' $ac_executable_extensions; do
34278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34279    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34281    break 2
34282  fi
34283done
34284  done
34285IFS=$as_save_IFS
34286
34287  ;;
34288esac
34289fi
34290LIPO=$ac_cv_path_LIPO
34291if test -n "$LIPO"; then
34292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34293$as_echo "$LIPO" >&6; }
34294else
34295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34296$as_echo "no" >&6; }
34297fi
34298
34299
34300  test -n "$LIPO" && break
34301done
34302
34303    else
34304      # If it succeeded, then it was overridden by the user. We will use it
34305      # for the tool.
34306
34307      # First remove it from the list of overridden variables, so we can test
34308      # for unknown variables in the end.
34309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34310
34311      # Check if the provided tool contains a complete path.
34312      tool_specified="$LIPO"
34313      tool_basename="${tool_specified##*/}"
34314      if test "x$tool_basename" = "x$tool_specified"; then
34315        # A command without a complete path is provided, search $PATH.
34316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34317$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34318        # Extract the first word of "$tool_basename", so it can be a program name with args.
34319set dummy $tool_basename; ac_word=$2
34320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34321$as_echo_n "checking for $ac_word... " >&6; }
34322if ${ac_cv_path_LIPO+:} false; then :
34323  $as_echo_n "(cached) " >&6
34324else
34325  case $LIPO in
34326  [\\/]* | ?:[\\/]*)
34327  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34328  ;;
34329  *)
34330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34331for as_dir in $PATH
34332do
34333  IFS=$as_save_IFS
34334  test -z "$as_dir" && as_dir=.
34335    for ac_exec_ext in '' $ac_executable_extensions; do
34336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34337    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34339    break 2
34340  fi
34341done
34342  done
34343IFS=$as_save_IFS
34344
34345  ;;
34346esac
34347fi
34348LIPO=$ac_cv_path_LIPO
34349if test -n "$LIPO"; then
34350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34351$as_echo "$LIPO" >&6; }
34352else
34353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34354$as_echo "no" >&6; }
34355fi
34356
34357
34358        if test "x$LIPO" = x; then
34359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34360        fi
34361      else
34362        # Otherwise we believe it is a complete path. Use it as it is.
34363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34364$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34366$as_echo_n "checking for LIPO... " >&6; }
34367        if test ! -x "$tool_specified"; then
34368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34369$as_echo "not found" >&6; }
34370          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34371        fi
34372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34373$as_echo "$tool_specified" >&6; }
34374      fi
34375    fi
34376  fi
34377
34378
34379
34380  # Only process if variable expands to non-empty
34381
34382  if test "x$LIPO" != x; then
34383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34384
34385  # First separate the path from the arguments. This will split at the first
34386  # space.
34387  complete="$LIPO"
34388  path="${complete%% *}"
34389  tmp="$complete EOL"
34390  arguments="${tmp#* }"
34391
34392  # Input might be given as Windows format, start by converting to
34393  # unix format.
34394  new_path=`$CYGPATH -u "$path"`
34395
34396  # Now try to locate executable using which
34397  new_path=`$WHICH "$new_path" 2> /dev/null`
34398  # bat and cmd files are not always considered executable in cygwin causing which
34399  # to not find them
34400  if test "x$new_path" = x \
34401      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34402      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34403    new_path=`$CYGPATH -u "$path"`
34404  fi
34405  if test "x$new_path" = x; then
34406    # Oops. Which didn't find the executable.
34407    # The splitting of arguments from the executable at a space might have been incorrect,
34408    # since paths with space are more likely in Windows. Give it another try with the whole
34409    # argument.
34410    path="$complete"
34411    arguments="EOL"
34412    new_path=`$CYGPATH -u "$path"`
34413    new_path=`$WHICH "$new_path" 2> /dev/null`
34414    # bat and cmd files are not always considered executable in cygwin causing which
34415    # to not find them
34416    if test "x$new_path" = x \
34417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34419      new_path=`$CYGPATH -u "$path"`
34420    fi
34421    if test "x$new_path" = x; then
34422      # It's still not found. Now this is an unrecoverable error.
34423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34424$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34425      has_space=`$ECHO "$complete" | $GREP " "`
34426      if test "x$has_space" != x; then
34427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34429      fi
34430      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34431    fi
34432  fi
34433
34434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34437  # "foo.exe" is OK but "foo" is an error.
34438  #
34439  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34440  # It is also a way to make sure we got the proper file name for the real test later on.
34441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34442  if test "x$test_shortpath" = x; then
34443    # Short path failed, file does not exist as specified.
34444    # Try adding .exe or .cmd
34445    if test -f "${new_path}.exe"; then
34446      input_to_shortpath="${new_path}.exe"
34447    elif test -f "${new_path}.cmd"; then
34448      input_to_shortpath="${new_path}.cmd"
34449    else
34450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34451$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34452      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34453$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34454      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34455    fi
34456  else
34457    input_to_shortpath="$new_path"
34458  fi
34459
34460  # Call helper function which possibly converts this using DOS-style short mode.
34461  # If so, the updated path is stored in $new_path.
34462  new_path="$input_to_shortpath"
34463
34464  input_path="$input_to_shortpath"
34465  # Check if we need to convert this using DOS-style short mode. If the path
34466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34467  # take no chances and rewrite it.
34468  # Note: m4 eats our [], so we need to use [ and ] instead.
34469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34470  if test "x$has_forbidden_chars" != x; then
34471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34475      # Going to short mode and back again did indeed matter. Since short mode is
34476      # case insensitive, let's make it lowercase to improve readability.
34477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34478      # Now convert it back to Unix-style (cygpath)
34479      input_path=`$CYGPATH -u "$shortmode_path"`
34480      new_path="$input_path"
34481    fi
34482  fi
34483
34484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34485  if test "x$test_cygdrive_prefix" = x; then
34486    # As a simple fix, exclude /usr/bin since it's not a real path.
34487    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34489      # a path prefixed by /cygdrive for fixpath to work.
34490      new_path="$CYGWIN_ROOT_PATH$input_path"
34491    fi
34492  fi
34493
34494  # remove trailing .exe if any
34495  new_path="${new_path/%.exe/}"
34496
34497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34498
34499  # First separate the path from the arguments. This will split at the first
34500  # space.
34501  complete="$LIPO"
34502  path="${complete%% *}"
34503  tmp="$complete EOL"
34504  arguments="${tmp#* }"
34505
34506  # Input might be given as Windows format, start by converting to
34507  # unix format.
34508  new_path="$path"
34509
34510  windows_path="$new_path"
34511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34512    unix_path=`$CYGPATH -u "$windows_path"`
34513    new_path="$unix_path"
34514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34516    new_path="$unix_path"
34517  fi
34518
34519
34520  # Now try to locate executable using which
34521  new_path=`$WHICH "$new_path" 2> /dev/null`
34522
34523  if test "x$new_path" = x; then
34524    # Oops. Which didn't find the executable.
34525    # The splitting of arguments from the executable at a space might have been incorrect,
34526    # since paths with space are more likely in Windows. Give it another try with the whole
34527    # argument.
34528    path="$complete"
34529    arguments="EOL"
34530    new_path="$path"
34531
34532  windows_path="$new_path"
34533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34534    unix_path=`$CYGPATH -u "$windows_path"`
34535    new_path="$unix_path"
34536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34538    new_path="$unix_path"
34539  fi
34540
34541
34542    new_path=`$WHICH "$new_path" 2> /dev/null`
34543    # bat and cmd files are not always considered executable in MSYS causing which
34544    # to not find them
34545    if test "x$new_path" = x \
34546        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34547        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34548      new_path="$path"
34549
34550  windows_path="$new_path"
34551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34552    unix_path=`$CYGPATH -u "$windows_path"`
34553    new_path="$unix_path"
34554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34556    new_path="$unix_path"
34557  fi
34558
34559    fi
34560
34561    if test "x$new_path" = x; then
34562      # It's still not found. Now this is an unrecoverable error.
34563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34564$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34565      has_space=`$ECHO "$complete" | $GREP " "`
34566      if test "x$has_space" != x; then
34567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34569      fi
34570      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34571    fi
34572  fi
34573
34574  # Now new_path has a complete unix path to the binary
34575  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34576    # Keep paths in /bin as-is, but remove trailing .exe if any
34577    new_path="${new_path/%.exe/}"
34578    # Do not save /bin paths to all_fixpath_prefixes!
34579  else
34580    # Not in mixed or Windows style, start by that.
34581    new_path=`cmd //c echo $new_path`
34582
34583  input_path="$new_path"
34584  # Check if we need to convert this using DOS-style short mode. If the path
34585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34586  # take no chances and rewrite it.
34587  # Note: m4 eats our [], so we need to use [ and ] instead.
34588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34589  if test "x$has_forbidden_chars" != x; then
34590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34592  fi
34593
34594    # Output is in $new_path
34595
34596  windows_path="$new_path"
34597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34598    unix_path=`$CYGPATH -u "$windows_path"`
34599    new_path="$unix_path"
34600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34602    new_path="$unix_path"
34603  fi
34604
34605    # remove trailing .exe if any
34606    new_path="${new_path/%.exe/}"
34607
34608    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34609    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34610  fi
34611
34612    else
34613      # We're on a unix platform. Hooray! :)
34614      # First separate the path from the arguments. This will split at the first
34615      # space.
34616      complete="$LIPO"
34617      path="${complete%% *}"
34618      tmp="$complete EOL"
34619      arguments="${tmp#* }"
34620
34621      # Cannot rely on the command "which" here since it doesn't always work.
34622      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34623      if test -z "$is_absolute_path"; then
34624        # Path to executable is not absolute. Find it.
34625        IFS_save="$IFS"
34626        IFS=:
34627        for p in $PATH; do
34628          if test -f "$p/$path" && test -x "$p/$path"; then
34629            new_path="$p/$path"
34630            break
34631          fi
34632        done
34633        IFS="$IFS_save"
34634      else
34635        # This is an absolute path, we can use it without further modifications.
34636        new_path="$path"
34637      fi
34638
34639      if test "x$new_path" = x; then
34640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34641$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34642        has_space=`$ECHO "$complete" | $GREP " "`
34643        if test "x$has_space" != x; then
34644          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34645$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34646        fi
34647        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34648      fi
34649    fi
34650
34651    # Now join together the path and the arguments once again
34652    if test "x$arguments" != xEOL; then
34653      new_complete="$new_path ${arguments% *}"
34654    else
34655      new_complete="$new_path"
34656    fi
34657
34658    if test "x$complete" != "x$new_complete"; then
34659      LIPO="$new_complete"
34660      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34661$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34662    fi
34663  fi
34664
34665  fi
34666
34667  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34668    # Extract the first word of "mt", so it can be a program name with args.
34669set dummy mt; ac_word=$2
34670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34671$as_echo_n "checking for $ac_word... " >&6; }
34672if ${ac_cv_prog_MT+:} false; then :
34673  $as_echo_n "(cached) " >&6
34674else
34675  if test -n "$MT"; then
34676  ac_cv_prog_MT="$MT" # Let the user override the test.
34677else
34678  ac_prog_rejected=no
34679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34680for as_dir in $PATH
34681do
34682  IFS=$as_save_IFS
34683  test -z "$as_dir" && as_dir=.
34684    for ac_exec_ext in '' $ac_executable_extensions; do
34685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34686    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34687       ac_prog_rejected=yes
34688       continue
34689     fi
34690    ac_cv_prog_MT="mt"
34691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34692    break 2
34693  fi
34694done
34695  done
34696IFS=$as_save_IFS
34697
34698if test $ac_prog_rejected = yes; then
34699  # We found a bogon in the path, so make sure we never use it.
34700  set dummy $ac_cv_prog_MT
34701  shift
34702  if test $# != 0; then
34703    # We chose a different compiler from the bogus one.
34704    # However, it has the same basename, so the bogon will be chosen
34705    # first if we set MT to just the basename; use the full file name.
34706    shift
34707    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34708  fi
34709fi
34710fi
34711fi
34712MT=$ac_cv_prog_MT
34713if test -n "$MT"; then
34714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34715$as_echo "$MT" >&6; }
34716else
34717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34718$as_echo "no" >&6; }
34719fi
34720
34721
34722
34723  # Only process if variable expands to non-empty
34724
34725  if test "x$MT" != x; then
34726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34727
34728  # First separate the path from the arguments. This will split at the first
34729  # space.
34730  complete="$MT"
34731  path="${complete%% *}"
34732  tmp="$complete EOL"
34733  arguments="${tmp#* }"
34734
34735  # Input might be given as Windows format, start by converting to
34736  # unix format.
34737  new_path=`$CYGPATH -u "$path"`
34738
34739  # Now try to locate executable using which
34740  new_path=`$WHICH "$new_path" 2> /dev/null`
34741  # bat and cmd files are not always considered executable in cygwin causing which
34742  # to not find them
34743  if test "x$new_path" = x \
34744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34746    new_path=`$CYGPATH -u "$path"`
34747  fi
34748  if test "x$new_path" = x; then
34749    # Oops. Which didn't find the executable.
34750    # The splitting of arguments from the executable at a space might have been incorrect,
34751    # since paths with space are more likely in Windows. Give it another try with the whole
34752    # argument.
34753    path="$complete"
34754    arguments="EOL"
34755    new_path=`$CYGPATH -u "$path"`
34756    new_path=`$WHICH "$new_path" 2> /dev/null`
34757    # bat and cmd files are not always considered executable in cygwin causing which
34758    # to not find them
34759    if test "x$new_path" = x \
34760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34762      new_path=`$CYGPATH -u "$path"`
34763    fi
34764    if test "x$new_path" = x; then
34765      # It's still not found. Now this is an unrecoverable error.
34766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34767$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34768      has_space=`$ECHO "$complete" | $GREP " "`
34769      if test "x$has_space" != x; then
34770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34772      fi
34773      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34774    fi
34775  fi
34776
34777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34780  # "foo.exe" is OK but "foo" is an error.
34781  #
34782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34783  # It is also a way to make sure we got the proper file name for the real test later on.
34784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34785  if test "x$test_shortpath" = x; then
34786    # Short path failed, file does not exist as specified.
34787    # Try adding .exe or .cmd
34788    if test -f "${new_path}.exe"; then
34789      input_to_shortpath="${new_path}.exe"
34790    elif test -f "${new_path}.cmd"; then
34791      input_to_shortpath="${new_path}.cmd"
34792    else
34793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34794$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34797      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34798    fi
34799  else
34800    input_to_shortpath="$new_path"
34801  fi
34802
34803  # Call helper function which possibly converts this using DOS-style short mode.
34804  # If so, the updated path is stored in $new_path.
34805  new_path="$input_to_shortpath"
34806
34807  input_path="$input_to_shortpath"
34808  # Check if we need to convert this using DOS-style short mode. If the path
34809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34810  # take no chances and rewrite it.
34811  # Note: m4 eats our [], so we need to use [ and ] instead.
34812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34813  if test "x$has_forbidden_chars" != x; then
34814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34818      # Going to short mode and back again did indeed matter. Since short mode is
34819      # case insensitive, let's make it lowercase to improve readability.
34820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34821      # Now convert it back to Unix-style (cygpath)
34822      input_path=`$CYGPATH -u "$shortmode_path"`
34823      new_path="$input_path"
34824    fi
34825  fi
34826
34827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34828  if test "x$test_cygdrive_prefix" = x; then
34829    # As a simple fix, exclude /usr/bin since it's not a real path.
34830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34832      # a path prefixed by /cygdrive for fixpath to work.
34833      new_path="$CYGWIN_ROOT_PATH$input_path"
34834    fi
34835  fi
34836
34837  # remove trailing .exe if any
34838  new_path="${new_path/%.exe/}"
34839
34840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34841
34842  # First separate the path from the arguments. This will split at the first
34843  # space.
34844  complete="$MT"
34845  path="${complete%% *}"
34846  tmp="$complete EOL"
34847  arguments="${tmp#* }"
34848
34849  # Input might be given as Windows format, start by converting to
34850  # unix format.
34851  new_path="$path"
34852
34853  windows_path="$new_path"
34854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34855    unix_path=`$CYGPATH -u "$windows_path"`
34856    new_path="$unix_path"
34857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34859    new_path="$unix_path"
34860  fi
34861
34862
34863  # Now try to locate executable using which
34864  new_path=`$WHICH "$new_path" 2> /dev/null`
34865
34866  if test "x$new_path" = x; then
34867    # Oops. Which didn't find the executable.
34868    # The splitting of arguments from the executable at a space might have been incorrect,
34869    # since paths with space are more likely in Windows. Give it another try with the whole
34870    # argument.
34871    path="$complete"
34872    arguments="EOL"
34873    new_path="$path"
34874
34875  windows_path="$new_path"
34876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34877    unix_path=`$CYGPATH -u "$windows_path"`
34878    new_path="$unix_path"
34879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34881    new_path="$unix_path"
34882  fi
34883
34884
34885    new_path=`$WHICH "$new_path" 2> /dev/null`
34886    # bat and cmd files are not always considered executable in MSYS causing which
34887    # to not find them
34888    if test "x$new_path" = x \
34889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34891      new_path="$path"
34892
34893  windows_path="$new_path"
34894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34895    unix_path=`$CYGPATH -u "$windows_path"`
34896    new_path="$unix_path"
34897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34899    new_path="$unix_path"
34900  fi
34901
34902    fi
34903
34904    if test "x$new_path" = x; then
34905      # It's still not found. Now this is an unrecoverable error.
34906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34907$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34908      has_space=`$ECHO "$complete" | $GREP " "`
34909      if test "x$has_space" != x; then
34910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34912      fi
34913      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34914    fi
34915  fi
34916
34917  # Now new_path has a complete unix path to the binary
34918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34919    # Keep paths in /bin as-is, but remove trailing .exe if any
34920    new_path="${new_path/%.exe/}"
34921    # Do not save /bin paths to all_fixpath_prefixes!
34922  else
34923    # Not in mixed or Windows style, start by that.
34924    new_path=`cmd //c echo $new_path`
34925
34926  input_path="$new_path"
34927  # Check if we need to convert this using DOS-style short mode. If the path
34928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34929  # take no chances and rewrite it.
34930  # Note: m4 eats our [], so we need to use [ and ] instead.
34931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34932  if test "x$has_forbidden_chars" != x; then
34933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34935  fi
34936
34937    # Output is in $new_path
34938
34939  windows_path="$new_path"
34940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34941    unix_path=`$CYGPATH -u "$windows_path"`
34942    new_path="$unix_path"
34943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34945    new_path="$unix_path"
34946  fi
34947
34948    # remove trailing .exe if any
34949    new_path="${new_path/%.exe/}"
34950
34951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34953  fi
34954
34955    else
34956      # We're on a unix platform. Hooray! :)
34957      # First separate the path from the arguments. This will split at the first
34958      # space.
34959      complete="$MT"
34960      path="${complete%% *}"
34961      tmp="$complete EOL"
34962      arguments="${tmp#* }"
34963
34964      # Cannot rely on the command "which" here since it doesn't always work.
34965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34966      if test -z "$is_absolute_path"; then
34967        # Path to executable is not absolute. Find it.
34968        IFS_save="$IFS"
34969        IFS=:
34970        for p in $PATH; do
34971          if test -f "$p/$path" && test -x "$p/$path"; then
34972            new_path="$p/$path"
34973            break
34974          fi
34975        done
34976        IFS="$IFS_save"
34977      else
34978        # This is an absolute path, we can use it without further modifications.
34979        new_path="$path"
34980      fi
34981
34982      if test "x$new_path" = x; then
34983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34984$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34985        has_space=`$ECHO "$complete" | $GREP " "`
34986        if test "x$has_space" != x; then
34987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34989        fi
34990        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34991      fi
34992    fi
34993
34994    # Now join together the path and the arguments once again
34995    if test "x$arguments" != xEOL; then
34996      new_complete="$new_path ${arguments% *}"
34997    else
34998      new_complete="$new_path"
34999    fi
35000
35001    if test "x$complete" != "x$new_complete"; then
35002      MT="$new_complete"
35003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
35004$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
35005    fi
35006  fi
35007
35008    # Setup the resource compiler (RC)
35009    # Extract the first word of "rc", so it can be a program name with args.
35010set dummy rc; ac_word=$2
35011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35012$as_echo_n "checking for $ac_word... " >&6; }
35013if ${ac_cv_prog_RC+:} false; then :
35014  $as_echo_n "(cached) " >&6
35015else
35016  if test -n "$RC"; then
35017  ac_cv_prog_RC="$RC" # Let the user override the test.
35018else
35019  ac_prog_rejected=no
35020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35021for as_dir in $PATH
35022do
35023  IFS=$as_save_IFS
35024  test -z "$as_dir" && as_dir=.
35025    for ac_exec_ext in '' $ac_executable_extensions; do
35026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35027    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
35028       ac_prog_rejected=yes
35029       continue
35030     fi
35031    ac_cv_prog_RC="rc"
35032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35033    break 2
35034  fi
35035done
35036  done
35037IFS=$as_save_IFS
35038
35039if test $ac_prog_rejected = yes; then
35040  # We found a bogon in the path, so make sure we never use it.
35041  set dummy $ac_cv_prog_RC
35042  shift
35043  if test $# != 0; then
35044    # We chose a different compiler from the bogus one.
35045    # However, it has the same basename, so the bogon will be chosen
35046    # first if we set RC to just the basename; use the full file name.
35047    shift
35048    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
35049  fi
35050fi
35051fi
35052fi
35053RC=$ac_cv_prog_RC
35054if test -n "$RC"; then
35055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
35056$as_echo "$RC" >&6; }
35057else
35058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35059$as_echo "no" >&6; }
35060fi
35061
35062
35063
35064  # Only process if variable expands to non-empty
35065
35066  if test "x$RC" != x; then
35067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35068
35069  # First separate the path from the arguments. This will split at the first
35070  # space.
35071  complete="$RC"
35072  path="${complete%% *}"
35073  tmp="$complete EOL"
35074  arguments="${tmp#* }"
35075
35076  # Input might be given as Windows format, start by converting to
35077  # unix format.
35078  new_path=`$CYGPATH -u "$path"`
35079
35080  # Now try to locate executable using which
35081  new_path=`$WHICH "$new_path" 2> /dev/null`
35082  # bat and cmd files are not always considered executable in cygwin causing which
35083  # to not find them
35084  if test "x$new_path" = x \
35085      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35086      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35087    new_path=`$CYGPATH -u "$path"`
35088  fi
35089  if test "x$new_path" = x; then
35090    # Oops. Which didn't find the executable.
35091    # The splitting of arguments from the executable at a space might have been incorrect,
35092    # since paths with space are more likely in Windows. Give it another try with the whole
35093    # argument.
35094    path="$complete"
35095    arguments="EOL"
35096    new_path=`$CYGPATH -u "$path"`
35097    new_path=`$WHICH "$new_path" 2> /dev/null`
35098    # bat and cmd files are not always considered executable in cygwin causing which
35099    # to not find them
35100    if test "x$new_path" = x \
35101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35103      new_path=`$CYGPATH -u "$path"`
35104    fi
35105    if test "x$new_path" = x; then
35106      # It's still not found. Now this is an unrecoverable error.
35107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35108$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35109      has_space=`$ECHO "$complete" | $GREP " "`
35110      if test "x$has_space" != x; then
35111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35113      fi
35114      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35115    fi
35116  fi
35117
35118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35121  # "foo.exe" is OK but "foo" is an error.
35122  #
35123  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35124  # It is also a way to make sure we got the proper file name for the real test later on.
35125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35126  if test "x$test_shortpath" = x; then
35127    # Short path failed, file does not exist as specified.
35128    # Try adding .exe or .cmd
35129    if test -f "${new_path}.exe"; then
35130      input_to_shortpath="${new_path}.exe"
35131    elif test -f "${new_path}.cmd"; then
35132      input_to_shortpath="${new_path}.cmd"
35133    else
35134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35135$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35138      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35139    fi
35140  else
35141    input_to_shortpath="$new_path"
35142  fi
35143
35144  # Call helper function which possibly converts this using DOS-style short mode.
35145  # If so, the updated path is stored in $new_path.
35146  new_path="$input_to_shortpath"
35147
35148  input_path="$input_to_shortpath"
35149  # Check if we need to convert this using DOS-style short mode. If the path
35150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35151  # take no chances and rewrite it.
35152  # Note: m4 eats our [], so we need to use [ and ] instead.
35153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35154  if test "x$has_forbidden_chars" != x; then
35155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35159      # Going to short mode and back again did indeed matter. Since short mode is
35160      # case insensitive, let's make it lowercase to improve readability.
35161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35162      # Now convert it back to Unix-style (cygpath)
35163      input_path=`$CYGPATH -u "$shortmode_path"`
35164      new_path="$input_path"
35165    fi
35166  fi
35167
35168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35169  if test "x$test_cygdrive_prefix" = x; then
35170    # As a simple fix, exclude /usr/bin since it's not a real path.
35171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35173      # a path prefixed by /cygdrive for fixpath to work.
35174      new_path="$CYGWIN_ROOT_PATH$input_path"
35175    fi
35176  fi
35177
35178  # remove trailing .exe if any
35179  new_path="${new_path/%.exe/}"
35180
35181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35182
35183  # First separate the path from the arguments. This will split at the first
35184  # space.
35185  complete="$RC"
35186  path="${complete%% *}"
35187  tmp="$complete EOL"
35188  arguments="${tmp#* }"
35189
35190  # Input might be given as Windows format, start by converting to
35191  # unix format.
35192  new_path="$path"
35193
35194  windows_path="$new_path"
35195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35196    unix_path=`$CYGPATH -u "$windows_path"`
35197    new_path="$unix_path"
35198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35200    new_path="$unix_path"
35201  fi
35202
35203
35204  # Now try to locate executable using which
35205  new_path=`$WHICH "$new_path" 2> /dev/null`
35206
35207  if test "x$new_path" = x; then
35208    # Oops. Which didn't find the executable.
35209    # The splitting of arguments from the executable at a space might have been incorrect,
35210    # since paths with space are more likely in Windows. Give it another try with the whole
35211    # argument.
35212    path="$complete"
35213    arguments="EOL"
35214    new_path="$path"
35215
35216  windows_path="$new_path"
35217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35218    unix_path=`$CYGPATH -u "$windows_path"`
35219    new_path="$unix_path"
35220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35222    new_path="$unix_path"
35223  fi
35224
35225
35226    new_path=`$WHICH "$new_path" 2> /dev/null`
35227    # bat and cmd files are not always considered executable in MSYS causing which
35228    # to not find them
35229    if test "x$new_path" = x \
35230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35232      new_path="$path"
35233
35234  windows_path="$new_path"
35235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35236    unix_path=`$CYGPATH -u "$windows_path"`
35237    new_path="$unix_path"
35238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35240    new_path="$unix_path"
35241  fi
35242
35243    fi
35244
35245    if test "x$new_path" = x; then
35246      # It's still not found. Now this is an unrecoverable error.
35247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35248$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35249      has_space=`$ECHO "$complete" | $GREP " "`
35250      if test "x$has_space" != x; then
35251        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35252$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35253      fi
35254      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35255    fi
35256  fi
35257
35258  # Now new_path has a complete unix path to the binary
35259  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35260    # Keep paths in /bin as-is, but remove trailing .exe if any
35261    new_path="${new_path/%.exe/}"
35262    # Do not save /bin paths to all_fixpath_prefixes!
35263  else
35264    # Not in mixed or Windows style, start by that.
35265    new_path=`cmd //c echo $new_path`
35266
35267  input_path="$new_path"
35268  # Check if we need to convert this using DOS-style short mode. If the path
35269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35270  # take no chances and rewrite it.
35271  # Note: m4 eats our [], so we need to use [ and ] instead.
35272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35273  if test "x$has_forbidden_chars" != x; then
35274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35276  fi
35277
35278    # Output is in $new_path
35279
35280  windows_path="$new_path"
35281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35282    unix_path=`$CYGPATH -u "$windows_path"`
35283    new_path="$unix_path"
35284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35286    new_path="$unix_path"
35287  fi
35288
35289    # remove trailing .exe if any
35290    new_path="${new_path/%.exe/}"
35291
35292    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35293    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35294  fi
35295
35296    else
35297      # We're on a unix platform. Hooray! :)
35298      # First separate the path from the arguments. This will split at the first
35299      # space.
35300      complete="$RC"
35301      path="${complete%% *}"
35302      tmp="$complete EOL"
35303      arguments="${tmp#* }"
35304
35305      # Cannot rely on the command "which" here since it doesn't always work.
35306      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35307      if test -z "$is_absolute_path"; then
35308        # Path to executable is not absolute. Find it.
35309        IFS_save="$IFS"
35310        IFS=:
35311        for p in $PATH; do
35312          if test -f "$p/$path" && test -x "$p/$path"; then
35313            new_path="$p/$path"
35314            break
35315          fi
35316        done
35317        IFS="$IFS_save"
35318      else
35319        # This is an absolute path, we can use it without further modifications.
35320        new_path="$path"
35321      fi
35322
35323      if test "x$new_path" = x; then
35324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35325$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35326        has_space=`$ECHO "$complete" | $GREP " "`
35327        if test "x$has_space" != x; then
35328          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35329$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35330        fi
35331        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35332      fi
35333    fi
35334
35335    # Now join together the path and the arguments once again
35336    if test "x$arguments" != xEOL; then
35337      new_complete="$new_path ${arguments% *}"
35338    else
35339      new_complete="$new_path"
35340    fi
35341
35342    if test "x$complete" != "x$new_complete"; then
35343      RC="$new_complete"
35344      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35345$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35346    fi
35347  fi
35348
35349    # Extract the first word of "dumpbin", so it can be a program name with args.
35350set dummy dumpbin; ac_word=$2
35351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35352$as_echo_n "checking for $ac_word... " >&6; }
35353if ${ac_cv_prog_DUMPBIN+:} false; then :
35354  $as_echo_n "(cached) " >&6
35355else
35356  if test -n "$DUMPBIN"; then
35357  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35358else
35359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35360for as_dir in $PATH
35361do
35362  IFS=$as_save_IFS
35363  test -z "$as_dir" && as_dir=.
35364    for ac_exec_ext in '' $ac_executable_extensions; do
35365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35366    ac_cv_prog_DUMPBIN="dumpbin"
35367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35368    break 2
35369  fi
35370done
35371  done
35372IFS=$as_save_IFS
35373
35374fi
35375fi
35376DUMPBIN=$ac_cv_prog_DUMPBIN
35377if test -n "$DUMPBIN"; then
35378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35379$as_echo "$DUMPBIN" >&6; }
35380else
35381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35382$as_echo "no" >&6; }
35383fi
35384
35385
35386
35387  # Only process if variable expands to non-empty
35388
35389  if test "x$DUMPBIN" != x; then
35390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35391
35392  # First separate the path from the arguments. This will split at the first
35393  # space.
35394  complete="$DUMPBIN"
35395  path="${complete%% *}"
35396  tmp="$complete EOL"
35397  arguments="${tmp#* }"
35398
35399  # Input might be given as Windows format, start by converting to
35400  # unix format.
35401  new_path=`$CYGPATH -u "$path"`
35402
35403  # Now try to locate executable using which
35404  new_path=`$WHICH "$new_path" 2> /dev/null`
35405  # bat and cmd files are not always considered executable in cygwin causing which
35406  # to not find them
35407  if test "x$new_path" = x \
35408      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35409      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35410    new_path=`$CYGPATH -u "$path"`
35411  fi
35412  if test "x$new_path" = x; then
35413    # Oops. Which didn't find the executable.
35414    # The splitting of arguments from the executable at a space might have been incorrect,
35415    # since paths with space are more likely in Windows. Give it another try with the whole
35416    # argument.
35417    path="$complete"
35418    arguments="EOL"
35419    new_path=`$CYGPATH -u "$path"`
35420    new_path=`$WHICH "$new_path" 2> /dev/null`
35421    # bat and cmd files are not always considered executable in cygwin causing which
35422    # to not find them
35423    if test "x$new_path" = x \
35424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35426      new_path=`$CYGPATH -u "$path"`
35427    fi
35428    if test "x$new_path" = x; then
35429      # It's still not found. Now this is an unrecoverable error.
35430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35431$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35432      has_space=`$ECHO "$complete" | $GREP " "`
35433      if test "x$has_space" != x; then
35434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35436      fi
35437      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35438    fi
35439  fi
35440
35441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35444  # "foo.exe" is OK but "foo" is an error.
35445  #
35446  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35447  # It is also a way to make sure we got the proper file name for the real test later on.
35448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35449  if test "x$test_shortpath" = x; then
35450    # Short path failed, file does not exist as specified.
35451    # Try adding .exe or .cmd
35452    if test -f "${new_path}.exe"; then
35453      input_to_shortpath="${new_path}.exe"
35454    elif test -f "${new_path}.cmd"; then
35455      input_to_shortpath="${new_path}.cmd"
35456    else
35457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35458$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35459      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35460$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35461      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35462    fi
35463  else
35464    input_to_shortpath="$new_path"
35465  fi
35466
35467  # Call helper function which possibly converts this using DOS-style short mode.
35468  # If so, the updated path is stored in $new_path.
35469  new_path="$input_to_shortpath"
35470
35471  input_path="$input_to_shortpath"
35472  # Check if we need to convert this using DOS-style short mode. If the path
35473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35474  # take no chances and rewrite it.
35475  # Note: m4 eats our [], so we need to use [ and ] instead.
35476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35477  if test "x$has_forbidden_chars" != x; then
35478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35482      # Going to short mode and back again did indeed matter. Since short mode is
35483      # case insensitive, let's make it lowercase to improve readability.
35484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35485      # Now convert it back to Unix-style (cygpath)
35486      input_path=`$CYGPATH -u "$shortmode_path"`
35487      new_path="$input_path"
35488    fi
35489  fi
35490
35491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35492  if test "x$test_cygdrive_prefix" = x; then
35493    # As a simple fix, exclude /usr/bin since it's not a real path.
35494    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35496      # a path prefixed by /cygdrive for fixpath to work.
35497      new_path="$CYGWIN_ROOT_PATH$input_path"
35498    fi
35499  fi
35500
35501  # remove trailing .exe if any
35502  new_path="${new_path/%.exe/}"
35503
35504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35505
35506  # First separate the path from the arguments. This will split at the first
35507  # space.
35508  complete="$DUMPBIN"
35509  path="${complete%% *}"
35510  tmp="$complete EOL"
35511  arguments="${tmp#* }"
35512
35513  # Input might be given as Windows format, start by converting to
35514  # unix format.
35515  new_path="$path"
35516
35517  windows_path="$new_path"
35518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35519    unix_path=`$CYGPATH -u "$windows_path"`
35520    new_path="$unix_path"
35521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35523    new_path="$unix_path"
35524  fi
35525
35526
35527  # Now try to locate executable using which
35528  new_path=`$WHICH "$new_path" 2> /dev/null`
35529
35530  if test "x$new_path" = x; then
35531    # Oops. Which didn't find the executable.
35532    # The splitting of arguments from the executable at a space might have been incorrect,
35533    # since paths with space are more likely in Windows. Give it another try with the whole
35534    # argument.
35535    path="$complete"
35536    arguments="EOL"
35537    new_path="$path"
35538
35539  windows_path="$new_path"
35540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35541    unix_path=`$CYGPATH -u "$windows_path"`
35542    new_path="$unix_path"
35543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35545    new_path="$unix_path"
35546  fi
35547
35548
35549    new_path=`$WHICH "$new_path" 2> /dev/null`
35550    # bat and cmd files are not always considered executable in MSYS causing which
35551    # to not find them
35552    if test "x$new_path" = x \
35553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35555      new_path="$path"
35556
35557  windows_path="$new_path"
35558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35559    unix_path=`$CYGPATH -u "$windows_path"`
35560    new_path="$unix_path"
35561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35563    new_path="$unix_path"
35564  fi
35565
35566    fi
35567
35568    if test "x$new_path" = x; then
35569      # It's still not found. Now this is an unrecoverable error.
35570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35571$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35572      has_space=`$ECHO "$complete" | $GREP " "`
35573      if test "x$has_space" != x; then
35574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35576      fi
35577      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35578    fi
35579  fi
35580
35581  # Now new_path has a complete unix path to the binary
35582  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35583    # Keep paths in /bin as-is, but remove trailing .exe if any
35584    new_path="${new_path/%.exe/}"
35585    # Do not save /bin paths to all_fixpath_prefixes!
35586  else
35587    # Not in mixed or Windows style, start by that.
35588    new_path=`cmd //c echo $new_path`
35589
35590  input_path="$new_path"
35591  # Check if we need to convert this using DOS-style short mode. If the path
35592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35593  # take no chances and rewrite it.
35594  # Note: m4 eats our [], so we need to use [ and ] instead.
35595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35596  if test "x$has_forbidden_chars" != x; then
35597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35599  fi
35600
35601    # Output is in $new_path
35602
35603  windows_path="$new_path"
35604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35605    unix_path=`$CYGPATH -u "$windows_path"`
35606    new_path="$unix_path"
35607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35609    new_path="$unix_path"
35610  fi
35611
35612    # remove trailing .exe if any
35613    new_path="${new_path/%.exe/}"
35614
35615    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35616    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35617  fi
35618
35619    else
35620      # We're on a unix platform. Hooray! :)
35621      # First separate the path from the arguments. This will split at the first
35622      # space.
35623      complete="$DUMPBIN"
35624      path="${complete%% *}"
35625      tmp="$complete EOL"
35626      arguments="${tmp#* }"
35627
35628      # Cannot rely on the command "which" here since it doesn't always work.
35629      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35630      if test -z "$is_absolute_path"; then
35631        # Path to executable is not absolute. Find it.
35632        IFS_save="$IFS"
35633        IFS=:
35634        for p in $PATH; do
35635          if test -f "$p/$path" && test -x "$p/$path"; then
35636            new_path="$p/$path"
35637            break
35638          fi
35639        done
35640        IFS="$IFS_save"
35641      else
35642        # This is an absolute path, we can use it without further modifications.
35643        new_path="$path"
35644      fi
35645
35646      if test "x$new_path" = x; then
35647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35648$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35649        has_space=`$ECHO "$complete" | $GREP " "`
35650        if test "x$has_space" != x; then
35651          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35652$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35653        fi
35654        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35655      fi
35656    fi
35657
35658    # Now join together the path and the arguments once again
35659    if test "x$arguments" != xEOL; then
35660      new_complete="$new_path ${arguments% *}"
35661    else
35662      new_complete="$new_path"
35663    fi
35664
35665    if test "x$complete" != "x$new_complete"; then
35666      DUMPBIN="$new_complete"
35667      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35668$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35669    fi
35670  fi
35671
35672    # We need to check for 'msbuild.exe' because at the place where we expect to
35673    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35674    # won't find the 'msbuild.exe' executable in that case (and the
35675    # 'ac_executable_extensions' is unusable due to performance reasons).
35676    # Notice that we intentionally don't fix up the path to MSBUILD because we
35677    # will call it in a DOS shell during freetype detection on Windows (see
35678    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35679    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35680set dummy msbuild.exe; ac_word=$2
35681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35682$as_echo_n "checking for $ac_word... " >&6; }
35683if ${ac_cv_prog_MSBUILD+:} false; then :
35684  $as_echo_n "(cached) " >&6
35685else
35686  if test -n "$MSBUILD"; then
35687  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35688else
35689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35690for as_dir in $PATH
35691do
35692  IFS=$as_save_IFS
35693  test -z "$as_dir" && as_dir=.
35694    for ac_exec_ext in '' $ac_executable_extensions; do
35695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35696    ac_cv_prog_MSBUILD="msbuild.exe"
35697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35698    break 2
35699  fi
35700done
35701  done
35702IFS=$as_save_IFS
35703
35704fi
35705fi
35706MSBUILD=$ac_cv_prog_MSBUILD
35707if test -n "$MSBUILD"; then
35708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35709$as_echo "$MSBUILD" >&6; }
35710else
35711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35712$as_echo "no" >&6; }
35713fi
35714
35715
35716  fi
35717
35718  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35719
35720
35721  # Publish this variable in the help.
35722
35723
35724  if test "x$STRIP" = x; then
35725    # The variable is not set by user, try to locate tool using the code snippet
35726    for ac_prog in strip
35727do
35728  # Extract the first word of "$ac_prog", so it can be a program name with args.
35729set dummy $ac_prog; ac_word=$2
35730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35731$as_echo_n "checking for $ac_word... " >&6; }
35732if ${ac_cv_path_STRIP+:} false; then :
35733  $as_echo_n "(cached) " >&6
35734else
35735  case $STRIP in
35736  [\\/]* | ?:[\\/]*)
35737  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35738  ;;
35739  *)
35740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35741for as_dir in $PATH
35742do
35743  IFS=$as_save_IFS
35744  test -z "$as_dir" && as_dir=.
35745    for ac_exec_ext in '' $ac_executable_extensions; do
35746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35747    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35749    break 2
35750  fi
35751done
35752  done
35753IFS=$as_save_IFS
35754
35755  ;;
35756esac
35757fi
35758STRIP=$ac_cv_path_STRIP
35759if test -n "$STRIP"; then
35760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35761$as_echo "$STRIP" >&6; }
35762else
35763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35764$as_echo "no" >&6; }
35765fi
35766
35767
35768  test -n "$STRIP" && break
35769done
35770
35771  else
35772    # The variable is set, but is it from the command line or the environment?
35773
35774    # Try to remove the string !STRIP! from our list.
35775    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35776    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35777      # If it failed, the variable was not from the command line. Ignore it,
35778      # but warn the user (except for BASH, which is always set by the calling BASH).
35779      if test "xSTRIP" != xBASH; then
35780        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35781$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35782      fi
35783      # Try to locate tool using the code snippet
35784      for ac_prog in strip
35785do
35786  # Extract the first word of "$ac_prog", so it can be a program name with args.
35787set dummy $ac_prog; ac_word=$2
35788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35789$as_echo_n "checking for $ac_word... " >&6; }
35790if ${ac_cv_path_STRIP+:} false; then :
35791  $as_echo_n "(cached) " >&6
35792else
35793  case $STRIP in
35794  [\\/]* | ?:[\\/]*)
35795  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35796  ;;
35797  *)
35798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35799for as_dir in $PATH
35800do
35801  IFS=$as_save_IFS
35802  test -z "$as_dir" && as_dir=.
35803    for ac_exec_ext in '' $ac_executable_extensions; do
35804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35805    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35807    break 2
35808  fi
35809done
35810  done
35811IFS=$as_save_IFS
35812
35813  ;;
35814esac
35815fi
35816STRIP=$ac_cv_path_STRIP
35817if test -n "$STRIP"; then
35818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35819$as_echo "$STRIP" >&6; }
35820else
35821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35822$as_echo "no" >&6; }
35823fi
35824
35825
35826  test -n "$STRIP" && break
35827done
35828
35829    else
35830      # If it succeeded, then it was overridden by the user. We will use it
35831      # for the tool.
35832
35833      # First remove it from the list of overridden variables, so we can test
35834      # for unknown variables in the end.
35835      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35836
35837      # Check if the provided tool contains a complete path.
35838      tool_specified="$STRIP"
35839      tool_basename="${tool_specified##*/}"
35840      if test "x$tool_basename" = "x$tool_specified"; then
35841        # A command without a complete path is provided, search $PATH.
35842        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35843$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35844        # Extract the first word of "$tool_basename", so it can be a program name with args.
35845set dummy $tool_basename; ac_word=$2
35846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35847$as_echo_n "checking for $ac_word... " >&6; }
35848if ${ac_cv_path_STRIP+:} false; then :
35849  $as_echo_n "(cached) " >&6
35850else
35851  case $STRIP in
35852  [\\/]* | ?:[\\/]*)
35853  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35854  ;;
35855  *)
35856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35857for as_dir in $PATH
35858do
35859  IFS=$as_save_IFS
35860  test -z "$as_dir" && as_dir=.
35861    for ac_exec_ext in '' $ac_executable_extensions; do
35862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35863    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35865    break 2
35866  fi
35867done
35868  done
35869IFS=$as_save_IFS
35870
35871  ;;
35872esac
35873fi
35874STRIP=$ac_cv_path_STRIP
35875if test -n "$STRIP"; then
35876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35877$as_echo "$STRIP" >&6; }
35878else
35879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35880$as_echo "no" >&6; }
35881fi
35882
35883
35884        if test "x$STRIP" = x; then
35885          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35886        fi
35887      else
35888        # Otherwise we believe it is a complete path. Use it as it is.
35889        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35890$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35892$as_echo_n "checking for STRIP... " >&6; }
35893        if test ! -x "$tool_specified"; then
35894          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35895$as_echo "not found" >&6; }
35896          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35897        fi
35898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35899$as_echo "$tool_specified" >&6; }
35900      fi
35901    fi
35902  fi
35903
35904
35905
35906  # Only process if variable expands to non-empty
35907
35908  if test "x$STRIP" != x; then
35909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35910
35911  # First separate the path from the arguments. This will split at the first
35912  # space.
35913  complete="$STRIP"
35914  path="${complete%% *}"
35915  tmp="$complete EOL"
35916  arguments="${tmp#* }"
35917
35918  # Input might be given as Windows format, start by converting to
35919  # unix format.
35920  new_path=`$CYGPATH -u "$path"`
35921
35922  # Now try to locate executable using which
35923  new_path=`$WHICH "$new_path" 2> /dev/null`
35924  # bat and cmd files are not always considered executable in cygwin causing which
35925  # to not find them
35926  if test "x$new_path" = x \
35927      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35928      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35929    new_path=`$CYGPATH -u "$path"`
35930  fi
35931  if test "x$new_path" = x; then
35932    # Oops. Which didn't find the executable.
35933    # The splitting of arguments from the executable at a space might have been incorrect,
35934    # since paths with space are more likely in Windows. Give it another try with the whole
35935    # argument.
35936    path="$complete"
35937    arguments="EOL"
35938    new_path=`$CYGPATH -u "$path"`
35939    new_path=`$WHICH "$new_path" 2> /dev/null`
35940    # bat and cmd files are not always considered executable in cygwin causing which
35941    # to not find them
35942    if test "x$new_path" = x \
35943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35945      new_path=`$CYGPATH -u "$path"`
35946    fi
35947    if test "x$new_path" = x; then
35948      # It's still not found. Now this is an unrecoverable error.
35949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35950$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35951      has_space=`$ECHO "$complete" | $GREP " "`
35952      if test "x$has_space" != x; then
35953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35955      fi
35956      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35957    fi
35958  fi
35959
35960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35963  # "foo.exe" is OK but "foo" is an error.
35964  #
35965  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35966  # It is also a way to make sure we got the proper file name for the real test later on.
35967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35968  if test "x$test_shortpath" = x; then
35969    # Short path failed, file does not exist as specified.
35970    # Try adding .exe or .cmd
35971    if test -f "${new_path}.exe"; then
35972      input_to_shortpath="${new_path}.exe"
35973    elif test -f "${new_path}.cmd"; then
35974      input_to_shortpath="${new_path}.cmd"
35975    else
35976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35977$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35978      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35979$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35980      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35981    fi
35982  else
35983    input_to_shortpath="$new_path"
35984  fi
35985
35986  # Call helper function which possibly converts this using DOS-style short mode.
35987  # If so, the updated path is stored in $new_path.
35988  new_path="$input_to_shortpath"
35989
35990  input_path="$input_to_shortpath"
35991  # Check if we need to convert this using DOS-style short mode. If the path
35992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35993  # take no chances and rewrite it.
35994  # Note: m4 eats our [], so we need to use [ and ] instead.
35995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35996  if test "x$has_forbidden_chars" != x; then
35997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36001      # Going to short mode and back again did indeed matter. Since short mode is
36002      # case insensitive, let's make it lowercase to improve readability.
36003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36004      # Now convert it back to Unix-style (cygpath)
36005      input_path=`$CYGPATH -u "$shortmode_path"`
36006      new_path="$input_path"
36007    fi
36008  fi
36009
36010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36011  if test "x$test_cygdrive_prefix" = x; then
36012    # As a simple fix, exclude /usr/bin since it's not a real path.
36013    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36015      # a path prefixed by /cygdrive for fixpath to work.
36016      new_path="$CYGWIN_ROOT_PATH$input_path"
36017    fi
36018  fi
36019
36020  # remove trailing .exe if any
36021  new_path="${new_path/%.exe/}"
36022
36023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36024
36025  # First separate the path from the arguments. This will split at the first
36026  # space.
36027  complete="$STRIP"
36028  path="${complete%% *}"
36029  tmp="$complete EOL"
36030  arguments="${tmp#* }"
36031
36032  # Input might be given as Windows format, start by converting to
36033  # unix format.
36034  new_path="$path"
36035
36036  windows_path="$new_path"
36037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36038    unix_path=`$CYGPATH -u "$windows_path"`
36039    new_path="$unix_path"
36040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36042    new_path="$unix_path"
36043  fi
36044
36045
36046  # Now try to locate executable using which
36047  new_path=`$WHICH "$new_path" 2> /dev/null`
36048
36049  if test "x$new_path" = x; then
36050    # Oops. Which didn't find the executable.
36051    # The splitting of arguments from the executable at a space might have been incorrect,
36052    # since paths with space are more likely in Windows. Give it another try with the whole
36053    # argument.
36054    path="$complete"
36055    arguments="EOL"
36056    new_path="$path"
36057
36058  windows_path="$new_path"
36059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36060    unix_path=`$CYGPATH -u "$windows_path"`
36061    new_path="$unix_path"
36062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36064    new_path="$unix_path"
36065  fi
36066
36067
36068    new_path=`$WHICH "$new_path" 2> /dev/null`
36069    # bat and cmd files are not always considered executable in MSYS causing which
36070    # to not find them
36071    if test "x$new_path" = x \
36072        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36073        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36074      new_path="$path"
36075
36076  windows_path="$new_path"
36077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36078    unix_path=`$CYGPATH -u "$windows_path"`
36079    new_path="$unix_path"
36080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36082    new_path="$unix_path"
36083  fi
36084
36085    fi
36086
36087    if test "x$new_path" = x; then
36088      # It's still not found. Now this is an unrecoverable error.
36089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36090$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36091      has_space=`$ECHO "$complete" | $GREP " "`
36092      if test "x$has_space" != x; then
36093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36095      fi
36096      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36097    fi
36098  fi
36099
36100  # Now new_path has a complete unix path to the binary
36101  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36102    # Keep paths in /bin as-is, but remove trailing .exe if any
36103    new_path="${new_path/%.exe/}"
36104    # Do not save /bin paths to all_fixpath_prefixes!
36105  else
36106    # Not in mixed or Windows style, start by that.
36107    new_path=`cmd //c echo $new_path`
36108
36109  input_path="$new_path"
36110  # Check if we need to convert this using DOS-style short mode. If the path
36111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36112  # take no chances and rewrite it.
36113  # Note: m4 eats our [], so we need to use [ and ] instead.
36114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36115  if test "x$has_forbidden_chars" != x; then
36116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36118  fi
36119
36120    # Output is in $new_path
36121
36122  windows_path="$new_path"
36123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36124    unix_path=`$CYGPATH -u "$windows_path"`
36125    new_path="$unix_path"
36126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36128    new_path="$unix_path"
36129  fi
36130
36131    # remove trailing .exe if any
36132    new_path="${new_path/%.exe/}"
36133
36134    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36135    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36136  fi
36137
36138    else
36139      # We're on a unix platform. Hooray! :)
36140      # First separate the path from the arguments. This will split at the first
36141      # space.
36142      complete="$STRIP"
36143      path="${complete%% *}"
36144      tmp="$complete EOL"
36145      arguments="${tmp#* }"
36146
36147      # Cannot rely on the command "which" here since it doesn't always work.
36148      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36149      if test -z "$is_absolute_path"; then
36150        # Path to executable is not absolute. Find it.
36151        IFS_save="$IFS"
36152        IFS=:
36153        for p in $PATH; do
36154          if test -f "$p/$path" && test -x "$p/$path"; then
36155            new_path="$p/$path"
36156            break
36157          fi
36158        done
36159        IFS="$IFS_save"
36160      else
36161        # This is an absolute path, we can use it without further modifications.
36162        new_path="$path"
36163      fi
36164
36165      if test "x$new_path" = x; then
36166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36167$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36168        has_space=`$ECHO "$complete" | $GREP " "`
36169        if test "x$has_space" != x; then
36170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36172        fi
36173        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36174      fi
36175    fi
36176
36177    # Now join together the path and the arguments once again
36178    if test "x$arguments" != xEOL; then
36179      new_complete="$new_path ${arguments% *}"
36180    else
36181      new_complete="$new_path"
36182    fi
36183
36184    if test "x$complete" != "x$new_complete"; then
36185      STRIP="$new_complete"
36186      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36187$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36188    fi
36189  fi
36190
36191
36192
36193  # Publish this variable in the help.
36194
36195
36196  if test "x$NM" = x; then
36197    # The variable is not set by user, try to locate tool using the code snippet
36198    for ac_prog in nm
36199do
36200  # Extract the first word of "$ac_prog", so it can be a program name with args.
36201set dummy $ac_prog; ac_word=$2
36202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36203$as_echo_n "checking for $ac_word... " >&6; }
36204if ${ac_cv_path_NM+:} false; then :
36205  $as_echo_n "(cached) " >&6
36206else
36207  case $NM in
36208  [\\/]* | ?:[\\/]*)
36209  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36210  ;;
36211  *)
36212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36213for as_dir in $PATH
36214do
36215  IFS=$as_save_IFS
36216  test -z "$as_dir" && as_dir=.
36217    for ac_exec_ext in '' $ac_executable_extensions; do
36218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36219    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36221    break 2
36222  fi
36223done
36224  done
36225IFS=$as_save_IFS
36226
36227  ;;
36228esac
36229fi
36230NM=$ac_cv_path_NM
36231if test -n "$NM"; then
36232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36233$as_echo "$NM" >&6; }
36234else
36235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36236$as_echo "no" >&6; }
36237fi
36238
36239
36240  test -n "$NM" && break
36241done
36242
36243  else
36244    # The variable is set, but is it from the command line or the environment?
36245
36246    # Try to remove the string !NM! from our list.
36247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36249      # If it failed, the variable was not from the command line. Ignore it,
36250      # but warn the user (except for BASH, which is always set by the calling BASH).
36251      if test "xNM" != xBASH; then
36252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36253$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36254      fi
36255      # Try to locate tool using the code snippet
36256      for ac_prog in nm
36257do
36258  # Extract the first word of "$ac_prog", so it can be a program name with args.
36259set dummy $ac_prog; ac_word=$2
36260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36261$as_echo_n "checking for $ac_word... " >&6; }
36262if ${ac_cv_path_NM+:} false; then :
36263  $as_echo_n "(cached) " >&6
36264else
36265  case $NM in
36266  [\\/]* | ?:[\\/]*)
36267  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36268  ;;
36269  *)
36270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36271for as_dir in $PATH
36272do
36273  IFS=$as_save_IFS
36274  test -z "$as_dir" && as_dir=.
36275    for ac_exec_ext in '' $ac_executable_extensions; do
36276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36277    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36279    break 2
36280  fi
36281done
36282  done
36283IFS=$as_save_IFS
36284
36285  ;;
36286esac
36287fi
36288NM=$ac_cv_path_NM
36289if test -n "$NM"; then
36290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36291$as_echo "$NM" >&6; }
36292else
36293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36294$as_echo "no" >&6; }
36295fi
36296
36297
36298  test -n "$NM" && break
36299done
36300
36301    else
36302      # If it succeeded, then it was overridden by the user. We will use it
36303      # for the tool.
36304
36305      # First remove it from the list of overridden variables, so we can test
36306      # for unknown variables in the end.
36307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36308
36309      # Check if the provided tool contains a complete path.
36310      tool_specified="$NM"
36311      tool_basename="${tool_specified##*/}"
36312      if test "x$tool_basename" = "x$tool_specified"; then
36313        # A command without a complete path is provided, search $PATH.
36314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36315$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36316        # Extract the first word of "$tool_basename", so it can be a program name with args.
36317set dummy $tool_basename; ac_word=$2
36318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36319$as_echo_n "checking for $ac_word... " >&6; }
36320if ${ac_cv_path_NM+:} false; then :
36321  $as_echo_n "(cached) " >&6
36322else
36323  case $NM in
36324  [\\/]* | ?:[\\/]*)
36325  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36326  ;;
36327  *)
36328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36329for as_dir in $PATH
36330do
36331  IFS=$as_save_IFS
36332  test -z "$as_dir" && as_dir=.
36333    for ac_exec_ext in '' $ac_executable_extensions; do
36334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36335    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36337    break 2
36338  fi
36339done
36340  done
36341IFS=$as_save_IFS
36342
36343  ;;
36344esac
36345fi
36346NM=$ac_cv_path_NM
36347if test -n "$NM"; then
36348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36349$as_echo "$NM" >&6; }
36350else
36351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36352$as_echo "no" >&6; }
36353fi
36354
36355
36356        if test "x$NM" = x; then
36357          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36358        fi
36359      else
36360        # Otherwise we believe it is a complete path. Use it as it is.
36361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36362$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36364$as_echo_n "checking for NM... " >&6; }
36365        if test ! -x "$tool_specified"; then
36366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36367$as_echo "not found" >&6; }
36368          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36369        fi
36370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36371$as_echo "$tool_specified" >&6; }
36372      fi
36373    fi
36374  fi
36375
36376
36377
36378  # Only process if variable expands to non-empty
36379
36380  if test "x$NM" != x; then
36381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36382
36383  # First separate the path from the arguments. This will split at the first
36384  # space.
36385  complete="$NM"
36386  path="${complete%% *}"
36387  tmp="$complete EOL"
36388  arguments="${tmp#* }"
36389
36390  # Input might be given as Windows format, start by converting to
36391  # unix format.
36392  new_path=`$CYGPATH -u "$path"`
36393
36394  # Now try to locate executable using which
36395  new_path=`$WHICH "$new_path" 2> /dev/null`
36396  # bat and cmd files are not always considered executable in cygwin causing which
36397  # to not find them
36398  if test "x$new_path" = x \
36399      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36400      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36401    new_path=`$CYGPATH -u "$path"`
36402  fi
36403  if test "x$new_path" = x; then
36404    # Oops. Which didn't find the executable.
36405    # The splitting of arguments from the executable at a space might have been incorrect,
36406    # since paths with space are more likely in Windows. Give it another try with the whole
36407    # argument.
36408    path="$complete"
36409    arguments="EOL"
36410    new_path=`$CYGPATH -u "$path"`
36411    new_path=`$WHICH "$new_path" 2> /dev/null`
36412    # bat and cmd files are not always considered executable in cygwin causing which
36413    # to not find them
36414    if test "x$new_path" = x \
36415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36417      new_path=`$CYGPATH -u "$path"`
36418    fi
36419    if test "x$new_path" = x; then
36420      # It's still not found. Now this is an unrecoverable error.
36421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36422$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36423      has_space=`$ECHO "$complete" | $GREP " "`
36424      if test "x$has_space" != x; then
36425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36427      fi
36428      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36429    fi
36430  fi
36431
36432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36435  # "foo.exe" is OK but "foo" is an error.
36436  #
36437  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36438  # It is also a way to make sure we got the proper file name for the real test later on.
36439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36440  if test "x$test_shortpath" = x; then
36441    # Short path failed, file does not exist as specified.
36442    # Try adding .exe or .cmd
36443    if test -f "${new_path}.exe"; then
36444      input_to_shortpath="${new_path}.exe"
36445    elif test -f "${new_path}.cmd"; then
36446      input_to_shortpath="${new_path}.cmd"
36447    else
36448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36449$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36450      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36451$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36452      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36453    fi
36454  else
36455    input_to_shortpath="$new_path"
36456  fi
36457
36458  # Call helper function which possibly converts this using DOS-style short mode.
36459  # If so, the updated path is stored in $new_path.
36460  new_path="$input_to_shortpath"
36461
36462  input_path="$input_to_shortpath"
36463  # Check if we need to convert this using DOS-style short mode. If the path
36464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36465  # take no chances and rewrite it.
36466  # Note: m4 eats our [], so we need to use [ and ] instead.
36467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36468  if test "x$has_forbidden_chars" != x; then
36469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36473      # Going to short mode and back again did indeed matter. Since short mode is
36474      # case insensitive, let's make it lowercase to improve readability.
36475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36476      # Now convert it back to Unix-style (cygpath)
36477      input_path=`$CYGPATH -u "$shortmode_path"`
36478      new_path="$input_path"
36479    fi
36480  fi
36481
36482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36483  if test "x$test_cygdrive_prefix" = x; then
36484    # As a simple fix, exclude /usr/bin since it's not a real path.
36485    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36487      # a path prefixed by /cygdrive for fixpath to work.
36488      new_path="$CYGWIN_ROOT_PATH$input_path"
36489    fi
36490  fi
36491
36492  # remove trailing .exe if any
36493  new_path="${new_path/%.exe/}"
36494
36495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36496
36497  # First separate the path from the arguments. This will split at the first
36498  # space.
36499  complete="$NM"
36500  path="${complete%% *}"
36501  tmp="$complete EOL"
36502  arguments="${tmp#* }"
36503
36504  # Input might be given as Windows format, start by converting to
36505  # unix format.
36506  new_path="$path"
36507
36508  windows_path="$new_path"
36509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36510    unix_path=`$CYGPATH -u "$windows_path"`
36511    new_path="$unix_path"
36512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36514    new_path="$unix_path"
36515  fi
36516
36517
36518  # Now try to locate executable using which
36519  new_path=`$WHICH "$new_path" 2> /dev/null`
36520
36521  if test "x$new_path" = x; then
36522    # Oops. Which didn't find the executable.
36523    # The splitting of arguments from the executable at a space might have been incorrect,
36524    # since paths with space are more likely in Windows. Give it another try with the whole
36525    # argument.
36526    path="$complete"
36527    arguments="EOL"
36528    new_path="$path"
36529
36530  windows_path="$new_path"
36531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36532    unix_path=`$CYGPATH -u "$windows_path"`
36533    new_path="$unix_path"
36534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36536    new_path="$unix_path"
36537  fi
36538
36539
36540    new_path=`$WHICH "$new_path" 2> /dev/null`
36541    # bat and cmd files are not always considered executable in MSYS causing which
36542    # to not find them
36543    if test "x$new_path" = x \
36544        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36545        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36546      new_path="$path"
36547
36548  windows_path="$new_path"
36549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36550    unix_path=`$CYGPATH -u "$windows_path"`
36551    new_path="$unix_path"
36552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36554    new_path="$unix_path"
36555  fi
36556
36557    fi
36558
36559    if test "x$new_path" = x; then
36560      # It's still not found. Now this is an unrecoverable error.
36561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36562$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36563      has_space=`$ECHO "$complete" | $GREP " "`
36564      if test "x$has_space" != x; then
36565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36567      fi
36568      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36569    fi
36570  fi
36571
36572  # Now new_path has a complete unix path to the binary
36573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36574    # Keep paths in /bin as-is, but remove trailing .exe if any
36575    new_path="${new_path/%.exe/}"
36576    # Do not save /bin paths to all_fixpath_prefixes!
36577  else
36578    # Not in mixed or Windows style, start by that.
36579    new_path=`cmd //c echo $new_path`
36580
36581  input_path="$new_path"
36582  # Check if we need to convert this using DOS-style short mode. If the path
36583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36584  # take no chances and rewrite it.
36585  # Note: m4 eats our [], so we need to use [ and ] instead.
36586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36587  if test "x$has_forbidden_chars" != x; then
36588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36590  fi
36591
36592    # Output is in $new_path
36593
36594  windows_path="$new_path"
36595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36596    unix_path=`$CYGPATH -u "$windows_path"`
36597    new_path="$unix_path"
36598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36600    new_path="$unix_path"
36601  fi
36602
36603    # remove trailing .exe if any
36604    new_path="${new_path/%.exe/}"
36605
36606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36608  fi
36609
36610    else
36611      # We're on a unix platform. Hooray! :)
36612      # First separate the path from the arguments. This will split at the first
36613      # space.
36614      complete="$NM"
36615      path="${complete%% *}"
36616      tmp="$complete EOL"
36617      arguments="${tmp#* }"
36618
36619      # Cannot rely on the command "which" here since it doesn't always work.
36620      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36621      if test -z "$is_absolute_path"; then
36622        # Path to executable is not absolute. Find it.
36623        IFS_save="$IFS"
36624        IFS=:
36625        for p in $PATH; do
36626          if test -f "$p/$path" && test -x "$p/$path"; then
36627            new_path="$p/$path"
36628            break
36629          fi
36630        done
36631        IFS="$IFS_save"
36632      else
36633        # This is an absolute path, we can use it without further modifications.
36634        new_path="$path"
36635      fi
36636
36637      if test "x$new_path" = x; then
36638        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36639$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36640        has_space=`$ECHO "$complete" | $GREP " "`
36641        if test "x$has_space" != x; then
36642          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36643$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36644        fi
36645        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36646      fi
36647    fi
36648
36649    # Now join together the path and the arguments once again
36650    if test "x$arguments" != xEOL; then
36651      new_complete="$new_path ${arguments% *}"
36652    else
36653      new_complete="$new_path"
36654    fi
36655
36656    if test "x$complete" != "x$new_complete"; then
36657      NM="$new_complete"
36658      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36659$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36660    fi
36661  fi
36662
36663
36664
36665  # Publish this variable in the help.
36666
36667
36668  if test "x$GNM" = x; then
36669    # The variable is not set by user, try to locate tool using the code snippet
36670    for ac_prog in gnm
36671do
36672  # Extract the first word of "$ac_prog", so it can be a program name with args.
36673set dummy $ac_prog; ac_word=$2
36674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36675$as_echo_n "checking for $ac_word... " >&6; }
36676if ${ac_cv_path_GNM+:} false; then :
36677  $as_echo_n "(cached) " >&6
36678else
36679  case $GNM in
36680  [\\/]* | ?:[\\/]*)
36681  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36682  ;;
36683  *)
36684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36685for as_dir in $PATH
36686do
36687  IFS=$as_save_IFS
36688  test -z "$as_dir" && as_dir=.
36689    for ac_exec_ext in '' $ac_executable_extensions; do
36690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36691    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36693    break 2
36694  fi
36695done
36696  done
36697IFS=$as_save_IFS
36698
36699  ;;
36700esac
36701fi
36702GNM=$ac_cv_path_GNM
36703if test -n "$GNM"; then
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36705$as_echo "$GNM" >&6; }
36706else
36707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36708$as_echo "no" >&6; }
36709fi
36710
36711
36712  test -n "$GNM" && break
36713done
36714
36715  else
36716    # The variable is set, but is it from the command line or the environment?
36717
36718    # Try to remove the string !GNM! from our list.
36719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36721      # If it failed, the variable was not from the command line. Ignore it,
36722      # but warn the user (except for BASH, which is always set by the calling BASH).
36723      if test "xGNM" != xBASH; then
36724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36725$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36726      fi
36727      # Try to locate tool using the code snippet
36728      for ac_prog in gnm
36729do
36730  # Extract the first word of "$ac_prog", so it can be a program name with args.
36731set dummy $ac_prog; ac_word=$2
36732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36733$as_echo_n "checking for $ac_word... " >&6; }
36734if ${ac_cv_path_GNM+:} false; then :
36735  $as_echo_n "(cached) " >&6
36736else
36737  case $GNM in
36738  [\\/]* | ?:[\\/]*)
36739  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36740  ;;
36741  *)
36742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36743for as_dir in $PATH
36744do
36745  IFS=$as_save_IFS
36746  test -z "$as_dir" && as_dir=.
36747    for ac_exec_ext in '' $ac_executable_extensions; do
36748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36749    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36751    break 2
36752  fi
36753done
36754  done
36755IFS=$as_save_IFS
36756
36757  ;;
36758esac
36759fi
36760GNM=$ac_cv_path_GNM
36761if test -n "$GNM"; then
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36763$as_echo "$GNM" >&6; }
36764else
36765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36766$as_echo "no" >&6; }
36767fi
36768
36769
36770  test -n "$GNM" && break
36771done
36772
36773    else
36774      # If it succeeded, then it was overridden by the user. We will use it
36775      # for the tool.
36776
36777      # First remove it from the list of overridden variables, so we can test
36778      # for unknown variables in the end.
36779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36780
36781      # Check if the provided tool contains a complete path.
36782      tool_specified="$GNM"
36783      tool_basename="${tool_specified##*/}"
36784      if test "x$tool_basename" = "x$tool_specified"; then
36785        # A command without a complete path is provided, search $PATH.
36786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36787$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36788        # Extract the first word of "$tool_basename", so it can be a program name with args.
36789set dummy $tool_basename; ac_word=$2
36790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36791$as_echo_n "checking for $ac_word... " >&6; }
36792if ${ac_cv_path_GNM+:} false; then :
36793  $as_echo_n "(cached) " >&6
36794else
36795  case $GNM in
36796  [\\/]* | ?:[\\/]*)
36797  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36798  ;;
36799  *)
36800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36801for as_dir in $PATH
36802do
36803  IFS=$as_save_IFS
36804  test -z "$as_dir" && as_dir=.
36805    for ac_exec_ext in '' $ac_executable_extensions; do
36806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36807    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36809    break 2
36810  fi
36811done
36812  done
36813IFS=$as_save_IFS
36814
36815  ;;
36816esac
36817fi
36818GNM=$ac_cv_path_GNM
36819if test -n "$GNM"; then
36820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36821$as_echo "$GNM" >&6; }
36822else
36823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36824$as_echo "no" >&6; }
36825fi
36826
36827
36828        if test "x$GNM" = x; then
36829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36830        fi
36831      else
36832        # Otherwise we believe it is a complete path. Use it as it is.
36833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36834$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36836$as_echo_n "checking for GNM... " >&6; }
36837        if test ! -x "$tool_specified"; then
36838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36839$as_echo "not found" >&6; }
36840          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36841        fi
36842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36843$as_echo "$tool_specified" >&6; }
36844      fi
36845    fi
36846  fi
36847
36848
36849
36850  # Only process if variable expands to non-empty
36851
36852  if test "x$GNM" != x; then
36853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36854
36855  # First separate the path from the arguments. This will split at the first
36856  # space.
36857  complete="$GNM"
36858  path="${complete%% *}"
36859  tmp="$complete EOL"
36860  arguments="${tmp#* }"
36861
36862  # Input might be given as Windows format, start by converting to
36863  # unix format.
36864  new_path=`$CYGPATH -u "$path"`
36865
36866  # Now try to locate executable using which
36867  new_path=`$WHICH "$new_path" 2> /dev/null`
36868  # bat and cmd files are not always considered executable in cygwin causing which
36869  # to not find them
36870  if test "x$new_path" = x \
36871      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36872      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36873    new_path=`$CYGPATH -u "$path"`
36874  fi
36875  if test "x$new_path" = x; then
36876    # Oops. Which didn't find the executable.
36877    # The splitting of arguments from the executable at a space might have been incorrect,
36878    # since paths with space are more likely in Windows. Give it another try with the whole
36879    # argument.
36880    path="$complete"
36881    arguments="EOL"
36882    new_path=`$CYGPATH -u "$path"`
36883    new_path=`$WHICH "$new_path" 2> /dev/null`
36884    # bat and cmd files are not always considered executable in cygwin causing which
36885    # to not find them
36886    if test "x$new_path" = x \
36887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36889      new_path=`$CYGPATH -u "$path"`
36890    fi
36891    if test "x$new_path" = x; then
36892      # It's still not found. Now this is an unrecoverable error.
36893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36894$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36895      has_space=`$ECHO "$complete" | $GREP " "`
36896      if test "x$has_space" != x; then
36897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36899      fi
36900      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36901    fi
36902  fi
36903
36904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36907  # "foo.exe" is OK but "foo" is an error.
36908  #
36909  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36910  # It is also a way to make sure we got the proper file name for the real test later on.
36911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36912  if test "x$test_shortpath" = x; then
36913    # Short path failed, file does not exist as specified.
36914    # Try adding .exe or .cmd
36915    if test -f "${new_path}.exe"; then
36916      input_to_shortpath="${new_path}.exe"
36917    elif test -f "${new_path}.cmd"; then
36918      input_to_shortpath="${new_path}.cmd"
36919    else
36920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36921$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36922      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36923$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36924      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36925    fi
36926  else
36927    input_to_shortpath="$new_path"
36928  fi
36929
36930  # Call helper function which possibly converts this using DOS-style short mode.
36931  # If so, the updated path is stored in $new_path.
36932  new_path="$input_to_shortpath"
36933
36934  input_path="$input_to_shortpath"
36935  # Check if we need to convert this using DOS-style short mode. If the path
36936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36937  # take no chances and rewrite it.
36938  # Note: m4 eats our [], so we need to use [ and ] instead.
36939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36940  if test "x$has_forbidden_chars" != x; then
36941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36945      # Going to short mode and back again did indeed matter. Since short mode is
36946      # case insensitive, let's make it lowercase to improve readability.
36947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36948      # Now convert it back to Unix-style (cygpath)
36949      input_path=`$CYGPATH -u "$shortmode_path"`
36950      new_path="$input_path"
36951    fi
36952  fi
36953
36954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36955  if test "x$test_cygdrive_prefix" = x; then
36956    # As a simple fix, exclude /usr/bin since it's not a real path.
36957    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36959      # a path prefixed by /cygdrive for fixpath to work.
36960      new_path="$CYGWIN_ROOT_PATH$input_path"
36961    fi
36962  fi
36963
36964  # remove trailing .exe if any
36965  new_path="${new_path/%.exe/}"
36966
36967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36968
36969  # First separate the path from the arguments. This will split at the first
36970  # space.
36971  complete="$GNM"
36972  path="${complete%% *}"
36973  tmp="$complete EOL"
36974  arguments="${tmp#* }"
36975
36976  # Input might be given as Windows format, start by converting to
36977  # unix format.
36978  new_path="$path"
36979
36980  windows_path="$new_path"
36981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36982    unix_path=`$CYGPATH -u "$windows_path"`
36983    new_path="$unix_path"
36984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36986    new_path="$unix_path"
36987  fi
36988
36989
36990  # Now try to locate executable using which
36991  new_path=`$WHICH "$new_path" 2> /dev/null`
36992
36993  if test "x$new_path" = x; then
36994    # Oops. Which didn't find the executable.
36995    # The splitting of arguments from the executable at a space might have been incorrect,
36996    # since paths with space are more likely in Windows. Give it another try with the whole
36997    # argument.
36998    path="$complete"
36999    arguments="EOL"
37000    new_path="$path"
37001
37002  windows_path="$new_path"
37003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37004    unix_path=`$CYGPATH -u "$windows_path"`
37005    new_path="$unix_path"
37006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37008    new_path="$unix_path"
37009  fi
37010
37011
37012    new_path=`$WHICH "$new_path" 2> /dev/null`
37013    # bat and cmd files are not always considered executable in MSYS causing which
37014    # to not find them
37015    if test "x$new_path" = x \
37016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37018      new_path="$path"
37019
37020  windows_path="$new_path"
37021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37022    unix_path=`$CYGPATH -u "$windows_path"`
37023    new_path="$unix_path"
37024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37026    new_path="$unix_path"
37027  fi
37028
37029    fi
37030
37031    if test "x$new_path" = x; then
37032      # It's still not found. Now this is an unrecoverable error.
37033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37034$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37035      has_space=`$ECHO "$complete" | $GREP " "`
37036      if test "x$has_space" != x; then
37037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37039      fi
37040      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37041    fi
37042  fi
37043
37044  # Now new_path has a complete unix path to the binary
37045  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37046    # Keep paths in /bin as-is, but remove trailing .exe if any
37047    new_path="${new_path/%.exe/}"
37048    # Do not save /bin paths to all_fixpath_prefixes!
37049  else
37050    # Not in mixed or Windows style, start by that.
37051    new_path=`cmd //c echo $new_path`
37052
37053  input_path="$new_path"
37054  # Check if we need to convert this using DOS-style short mode. If the path
37055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37056  # take no chances and rewrite it.
37057  # Note: m4 eats our [], so we need to use [ and ] instead.
37058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37059  if test "x$has_forbidden_chars" != x; then
37060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37062  fi
37063
37064    # Output is in $new_path
37065
37066  windows_path="$new_path"
37067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37068    unix_path=`$CYGPATH -u "$windows_path"`
37069    new_path="$unix_path"
37070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37072    new_path="$unix_path"
37073  fi
37074
37075    # remove trailing .exe if any
37076    new_path="${new_path/%.exe/}"
37077
37078    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37079    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37080  fi
37081
37082    else
37083      # We're on a unix platform. Hooray! :)
37084      # First separate the path from the arguments. This will split at the first
37085      # space.
37086      complete="$GNM"
37087      path="${complete%% *}"
37088      tmp="$complete EOL"
37089      arguments="${tmp#* }"
37090
37091      # Cannot rely on the command "which" here since it doesn't always work.
37092      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37093      if test -z "$is_absolute_path"; then
37094        # Path to executable is not absolute. Find it.
37095        IFS_save="$IFS"
37096        IFS=:
37097        for p in $PATH; do
37098          if test -f "$p/$path" && test -x "$p/$path"; then
37099            new_path="$p/$path"
37100            break
37101          fi
37102        done
37103        IFS="$IFS_save"
37104      else
37105        # This is an absolute path, we can use it without further modifications.
37106        new_path="$path"
37107      fi
37108
37109      if test "x$new_path" = x; then
37110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37111$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37112        has_space=`$ECHO "$complete" | $GREP " "`
37113        if test "x$has_space" != x; then
37114          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37116        fi
37117        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37118      fi
37119    fi
37120
37121    # Now join together the path and the arguments once again
37122    if test "x$arguments" != xEOL; then
37123      new_complete="$new_path ${arguments% *}"
37124    else
37125      new_complete="$new_path"
37126    fi
37127
37128    if test "x$complete" != "x$new_complete"; then
37129      GNM="$new_complete"
37130      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37131$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37132    fi
37133  fi
37134
37135  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37136    # FIXME: we should unify this with the solaris case above.
37137
37138
37139  # Publish this variable in the help.
37140
37141
37142  if test "x$STRIP" = 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 strip
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_STRIP+:} false; then :
37152  $as_echo_n "(cached) " >&6
37153else
37154  if test -n "$STRIP"; then
37155  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37156else
37157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37158for as_dir in $PATH
37159do
37160  IFS=$as_save_IFS
37161  test -z "$as_dir" && as_dir=.
37162    for ac_exec_ext in '' $ac_executable_extensions; do
37163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37164    ac_cv_prog_STRIP="$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
37174STRIP=$ac_cv_prog_STRIP
37175if test -n "$STRIP"; then
37176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37177$as_echo "$STRIP" >&6; }
37178else
37179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37180$as_echo "no" >&6; }
37181fi
37182
37183
37184    test -n "$STRIP" && break
37185  done
37186fi
37187if test -z "$STRIP"; then
37188  ac_ct_STRIP=$STRIP
37189  for ac_prog in strip
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_STRIP+:} false; then :
37196  $as_echo_n "(cached) " >&6
37197else
37198  if test -n "$ac_ct_STRIP"; then
37199  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="$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_STRIP=$ac_cv_prog_ac_ct_STRIP
37219if test -n "$ac_ct_STRIP"; then
37220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37221$as_echo "$ac_ct_STRIP" >&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_STRIP" && break
37229done
37230
37231  if test "x$ac_ct_STRIP" = x; then
37232    STRIP=""
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    STRIP=$ac_ct_STRIP
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 !STRIP! from our list.
37248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
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 "xSTRIP" != xBASH; then
37253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37254$as_echo "$as_me: WARNING: Ignoring value of STRIP 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 strip
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_STRIP+:} false; then :
37265  $as_echo_n "(cached) " >&6
37266else
37267  if test -n "$STRIP"; then
37268  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37269else
37270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37271for as_dir in $PATH
37272do
37273  IFS=$as_save_IFS
37274  test -z "$as_dir" && as_dir=.
37275    for ac_exec_ext in '' $ac_executable_extensions; do
37276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37277    ac_cv_prog_STRIP="$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
37287STRIP=$ac_cv_prog_STRIP
37288if test -n "$STRIP"; then
37289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37290$as_echo "$STRIP" >&6; }
37291else
37292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37293$as_echo "no" >&6; }
37294fi
37295
37296
37297    test -n "$STRIP" && break
37298  done
37299fi
37300if test -z "$STRIP"; then
37301  ac_ct_STRIP=$STRIP
37302  for ac_prog in strip
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_STRIP+:} false; then :
37309  $as_echo_n "(cached) " >&6
37310else
37311  if test -n "$ac_ct_STRIP"; then
37312  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="$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_STRIP=$ac_cv_prog_ac_ct_STRIP
37332if test -n "$ac_ct_STRIP"; then
37333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37334$as_echo "$ac_ct_STRIP" >&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_STRIP" && break
37342done
37343
37344  if test "x$ac_ct_STRIP" = x; then
37345    STRIP=""
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    STRIP=$ac_ct_STRIP
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="$STRIP"
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 STRIP=$tool_basename" >&5
37371$as_echo "$as_me: Will search for user supplied tool STRIP=$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_STRIP+:} false; then :
37377  $as_echo_n "(cached) " >&6
37378else
37379  case $STRIP in
37380  [\\/]* | ?:[\\/]*)
37381  ac_cv_path_STRIP="$STRIP" # 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_STRIP="$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
37402STRIP=$ac_cv_path_STRIP
37403if test -n "$STRIP"; then
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37405$as_echo "$STRIP" >&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$STRIP" = 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 STRIP=$tool_specified" >&5
37418$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37420$as_echo_n "checking for STRIP... " >&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 STRIP=$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$STRIP" != 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="$STRIP"
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 STRIP, which resolves as \"$complete\", is not found." >&5
37478$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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 STRIP, which resolves as \"$new_path\", is invalid." >&5
37505$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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="$STRIP"
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 STRIP, which resolves as \"$complete\", is not found." >&5
37618$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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="$STRIP"
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 STRIP, which resolves as \"$complete\", is not found." >&5
37695$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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      STRIP="$new_complete"
37714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37715$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37716    fi
37717  fi
37718
37719
37720
37721  # Publish this variable in the help.
37722
37723
37724  if test "x$NM" = x; then
37725    # The variable is not set by user, try to locate tool using the code snippet
37726    if test -n "$ac_tool_prefix"; then
37727  for ac_prog in nm
37728  do
37729    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37732$as_echo_n "checking for $ac_word... " >&6; }
37733if ${ac_cv_prog_NM+:} false; then :
37734  $as_echo_n "(cached) " >&6
37735else
37736  if test -n "$NM"; then
37737  ac_cv_prog_NM="$NM" # Let the user override the test.
37738else
37739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37740for as_dir in $PATH
37741do
37742  IFS=$as_save_IFS
37743  test -z "$as_dir" && as_dir=.
37744    for ac_exec_ext in '' $ac_executable_extensions; do
37745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37746    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37748    break 2
37749  fi
37750done
37751  done
37752IFS=$as_save_IFS
37753
37754fi
37755fi
37756NM=$ac_cv_prog_NM
37757if test -n "$NM"; then
37758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37759$as_echo "$NM" >&6; }
37760else
37761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37762$as_echo "no" >&6; }
37763fi
37764
37765
37766    test -n "$NM" && break
37767  done
37768fi
37769if test -z "$NM"; then
37770  ac_ct_NM=$NM
37771  for ac_prog in nm
37772do
37773  # Extract the first word of "$ac_prog", so it can be a program name with args.
37774set dummy $ac_prog; ac_word=$2
37775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37776$as_echo_n "checking for $ac_word... " >&6; }
37777if ${ac_cv_prog_ac_ct_NM+:} false; then :
37778  $as_echo_n "(cached) " >&6
37779else
37780  if test -n "$ac_ct_NM"; then
37781  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37782else
37783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37784for as_dir in $PATH
37785do
37786  IFS=$as_save_IFS
37787  test -z "$as_dir" && as_dir=.
37788    for ac_exec_ext in '' $ac_executable_extensions; do
37789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37790    ac_cv_prog_ac_ct_NM="$ac_prog"
37791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37792    break 2
37793  fi
37794done
37795  done
37796IFS=$as_save_IFS
37797
37798fi
37799fi
37800ac_ct_NM=$ac_cv_prog_ac_ct_NM
37801if test -n "$ac_ct_NM"; then
37802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37803$as_echo "$ac_ct_NM" >&6; }
37804else
37805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37806$as_echo "no" >&6; }
37807fi
37808
37809
37810  test -n "$ac_ct_NM" && break
37811done
37812
37813  if test "x$ac_ct_NM" = x; then
37814    NM=""
37815  else
37816    case $cross_compiling:$ac_tool_warned in
37817yes:)
37818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37820ac_tool_warned=yes ;;
37821esac
37822    NM=$ac_ct_NM
37823  fi
37824fi
37825
37826  else
37827    # The variable is set, but is it from the command line or the environment?
37828
37829    # Try to remove the string !NM! from our list.
37830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37832      # If it failed, the variable was not from the command line. Ignore it,
37833      # but warn the user (except for BASH, which is always set by the calling BASH).
37834      if test "xNM" != xBASH; then
37835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37836$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37837      fi
37838      # Try to locate tool using the code snippet
37839      if test -n "$ac_tool_prefix"; then
37840  for ac_prog in nm
37841  do
37842    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37843set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37845$as_echo_n "checking for $ac_word... " >&6; }
37846if ${ac_cv_prog_NM+:} false; then :
37847  $as_echo_n "(cached) " >&6
37848else
37849  if test -n "$NM"; then
37850  ac_cv_prog_NM="$NM" # Let the user override the test.
37851else
37852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37853for as_dir in $PATH
37854do
37855  IFS=$as_save_IFS
37856  test -z "$as_dir" && as_dir=.
37857    for ac_exec_ext in '' $ac_executable_extensions; do
37858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37859    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37861    break 2
37862  fi
37863done
37864  done
37865IFS=$as_save_IFS
37866
37867fi
37868fi
37869NM=$ac_cv_prog_NM
37870if test -n "$NM"; then
37871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37872$as_echo "$NM" >&6; }
37873else
37874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37875$as_echo "no" >&6; }
37876fi
37877
37878
37879    test -n "$NM" && break
37880  done
37881fi
37882if test -z "$NM"; then
37883  ac_ct_NM=$NM
37884  for ac_prog in nm
37885do
37886  # Extract the first word of "$ac_prog", so it can be a program name with args.
37887set dummy $ac_prog; ac_word=$2
37888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37889$as_echo_n "checking for $ac_word... " >&6; }
37890if ${ac_cv_prog_ac_ct_NM+:} false; then :
37891  $as_echo_n "(cached) " >&6
37892else
37893  if test -n "$ac_ct_NM"; then
37894  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37895else
37896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37897for as_dir in $PATH
37898do
37899  IFS=$as_save_IFS
37900  test -z "$as_dir" && as_dir=.
37901    for ac_exec_ext in '' $ac_executable_extensions; do
37902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37903    ac_cv_prog_ac_ct_NM="$ac_prog"
37904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37905    break 2
37906  fi
37907done
37908  done
37909IFS=$as_save_IFS
37910
37911fi
37912fi
37913ac_ct_NM=$ac_cv_prog_ac_ct_NM
37914if test -n "$ac_ct_NM"; then
37915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37916$as_echo "$ac_ct_NM" >&6; }
37917else
37918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37919$as_echo "no" >&6; }
37920fi
37921
37922
37923  test -n "$ac_ct_NM" && break
37924done
37925
37926  if test "x$ac_ct_NM" = x; then
37927    NM=""
37928  else
37929    case $cross_compiling:$ac_tool_warned in
37930yes:)
37931{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37932$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37933ac_tool_warned=yes ;;
37934esac
37935    NM=$ac_ct_NM
37936  fi
37937fi
37938
37939    else
37940      # If it succeeded, then it was overridden by the user. We will use it
37941      # for the tool.
37942
37943      # First remove it from the list of overridden variables, so we can test
37944      # for unknown variables in the end.
37945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37946
37947      # Check if the provided tool contains a complete path.
37948      tool_specified="$NM"
37949      tool_basename="${tool_specified##*/}"
37950      if test "x$tool_basename" = "x$tool_specified"; then
37951        # A command without a complete path is provided, search $PATH.
37952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37953$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37954        # Extract the first word of "$tool_basename", so it can be a program name with args.
37955set dummy $tool_basename; ac_word=$2
37956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37957$as_echo_n "checking for $ac_word... " >&6; }
37958if ${ac_cv_path_NM+:} false; then :
37959  $as_echo_n "(cached) " >&6
37960else
37961  case $NM in
37962  [\\/]* | ?:[\\/]*)
37963  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37964  ;;
37965  *)
37966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37967for as_dir in $PATH
37968do
37969  IFS=$as_save_IFS
37970  test -z "$as_dir" && as_dir=.
37971    for ac_exec_ext in '' $ac_executable_extensions; do
37972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37973    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37975    break 2
37976  fi
37977done
37978  done
37979IFS=$as_save_IFS
37980
37981  ;;
37982esac
37983fi
37984NM=$ac_cv_path_NM
37985if test -n "$NM"; then
37986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37987$as_echo "$NM" >&6; }
37988else
37989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37990$as_echo "no" >&6; }
37991fi
37992
37993
37994        if test "x$NM" = x; then
37995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37996        fi
37997      else
37998        # Otherwise we believe it is a complete path. Use it as it is.
37999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38000$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38002$as_echo_n "checking for NM... " >&6; }
38003        if test ! -x "$tool_specified"; then
38004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38005$as_echo "not found" >&6; }
38006          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38007        fi
38008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38009$as_echo "$tool_specified" >&6; }
38010      fi
38011    fi
38012  fi
38013
38014
38015
38016  # Only process if variable expands to non-empty
38017
38018  if test "x$NM" != x; then
38019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38020
38021  # First separate the path from the arguments. This will split at the first
38022  # space.
38023  complete="$NM"
38024  path="${complete%% *}"
38025  tmp="$complete EOL"
38026  arguments="${tmp#* }"
38027
38028  # Input might be given as Windows format, start by converting to
38029  # unix format.
38030  new_path=`$CYGPATH -u "$path"`
38031
38032  # Now try to locate executable using which
38033  new_path=`$WHICH "$new_path" 2> /dev/null`
38034  # bat and cmd files are not always considered executable in cygwin causing which
38035  # to not find them
38036  if test "x$new_path" = x \
38037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38039    new_path=`$CYGPATH -u "$path"`
38040  fi
38041  if test "x$new_path" = x; then
38042    # Oops. Which didn't find the executable.
38043    # The splitting of arguments from the executable at a space might have been incorrect,
38044    # since paths with space are more likely in Windows. Give it another try with the whole
38045    # argument.
38046    path="$complete"
38047    arguments="EOL"
38048    new_path=`$CYGPATH -u "$path"`
38049    new_path=`$WHICH "$new_path" 2> /dev/null`
38050    # bat and cmd files are not always considered executable in cygwin causing which
38051    # to not find them
38052    if test "x$new_path" = x \
38053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38055      new_path=`$CYGPATH -u "$path"`
38056    fi
38057    if test "x$new_path" = x; then
38058      # It's still not found. Now this is an unrecoverable error.
38059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38060$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38061      has_space=`$ECHO "$complete" | $GREP " "`
38062      if test "x$has_space" != x; then
38063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38065      fi
38066      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38067    fi
38068  fi
38069
38070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38073  # "foo.exe" is OK but "foo" is an error.
38074  #
38075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38076  # It is also a way to make sure we got the proper file name for the real test later on.
38077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38078  if test "x$test_shortpath" = x; then
38079    # Short path failed, file does not exist as specified.
38080    # Try adding .exe or .cmd
38081    if test -f "${new_path}.exe"; then
38082      input_to_shortpath="${new_path}.exe"
38083    elif test -f "${new_path}.cmd"; then
38084      input_to_shortpath="${new_path}.cmd"
38085    else
38086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38087$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38090      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38091    fi
38092  else
38093    input_to_shortpath="$new_path"
38094  fi
38095
38096  # Call helper function which possibly converts this using DOS-style short mode.
38097  # If so, the updated path is stored in $new_path.
38098  new_path="$input_to_shortpath"
38099
38100  input_path="$input_to_shortpath"
38101  # Check if we need to convert this using DOS-style short mode. If the path
38102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38103  # take no chances and rewrite it.
38104  # Note: m4 eats our [], so we need to use [ and ] instead.
38105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38106  if test "x$has_forbidden_chars" != x; then
38107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38111      # Going to short mode and back again did indeed matter. Since short mode is
38112      # case insensitive, let's make it lowercase to improve readability.
38113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38114      # Now convert it back to Unix-style (cygpath)
38115      input_path=`$CYGPATH -u "$shortmode_path"`
38116      new_path="$input_path"
38117    fi
38118  fi
38119
38120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38121  if test "x$test_cygdrive_prefix" = x; then
38122    # As a simple fix, exclude /usr/bin since it's not a real path.
38123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38125      # a path prefixed by /cygdrive for fixpath to work.
38126      new_path="$CYGWIN_ROOT_PATH$input_path"
38127    fi
38128  fi
38129
38130  # remove trailing .exe if any
38131  new_path="${new_path/%.exe/}"
38132
38133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38134
38135  # First separate the path from the arguments. This will split at the first
38136  # space.
38137  complete="$NM"
38138  path="${complete%% *}"
38139  tmp="$complete EOL"
38140  arguments="${tmp#* }"
38141
38142  # Input might be given as Windows format, start by converting to
38143  # unix format.
38144  new_path="$path"
38145
38146  windows_path="$new_path"
38147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38148    unix_path=`$CYGPATH -u "$windows_path"`
38149    new_path="$unix_path"
38150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38152    new_path="$unix_path"
38153  fi
38154
38155
38156  # Now try to locate executable using which
38157  new_path=`$WHICH "$new_path" 2> /dev/null`
38158
38159  if test "x$new_path" = x; then
38160    # Oops. Which didn't find the executable.
38161    # The splitting of arguments from the executable at a space might have been incorrect,
38162    # since paths with space are more likely in Windows. Give it another try with the whole
38163    # argument.
38164    path="$complete"
38165    arguments="EOL"
38166    new_path="$path"
38167
38168  windows_path="$new_path"
38169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38170    unix_path=`$CYGPATH -u "$windows_path"`
38171    new_path="$unix_path"
38172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38174    new_path="$unix_path"
38175  fi
38176
38177
38178    new_path=`$WHICH "$new_path" 2> /dev/null`
38179    # bat and cmd files are not always considered executable in MSYS causing which
38180    # to not find them
38181    if test "x$new_path" = x \
38182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38184      new_path="$path"
38185
38186  windows_path="$new_path"
38187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38188    unix_path=`$CYGPATH -u "$windows_path"`
38189    new_path="$unix_path"
38190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38192    new_path="$unix_path"
38193  fi
38194
38195    fi
38196
38197    if test "x$new_path" = x; then
38198      # It's still not found. Now this is an unrecoverable error.
38199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38200$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38201      has_space=`$ECHO "$complete" | $GREP " "`
38202      if test "x$has_space" != x; then
38203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38205      fi
38206      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38207    fi
38208  fi
38209
38210  # Now new_path has a complete unix path to the binary
38211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38212    # Keep paths in /bin as-is, but remove trailing .exe if any
38213    new_path="${new_path/%.exe/}"
38214    # Do not save /bin paths to all_fixpath_prefixes!
38215  else
38216    # Not in mixed or Windows style, start by that.
38217    new_path=`cmd //c echo $new_path`
38218
38219  input_path="$new_path"
38220  # Check if we need to convert this using DOS-style short mode. If the path
38221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38222  # take no chances and rewrite it.
38223  # Note: m4 eats our [], so we need to use [ and ] instead.
38224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38225  if test "x$has_forbidden_chars" != x; then
38226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38228  fi
38229
38230    # Output is in $new_path
38231
38232  windows_path="$new_path"
38233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38234    unix_path=`$CYGPATH -u "$windows_path"`
38235    new_path="$unix_path"
38236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38238    new_path="$unix_path"
38239  fi
38240
38241    # remove trailing .exe if any
38242    new_path="${new_path/%.exe/}"
38243
38244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38246  fi
38247
38248    else
38249      # We're on a unix platform. Hooray! :)
38250      # First separate the path from the arguments. This will split at the first
38251      # space.
38252      complete="$NM"
38253      path="${complete%% *}"
38254      tmp="$complete EOL"
38255      arguments="${tmp#* }"
38256
38257      # Cannot rely on the command "which" here since it doesn't always work.
38258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38259      if test -z "$is_absolute_path"; then
38260        # Path to executable is not absolute. Find it.
38261        IFS_save="$IFS"
38262        IFS=:
38263        for p in $PATH; do
38264          if test -f "$p/$path" && test -x "$p/$path"; then
38265            new_path="$p/$path"
38266            break
38267          fi
38268        done
38269        IFS="$IFS_save"
38270      else
38271        # This is an absolute path, we can use it without further modifications.
38272        new_path="$path"
38273      fi
38274
38275      if test "x$new_path" = x; then
38276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38277$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38278        has_space=`$ECHO "$complete" | $GREP " "`
38279        if test "x$has_space" != x; then
38280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38282        fi
38283        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38284      fi
38285    fi
38286
38287    # Now join together the path and the arguments once again
38288    if test "x$arguments" != xEOL; then
38289      new_complete="$new_path ${arguments% *}"
38290    else
38291      new_complete="$new_path"
38292    fi
38293
38294    if test "x$complete" != "x$new_complete"; then
38295      NM="$new_complete"
38296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38297$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38298    fi
38299  fi
38300
38301    GNM="$NM"
38302
38303  fi
38304
38305  # objcopy is used for moving debug symbols to separate files when
38306  # full debug symbols are enabled.
38307  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38308
38309
38310  # Publish this variable in the help.
38311
38312
38313  if test "x$OBJCOPY" = x; then
38314    # The variable is not set by user, try to locate tool using the code snippet
38315    if test -n "$ac_tool_prefix"; then
38316  for ac_prog in gobjcopy objcopy
38317  do
38318    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38319set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38321$as_echo_n "checking for $ac_word... " >&6; }
38322if ${ac_cv_prog_OBJCOPY+:} false; then :
38323  $as_echo_n "(cached) " >&6
38324else
38325  if test -n "$OBJCOPY"; then
38326  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38327else
38328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38329for as_dir in $PATH
38330do
38331  IFS=$as_save_IFS
38332  test -z "$as_dir" && as_dir=.
38333    for ac_exec_ext in '' $ac_executable_extensions; do
38334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38335    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38337    break 2
38338  fi
38339done
38340  done
38341IFS=$as_save_IFS
38342
38343fi
38344fi
38345OBJCOPY=$ac_cv_prog_OBJCOPY
38346if test -n "$OBJCOPY"; then
38347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38348$as_echo "$OBJCOPY" >&6; }
38349else
38350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38351$as_echo "no" >&6; }
38352fi
38353
38354
38355    test -n "$OBJCOPY" && break
38356  done
38357fi
38358if test -z "$OBJCOPY"; then
38359  ac_ct_OBJCOPY=$OBJCOPY
38360  for ac_prog in gobjcopy objcopy
38361do
38362  # Extract the first word of "$ac_prog", so it can be a program name with args.
38363set dummy $ac_prog; ac_word=$2
38364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38365$as_echo_n "checking for $ac_word... " >&6; }
38366if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38367  $as_echo_n "(cached) " >&6
38368else
38369  if test -n "$ac_ct_OBJCOPY"; then
38370  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38371else
38372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38373for as_dir in $PATH
38374do
38375  IFS=$as_save_IFS
38376  test -z "$as_dir" && as_dir=.
38377    for ac_exec_ext in '' $ac_executable_extensions; do
38378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38379    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38381    break 2
38382  fi
38383done
38384  done
38385IFS=$as_save_IFS
38386
38387fi
38388fi
38389ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38390if test -n "$ac_ct_OBJCOPY"; then
38391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38392$as_echo "$ac_ct_OBJCOPY" >&6; }
38393else
38394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38395$as_echo "no" >&6; }
38396fi
38397
38398
38399  test -n "$ac_ct_OBJCOPY" && break
38400done
38401
38402  if test "x$ac_ct_OBJCOPY" = x; then
38403    OBJCOPY=""
38404  else
38405    case $cross_compiling:$ac_tool_warned in
38406yes:)
38407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38409ac_tool_warned=yes ;;
38410esac
38411    OBJCOPY=$ac_ct_OBJCOPY
38412  fi
38413fi
38414
38415  else
38416    # The variable is set, but is it from the command line or the environment?
38417
38418    # Try to remove the string !OBJCOPY! from our list.
38419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38421      # If it failed, the variable was not from the command line. Ignore it,
38422      # but warn the user (except for BASH, which is always set by the calling BASH).
38423      if test "xOBJCOPY" != xBASH; then
38424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38425$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38426      fi
38427      # Try to locate tool using the code snippet
38428      if test -n "$ac_tool_prefix"; then
38429  for ac_prog in gobjcopy objcopy
38430  do
38431    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38434$as_echo_n "checking for $ac_word... " >&6; }
38435if ${ac_cv_prog_OBJCOPY+:} false; then :
38436  $as_echo_n "(cached) " >&6
38437else
38438  if test -n "$OBJCOPY"; then
38439  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38440else
38441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38442for as_dir in $PATH
38443do
38444  IFS=$as_save_IFS
38445  test -z "$as_dir" && as_dir=.
38446    for ac_exec_ext in '' $ac_executable_extensions; do
38447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38448    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38450    break 2
38451  fi
38452done
38453  done
38454IFS=$as_save_IFS
38455
38456fi
38457fi
38458OBJCOPY=$ac_cv_prog_OBJCOPY
38459if test -n "$OBJCOPY"; then
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38461$as_echo "$OBJCOPY" >&6; }
38462else
38463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38464$as_echo "no" >&6; }
38465fi
38466
38467
38468    test -n "$OBJCOPY" && break
38469  done
38470fi
38471if test -z "$OBJCOPY"; then
38472  ac_ct_OBJCOPY=$OBJCOPY
38473  for ac_prog in gobjcopy objcopy
38474do
38475  # Extract the first word of "$ac_prog", so it can be a program name with args.
38476set dummy $ac_prog; ac_word=$2
38477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38478$as_echo_n "checking for $ac_word... " >&6; }
38479if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38480  $as_echo_n "(cached) " >&6
38481else
38482  if test -n "$ac_ct_OBJCOPY"; then
38483  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38484else
38485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38486for as_dir in $PATH
38487do
38488  IFS=$as_save_IFS
38489  test -z "$as_dir" && as_dir=.
38490    for ac_exec_ext in '' $ac_executable_extensions; do
38491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38492    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38494    break 2
38495  fi
38496done
38497  done
38498IFS=$as_save_IFS
38499
38500fi
38501fi
38502ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38503if test -n "$ac_ct_OBJCOPY"; then
38504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38505$as_echo "$ac_ct_OBJCOPY" >&6; }
38506else
38507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38508$as_echo "no" >&6; }
38509fi
38510
38511
38512  test -n "$ac_ct_OBJCOPY" && break
38513done
38514
38515  if test "x$ac_ct_OBJCOPY" = x; then
38516    OBJCOPY=""
38517  else
38518    case $cross_compiling:$ac_tool_warned in
38519yes:)
38520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38522ac_tool_warned=yes ;;
38523esac
38524    OBJCOPY=$ac_ct_OBJCOPY
38525  fi
38526fi
38527
38528    else
38529      # If it succeeded, then it was overridden by the user. We will use it
38530      # for the tool.
38531
38532      # First remove it from the list of overridden variables, so we can test
38533      # for unknown variables in the end.
38534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38535
38536      # Check if the provided tool contains a complete path.
38537      tool_specified="$OBJCOPY"
38538      tool_basename="${tool_specified##*/}"
38539      if test "x$tool_basename" = "x$tool_specified"; then
38540        # A command without a complete path is provided, search $PATH.
38541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38542$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38543        # Extract the first word of "$tool_basename", so it can be a program name with args.
38544set dummy $tool_basename; ac_word=$2
38545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38546$as_echo_n "checking for $ac_word... " >&6; }
38547if ${ac_cv_path_OBJCOPY+:} false; then :
38548  $as_echo_n "(cached) " >&6
38549else
38550  case $OBJCOPY in
38551  [\\/]* | ?:[\\/]*)
38552  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38553  ;;
38554  *)
38555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38556for as_dir in $PATH
38557do
38558  IFS=$as_save_IFS
38559  test -z "$as_dir" && as_dir=.
38560    for ac_exec_ext in '' $ac_executable_extensions; do
38561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38562    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38564    break 2
38565  fi
38566done
38567  done
38568IFS=$as_save_IFS
38569
38570  ;;
38571esac
38572fi
38573OBJCOPY=$ac_cv_path_OBJCOPY
38574if test -n "$OBJCOPY"; then
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38576$as_echo "$OBJCOPY" >&6; }
38577else
38578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38579$as_echo "no" >&6; }
38580fi
38581
38582
38583        if test "x$OBJCOPY" = x; then
38584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38585        fi
38586      else
38587        # Otherwise we believe it is a complete path. Use it as it is.
38588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38589$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38591$as_echo_n "checking for OBJCOPY... " >&6; }
38592        if test ! -x "$tool_specified"; then
38593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38594$as_echo "not found" >&6; }
38595          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38596        fi
38597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38598$as_echo "$tool_specified" >&6; }
38599      fi
38600    fi
38601  fi
38602
38603
38604    # Only call fixup if objcopy was found.
38605    if test -n "$OBJCOPY"; then
38606
38607  # Only process if variable expands to non-empty
38608
38609  if test "x$OBJCOPY" != x; then
38610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38611
38612  # First separate the path from the arguments. This will split at the first
38613  # space.
38614  complete="$OBJCOPY"
38615  path="${complete%% *}"
38616  tmp="$complete EOL"
38617  arguments="${tmp#* }"
38618
38619  # Input might be given as Windows format, start by converting to
38620  # unix format.
38621  new_path=`$CYGPATH -u "$path"`
38622
38623  # Now try to locate executable using which
38624  new_path=`$WHICH "$new_path" 2> /dev/null`
38625  # bat and cmd files are not always considered executable in cygwin causing which
38626  # to not find them
38627  if test "x$new_path" = x \
38628      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38629      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38630    new_path=`$CYGPATH -u "$path"`
38631  fi
38632  if test "x$new_path" = x; then
38633    # Oops. Which didn't find the executable.
38634    # The splitting of arguments from the executable at a space might have been incorrect,
38635    # since paths with space are more likely in Windows. Give it another try with the whole
38636    # argument.
38637    path="$complete"
38638    arguments="EOL"
38639    new_path=`$CYGPATH -u "$path"`
38640    new_path=`$WHICH "$new_path" 2> /dev/null`
38641    # bat and cmd files are not always considered executable in cygwin causing which
38642    # to not find them
38643    if test "x$new_path" = x \
38644        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38645        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38646      new_path=`$CYGPATH -u "$path"`
38647    fi
38648    if test "x$new_path" = x; then
38649      # It's still not found. Now this is an unrecoverable error.
38650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38651$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38652      has_space=`$ECHO "$complete" | $GREP " "`
38653      if test "x$has_space" != x; then
38654        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38655$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38656      fi
38657      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38658    fi
38659  fi
38660
38661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38664  # "foo.exe" is OK but "foo" is an error.
38665  #
38666  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38667  # It is also a way to make sure we got the proper file name for the real test later on.
38668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38669  if test "x$test_shortpath" = x; then
38670    # Short path failed, file does not exist as specified.
38671    # Try adding .exe or .cmd
38672    if test -f "${new_path}.exe"; then
38673      input_to_shortpath="${new_path}.exe"
38674    elif test -f "${new_path}.cmd"; then
38675      input_to_shortpath="${new_path}.cmd"
38676    else
38677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38678$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38679      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38680$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38681      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38682    fi
38683  else
38684    input_to_shortpath="$new_path"
38685  fi
38686
38687  # Call helper function which possibly converts this using DOS-style short mode.
38688  # If so, the updated path is stored in $new_path.
38689  new_path="$input_to_shortpath"
38690
38691  input_path="$input_to_shortpath"
38692  # Check if we need to convert this using DOS-style short mode. If the path
38693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38694  # take no chances and rewrite it.
38695  # Note: m4 eats our [], so we need to use [ and ] instead.
38696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38697  if test "x$has_forbidden_chars" != x; then
38698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38702      # Going to short mode and back again did indeed matter. Since short mode is
38703      # case insensitive, let's make it lowercase to improve readability.
38704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38705      # Now convert it back to Unix-style (cygpath)
38706      input_path=`$CYGPATH -u "$shortmode_path"`
38707      new_path="$input_path"
38708    fi
38709  fi
38710
38711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38712  if test "x$test_cygdrive_prefix" = x; then
38713    # As a simple fix, exclude /usr/bin since it's not a real path.
38714    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38716      # a path prefixed by /cygdrive for fixpath to work.
38717      new_path="$CYGWIN_ROOT_PATH$input_path"
38718    fi
38719  fi
38720
38721  # remove trailing .exe if any
38722  new_path="${new_path/%.exe/}"
38723
38724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38725
38726  # First separate the path from the arguments. This will split at the first
38727  # space.
38728  complete="$OBJCOPY"
38729  path="${complete%% *}"
38730  tmp="$complete EOL"
38731  arguments="${tmp#* }"
38732
38733  # Input might be given as Windows format, start by converting to
38734  # unix format.
38735  new_path="$path"
38736
38737  windows_path="$new_path"
38738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38739    unix_path=`$CYGPATH -u "$windows_path"`
38740    new_path="$unix_path"
38741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38743    new_path="$unix_path"
38744  fi
38745
38746
38747  # Now try to locate executable using which
38748  new_path=`$WHICH "$new_path" 2> /dev/null`
38749
38750  if test "x$new_path" = x; then
38751    # Oops. Which didn't find the executable.
38752    # The splitting of arguments from the executable at a space might have been incorrect,
38753    # since paths with space are more likely in Windows. Give it another try with the whole
38754    # argument.
38755    path="$complete"
38756    arguments="EOL"
38757    new_path="$path"
38758
38759  windows_path="$new_path"
38760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38761    unix_path=`$CYGPATH -u "$windows_path"`
38762    new_path="$unix_path"
38763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38765    new_path="$unix_path"
38766  fi
38767
38768
38769    new_path=`$WHICH "$new_path" 2> /dev/null`
38770    # bat and cmd files are not always considered executable in MSYS causing which
38771    # to not find them
38772    if test "x$new_path" = x \
38773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38775      new_path="$path"
38776
38777  windows_path="$new_path"
38778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38779    unix_path=`$CYGPATH -u "$windows_path"`
38780    new_path="$unix_path"
38781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38783    new_path="$unix_path"
38784  fi
38785
38786    fi
38787
38788    if test "x$new_path" = x; then
38789      # It's still not found. Now this is an unrecoverable error.
38790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38791$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38792      has_space=`$ECHO "$complete" | $GREP " "`
38793      if test "x$has_space" != x; then
38794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38796      fi
38797      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38798    fi
38799  fi
38800
38801  # Now new_path has a complete unix path to the binary
38802  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38803    # Keep paths in /bin as-is, but remove trailing .exe if any
38804    new_path="${new_path/%.exe/}"
38805    # Do not save /bin paths to all_fixpath_prefixes!
38806  else
38807    # Not in mixed or Windows style, start by that.
38808    new_path=`cmd //c echo $new_path`
38809
38810  input_path="$new_path"
38811  # Check if we need to convert this using DOS-style short mode. If the path
38812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38813  # take no chances and rewrite it.
38814  # Note: m4 eats our [], so we need to use [ and ] instead.
38815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38816  if test "x$has_forbidden_chars" != x; then
38817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38819  fi
38820
38821    # Output is in $new_path
38822
38823  windows_path="$new_path"
38824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38825    unix_path=`$CYGPATH -u "$windows_path"`
38826    new_path="$unix_path"
38827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38829    new_path="$unix_path"
38830  fi
38831
38832    # remove trailing .exe if any
38833    new_path="${new_path/%.exe/}"
38834
38835    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38836    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38837  fi
38838
38839    else
38840      # We're on a unix platform. Hooray! :)
38841      # First separate the path from the arguments. This will split at the first
38842      # space.
38843      complete="$OBJCOPY"
38844      path="${complete%% *}"
38845      tmp="$complete EOL"
38846      arguments="${tmp#* }"
38847
38848      # Cannot rely on the command "which" here since it doesn't always work.
38849      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38850      if test -z "$is_absolute_path"; then
38851        # Path to executable is not absolute. Find it.
38852        IFS_save="$IFS"
38853        IFS=:
38854        for p in $PATH; do
38855          if test -f "$p/$path" && test -x "$p/$path"; then
38856            new_path="$p/$path"
38857            break
38858          fi
38859        done
38860        IFS="$IFS_save"
38861      else
38862        # This is an absolute path, we can use it without further modifications.
38863        new_path="$path"
38864      fi
38865
38866      if test "x$new_path" = x; then
38867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38868$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38869        has_space=`$ECHO "$complete" | $GREP " "`
38870        if test "x$has_space" != x; then
38871          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38872$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38873        fi
38874        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38875      fi
38876    fi
38877
38878    # Now join together the path and the arguments once again
38879    if test "x$arguments" != xEOL; then
38880      new_complete="$new_path ${arguments% *}"
38881    else
38882      new_complete="$new_path"
38883    fi
38884
38885    if test "x$complete" != "x$new_complete"; then
38886      OBJCOPY="$new_complete"
38887      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38888$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38889    fi
38890  fi
38891
38892      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38893        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38894        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38895        # - version number is last blank separate word on first line
38896        # - version number formats that have been seen:
38897        #   - <major>.<minor>
38898        #   - <major>.<minor>.<micro>
38899        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38900        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38901         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38902              -e 's/.* //' \
38903              -e '/^[01]\./b bad' \
38904              -e '/^2\./{' \
38905              -e '  s/^2\.//' \
38906              -e '  /^[0-9]$/b bad' \
38907              -e '  /^[0-9]\./b bad' \
38908              -e '  /^1[0-9]$/b bad' \
38909              -e '  /^1[0-9]\./b bad' \
38910              -e '  /^20\./b bad' \
38911              -e '  /^21\.0$/b bad' \
38912              -e '  /^21\.0\./b bad' \
38913              -e '}' \
38914              -e ':good' \
38915              -e 's/.*/VALID_VERSION/p' \
38916              -e 'q' \
38917              -e ':bad' \
38918              -e 's/.*/BAD_VERSION/p' \
38919              -e 'q'`
38920        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38921          OBJCOPY=
38922          { $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
38923$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38924          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38925$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38926          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38927$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38928          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38929$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38930          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38931$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38932        fi
38933      fi
38934    fi
38935  fi
38936
38937
38938
38939  # Publish this variable in the help.
38940
38941
38942  if test "x$OBJDUMP" = x; then
38943    # The variable is not set by user, try to locate tool using the code snippet
38944    if test -n "$ac_tool_prefix"; then
38945  for ac_prog in gobjdump objdump
38946  do
38947    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38948set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38950$as_echo_n "checking for $ac_word... " >&6; }
38951if ${ac_cv_prog_OBJDUMP+:} false; then :
38952  $as_echo_n "(cached) " >&6
38953else
38954  if test -n "$OBJDUMP"; then
38955  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38956else
38957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38958for as_dir in $PATH
38959do
38960  IFS=$as_save_IFS
38961  test -z "$as_dir" && as_dir=.
38962    for ac_exec_ext in '' $ac_executable_extensions; do
38963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38964    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38966    break 2
38967  fi
38968done
38969  done
38970IFS=$as_save_IFS
38971
38972fi
38973fi
38974OBJDUMP=$ac_cv_prog_OBJDUMP
38975if test -n "$OBJDUMP"; then
38976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38977$as_echo "$OBJDUMP" >&6; }
38978else
38979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38980$as_echo "no" >&6; }
38981fi
38982
38983
38984    test -n "$OBJDUMP" && break
38985  done
38986fi
38987if test -z "$OBJDUMP"; then
38988  ac_ct_OBJDUMP=$OBJDUMP
38989  for ac_prog in gobjdump objdump
38990do
38991  # Extract the first word of "$ac_prog", so it can be a program name with args.
38992set dummy $ac_prog; ac_word=$2
38993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38994$as_echo_n "checking for $ac_word... " >&6; }
38995if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38996  $as_echo_n "(cached) " >&6
38997else
38998  if test -n "$ac_ct_OBJDUMP"; then
38999  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39000else
39001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39002for as_dir in $PATH
39003do
39004  IFS=$as_save_IFS
39005  test -z "$as_dir" && as_dir=.
39006    for ac_exec_ext in '' $ac_executable_extensions; do
39007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39008    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39010    break 2
39011  fi
39012done
39013  done
39014IFS=$as_save_IFS
39015
39016fi
39017fi
39018ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39019if test -n "$ac_ct_OBJDUMP"; then
39020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39021$as_echo "$ac_ct_OBJDUMP" >&6; }
39022else
39023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39024$as_echo "no" >&6; }
39025fi
39026
39027
39028  test -n "$ac_ct_OBJDUMP" && break
39029done
39030
39031  if test "x$ac_ct_OBJDUMP" = x; then
39032    OBJDUMP=""
39033  else
39034    case $cross_compiling:$ac_tool_warned in
39035yes:)
39036{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39037$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39038ac_tool_warned=yes ;;
39039esac
39040    OBJDUMP=$ac_ct_OBJDUMP
39041  fi
39042fi
39043
39044  else
39045    # The variable is set, but is it from the command line or the environment?
39046
39047    # Try to remove the string !OBJDUMP! from our list.
39048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39050      # If it failed, the variable was not from the command line. Ignore it,
39051      # but warn the user (except for BASH, which is always set by the calling BASH).
39052      if test "xOBJDUMP" != xBASH; then
39053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39054$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39055      fi
39056      # Try to locate tool using the code snippet
39057      if test -n "$ac_tool_prefix"; then
39058  for ac_prog in gobjdump objdump
39059  do
39060    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39061set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39063$as_echo_n "checking for $ac_word... " >&6; }
39064if ${ac_cv_prog_OBJDUMP+:} false; then :
39065  $as_echo_n "(cached) " >&6
39066else
39067  if test -n "$OBJDUMP"; then
39068  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39069else
39070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39071for as_dir in $PATH
39072do
39073  IFS=$as_save_IFS
39074  test -z "$as_dir" && as_dir=.
39075    for ac_exec_ext in '' $ac_executable_extensions; do
39076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39077    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39079    break 2
39080  fi
39081done
39082  done
39083IFS=$as_save_IFS
39084
39085fi
39086fi
39087OBJDUMP=$ac_cv_prog_OBJDUMP
39088if test -n "$OBJDUMP"; then
39089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39090$as_echo "$OBJDUMP" >&6; }
39091else
39092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39093$as_echo "no" >&6; }
39094fi
39095
39096
39097    test -n "$OBJDUMP" && break
39098  done
39099fi
39100if test -z "$OBJDUMP"; then
39101  ac_ct_OBJDUMP=$OBJDUMP
39102  for ac_prog in gobjdump objdump
39103do
39104  # Extract the first word of "$ac_prog", so it can be a program name with args.
39105set dummy $ac_prog; ac_word=$2
39106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39107$as_echo_n "checking for $ac_word... " >&6; }
39108if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39109  $as_echo_n "(cached) " >&6
39110else
39111  if test -n "$ac_ct_OBJDUMP"; then
39112  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39113else
39114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39115for as_dir in $PATH
39116do
39117  IFS=$as_save_IFS
39118  test -z "$as_dir" && as_dir=.
39119    for ac_exec_ext in '' $ac_executable_extensions; do
39120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39121    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39123    break 2
39124  fi
39125done
39126  done
39127IFS=$as_save_IFS
39128
39129fi
39130fi
39131ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39132if test -n "$ac_ct_OBJDUMP"; then
39133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39134$as_echo "$ac_ct_OBJDUMP" >&6; }
39135else
39136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39137$as_echo "no" >&6; }
39138fi
39139
39140
39141  test -n "$ac_ct_OBJDUMP" && break
39142done
39143
39144  if test "x$ac_ct_OBJDUMP" = x; then
39145    OBJDUMP=""
39146  else
39147    case $cross_compiling:$ac_tool_warned in
39148yes:)
39149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39151ac_tool_warned=yes ;;
39152esac
39153    OBJDUMP=$ac_ct_OBJDUMP
39154  fi
39155fi
39156
39157    else
39158      # If it succeeded, then it was overridden by the user. We will use it
39159      # for the tool.
39160
39161      # First remove it from the list of overridden variables, so we can test
39162      # for unknown variables in the end.
39163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39164
39165      # Check if the provided tool contains a complete path.
39166      tool_specified="$OBJDUMP"
39167      tool_basename="${tool_specified##*/}"
39168      if test "x$tool_basename" = "x$tool_specified"; then
39169        # A command without a complete path is provided, search $PATH.
39170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39171$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39172        # Extract the first word of "$tool_basename", so it can be a program name with args.
39173set dummy $tool_basename; ac_word=$2
39174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39175$as_echo_n "checking for $ac_word... " >&6; }
39176if ${ac_cv_path_OBJDUMP+:} false; then :
39177  $as_echo_n "(cached) " >&6
39178else
39179  case $OBJDUMP in
39180  [\\/]* | ?:[\\/]*)
39181  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39182  ;;
39183  *)
39184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39185for as_dir in $PATH
39186do
39187  IFS=$as_save_IFS
39188  test -z "$as_dir" && as_dir=.
39189    for ac_exec_ext in '' $ac_executable_extensions; do
39190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39191    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39193    break 2
39194  fi
39195done
39196  done
39197IFS=$as_save_IFS
39198
39199  ;;
39200esac
39201fi
39202OBJDUMP=$ac_cv_path_OBJDUMP
39203if test -n "$OBJDUMP"; then
39204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39205$as_echo "$OBJDUMP" >&6; }
39206else
39207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39208$as_echo "no" >&6; }
39209fi
39210
39211
39212        if test "x$OBJDUMP" = x; then
39213          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39214        fi
39215      else
39216        # Otherwise we believe it is a complete path. Use it as it is.
39217        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39218$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39220$as_echo_n "checking for OBJDUMP... " >&6; }
39221        if test ! -x "$tool_specified"; then
39222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39223$as_echo "not found" >&6; }
39224          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39225        fi
39226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39227$as_echo "$tool_specified" >&6; }
39228      fi
39229    fi
39230  fi
39231
39232
39233  if test "x$OBJDUMP" != x; then
39234    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39235    # bails if argument is missing.
39236
39237  # Only process if variable expands to non-empty
39238
39239  if test "x$OBJDUMP" != x; then
39240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39241
39242  # First separate the path from the arguments. This will split at the first
39243  # space.
39244  complete="$OBJDUMP"
39245  path="${complete%% *}"
39246  tmp="$complete EOL"
39247  arguments="${tmp#* }"
39248
39249  # Input might be given as Windows format, start by converting to
39250  # unix format.
39251  new_path=`$CYGPATH -u "$path"`
39252
39253  # Now try to locate executable using which
39254  new_path=`$WHICH "$new_path" 2> /dev/null`
39255  # bat and cmd files are not always considered executable in cygwin causing which
39256  # to not find them
39257  if test "x$new_path" = x \
39258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39260    new_path=`$CYGPATH -u "$path"`
39261  fi
39262  if test "x$new_path" = x; then
39263    # Oops. Which didn't find the executable.
39264    # The splitting of arguments from the executable at a space might have been incorrect,
39265    # since paths with space are more likely in Windows. Give it another try with the whole
39266    # argument.
39267    path="$complete"
39268    arguments="EOL"
39269    new_path=`$CYGPATH -u "$path"`
39270    new_path=`$WHICH "$new_path" 2> /dev/null`
39271    # bat and cmd files are not always considered executable in cygwin causing which
39272    # to not find them
39273    if test "x$new_path" = x \
39274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39276      new_path=`$CYGPATH -u "$path"`
39277    fi
39278    if test "x$new_path" = x; then
39279      # It's still not found. Now this is an unrecoverable error.
39280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39281$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39282      has_space=`$ECHO "$complete" | $GREP " "`
39283      if test "x$has_space" != x; then
39284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39286      fi
39287      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39288    fi
39289  fi
39290
39291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39294  # "foo.exe" is OK but "foo" is an error.
39295  #
39296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39297  # It is also a way to make sure we got the proper file name for the real test later on.
39298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39299  if test "x$test_shortpath" = x; then
39300    # Short path failed, file does not exist as specified.
39301    # Try adding .exe or .cmd
39302    if test -f "${new_path}.exe"; then
39303      input_to_shortpath="${new_path}.exe"
39304    elif test -f "${new_path}.cmd"; then
39305      input_to_shortpath="${new_path}.cmd"
39306    else
39307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39308$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39311      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39312    fi
39313  else
39314    input_to_shortpath="$new_path"
39315  fi
39316
39317  # Call helper function which possibly converts this using DOS-style short mode.
39318  # If so, the updated path is stored in $new_path.
39319  new_path="$input_to_shortpath"
39320
39321  input_path="$input_to_shortpath"
39322  # Check if we need to convert this using DOS-style short mode. If the path
39323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39324  # take no chances and rewrite it.
39325  # Note: m4 eats our [], so we need to use [ and ] instead.
39326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39327  if test "x$has_forbidden_chars" != x; then
39328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39332      # Going to short mode and back again did indeed matter. Since short mode is
39333      # case insensitive, let's make it lowercase to improve readability.
39334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39335      # Now convert it back to Unix-style (cygpath)
39336      input_path=`$CYGPATH -u "$shortmode_path"`
39337      new_path="$input_path"
39338    fi
39339  fi
39340
39341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39342  if test "x$test_cygdrive_prefix" = x; then
39343    # As a simple fix, exclude /usr/bin since it's not a real path.
39344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39346      # a path prefixed by /cygdrive for fixpath to work.
39347      new_path="$CYGWIN_ROOT_PATH$input_path"
39348    fi
39349  fi
39350
39351  # remove trailing .exe if any
39352  new_path="${new_path/%.exe/}"
39353
39354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39355
39356  # First separate the path from the arguments. This will split at the first
39357  # space.
39358  complete="$OBJDUMP"
39359  path="${complete%% *}"
39360  tmp="$complete EOL"
39361  arguments="${tmp#* }"
39362
39363  # Input might be given as Windows format, start by converting to
39364  # unix format.
39365  new_path="$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
39377  # Now try to locate executable using which
39378  new_path=`$WHICH "$new_path" 2> /dev/null`
39379
39380  if test "x$new_path" = x; then
39381    # Oops. Which didn't find the executable.
39382    # The splitting of arguments from the executable at a space might have been incorrect,
39383    # since paths with space are more likely in Windows. Give it another try with the whole
39384    # argument.
39385    path="$complete"
39386    arguments="EOL"
39387    new_path="$path"
39388
39389  windows_path="$new_path"
39390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39391    unix_path=`$CYGPATH -u "$windows_path"`
39392    new_path="$unix_path"
39393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39395    new_path="$unix_path"
39396  fi
39397
39398
39399    new_path=`$WHICH "$new_path" 2> /dev/null`
39400    # bat and cmd files are not always considered executable in MSYS causing which
39401    # to not find them
39402    if test "x$new_path" = x \
39403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39405      new_path="$path"
39406
39407  windows_path="$new_path"
39408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39409    unix_path=`$CYGPATH -u "$windows_path"`
39410    new_path="$unix_path"
39411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39413    new_path="$unix_path"
39414  fi
39415
39416    fi
39417
39418    if test "x$new_path" = x; then
39419      # It's still not found. Now this is an unrecoverable error.
39420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39421$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39422      has_space=`$ECHO "$complete" | $GREP " "`
39423      if test "x$has_space" != x; then
39424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39426      fi
39427      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39428    fi
39429  fi
39430
39431  # Now new_path has a complete unix path to the binary
39432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39433    # Keep paths in /bin as-is, but remove trailing .exe if any
39434    new_path="${new_path/%.exe/}"
39435    # Do not save /bin paths to all_fixpath_prefixes!
39436  else
39437    # Not in mixed or Windows style, start by that.
39438    new_path=`cmd //c echo $new_path`
39439
39440  input_path="$new_path"
39441  # Check if we need to convert this using DOS-style short mode. If the path
39442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39443  # take no chances and rewrite it.
39444  # Note: m4 eats our [], so we need to use [ and ] instead.
39445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39446  if test "x$has_forbidden_chars" != x; then
39447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39449  fi
39450
39451    # Output is in $new_path
39452
39453  windows_path="$new_path"
39454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39455    unix_path=`$CYGPATH -u "$windows_path"`
39456    new_path="$unix_path"
39457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39459    new_path="$unix_path"
39460  fi
39461
39462    # remove trailing .exe if any
39463    new_path="${new_path/%.exe/}"
39464
39465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39467  fi
39468
39469    else
39470      # We're on a unix platform. Hooray! :)
39471      # First separate the path from the arguments. This will split at the first
39472      # space.
39473      complete="$OBJDUMP"
39474      path="${complete%% *}"
39475      tmp="$complete EOL"
39476      arguments="${tmp#* }"
39477
39478      # Cannot rely on the command "which" here since it doesn't always work.
39479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39480      if test -z "$is_absolute_path"; then
39481        # Path to executable is not absolute. Find it.
39482        IFS_save="$IFS"
39483        IFS=:
39484        for p in $PATH; do
39485          if test -f "$p/$path" && test -x "$p/$path"; then
39486            new_path="$p/$path"
39487            break
39488          fi
39489        done
39490        IFS="$IFS_save"
39491      else
39492        # This is an absolute path, we can use it without further modifications.
39493        new_path="$path"
39494      fi
39495
39496      if test "x$new_path" = x; then
39497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39498$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39499        has_space=`$ECHO "$complete" | $GREP " "`
39500        if test "x$has_space" != x; then
39501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39503        fi
39504        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39505      fi
39506    fi
39507
39508    # Now join together the path and the arguments once again
39509    if test "x$arguments" != xEOL; then
39510      new_complete="$new_path ${arguments% *}"
39511    else
39512      new_complete="$new_path"
39513    fi
39514
39515    if test "x$complete" != "x$new_complete"; then
39516      OBJDUMP="$new_complete"
39517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39518$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39519    fi
39520  fi
39521
39522  fi
39523
39524
39525  # Restore old path.
39526  PATH="$OLD_PATH"
39527
39528  # Restore the flags to the user specified values.
39529  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39530  CFLAGS="$ORG_CFLAGS"
39531  CXXFLAGS="$ORG_CXXFLAGS"
39532
39533
39534# Finally do some processing after the detection phase
39535
39536  if test "x$COMPILE_TYPE" = "xcross"; then
39537    # Now we need to find a C/C++ compiler that can build executables for the
39538    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39539    # used once. Also, we need to do this without adding a tools dir to the
39540    # path, otherwise we might pick up cross-compilers which don't use standard
39541    # naming.
39542
39543    # FIXME: we should list the discovered compilers as an exclude pattern!
39544    # If we do that, we can do this detection before POST_DETECTION, and still
39545    # find the build compilers in the tools dir, if needed.
39546
39547
39548  # Publish this variable in the help.
39549
39550
39551  if test "x$BUILD_CC" = x; then
39552    # The variable is not set by user, try to locate tool using the code snippet
39553    for ac_prog in cl cc gcc
39554do
39555  # Extract the first word of "$ac_prog", so it can be a program name with args.
39556set dummy $ac_prog; ac_word=$2
39557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39558$as_echo_n "checking for $ac_word... " >&6; }
39559if ${ac_cv_path_BUILD_CC+:} false; then :
39560  $as_echo_n "(cached) " >&6
39561else
39562  case $BUILD_CC in
39563  [\\/]* | ?:[\\/]*)
39564  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39565  ;;
39566  *)
39567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39568for as_dir in $PATH
39569do
39570  IFS=$as_save_IFS
39571  test -z "$as_dir" && as_dir=.
39572    for ac_exec_ext in '' $ac_executable_extensions; do
39573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39574    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39576    break 2
39577  fi
39578done
39579  done
39580IFS=$as_save_IFS
39581
39582  ;;
39583esac
39584fi
39585BUILD_CC=$ac_cv_path_BUILD_CC
39586if test -n "$BUILD_CC"; then
39587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39588$as_echo "$BUILD_CC" >&6; }
39589else
39590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39591$as_echo "no" >&6; }
39592fi
39593
39594
39595  test -n "$BUILD_CC" && break
39596done
39597
39598  else
39599    # The variable is set, but is it from the command line or the environment?
39600
39601    # Try to remove the string !BUILD_CC! from our list.
39602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39604      # If it failed, the variable was not from the command line. Ignore it,
39605      # but warn the user (except for BASH, which is always set by the calling BASH).
39606      if test "xBUILD_CC" != xBASH; then
39607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39608$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39609      fi
39610      # Try to locate tool using the code snippet
39611      for ac_prog in cl cc gcc
39612do
39613  # Extract the first word of "$ac_prog", so it can be a program name with args.
39614set dummy $ac_prog; ac_word=$2
39615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39616$as_echo_n "checking for $ac_word... " >&6; }
39617if ${ac_cv_path_BUILD_CC+:} false; then :
39618  $as_echo_n "(cached) " >&6
39619else
39620  case $BUILD_CC in
39621  [\\/]* | ?:[\\/]*)
39622  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39623  ;;
39624  *)
39625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39626for as_dir in $PATH
39627do
39628  IFS=$as_save_IFS
39629  test -z "$as_dir" && as_dir=.
39630    for ac_exec_ext in '' $ac_executable_extensions; do
39631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39632    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39634    break 2
39635  fi
39636done
39637  done
39638IFS=$as_save_IFS
39639
39640  ;;
39641esac
39642fi
39643BUILD_CC=$ac_cv_path_BUILD_CC
39644if test -n "$BUILD_CC"; then
39645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39646$as_echo "$BUILD_CC" >&6; }
39647else
39648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39649$as_echo "no" >&6; }
39650fi
39651
39652
39653  test -n "$BUILD_CC" && break
39654done
39655
39656    else
39657      # If it succeeded, then it was overridden by the user. We will use it
39658      # for the tool.
39659
39660      # First remove it from the list of overridden variables, so we can test
39661      # for unknown variables in the end.
39662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39663
39664      # Check if the provided tool contains a complete path.
39665      tool_specified="$BUILD_CC"
39666      tool_basename="${tool_specified##*/}"
39667      if test "x$tool_basename" = "x$tool_specified"; then
39668        # A command without a complete path is provided, search $PATH.
39669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39670$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39671        # Extract the first word of "$tool_basename", so it can be a program name with args.
39672set dummy $tool_basename; ac_word=$2
39673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39674$as_echo_n "checking for $ac_word... " >&6; }
39675if ${ac_cv_path_BUILD_CC+:} false; then :
39676  $as_echo_n "(cached) " >&6
39677else
39678  case $BUILD_CC in
39679  [\\/]* | ?:[\\/]*)
39680  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39681  ;;
39682  *)
39683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39684for as_dir in $PATH
39685do
39686  IFS=$as_save_IFS
39687  test -z "$as_dir" && as_dir=.
39688    for ac_exec_ext in '' $ac_executable_extensions; do
39689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39690    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39692    break 2
39693  fi
39694done
39695  done
39696IFS=$as_save_IFS
39697
39698  ;;
39699esac
39700fi
39701BUILD_CC=$ac_cv_path_BUILD_CC
39702if test -n "$BUILD_CC"; then
39703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39704$as_echo "$BUILD_CC" >&6; }
39705else
39706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39707$as_echo "no" >&6; }
39708fi
39709
39710
39711        if test "x$BUILD_CC" = x; then
39712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39713        fi
39714      else
39715        # Otherwise we believe it is a complete path. Use it as it is.
39716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39717$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39719$as_echo_n "checking for BUILD_CC... " >&6; }
39720        if test ! -x "$tool_specified"; then
39721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39722$as_echo "not found" >&6; }
39723          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39724        fi
39725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39726$as_echo "$tool_specified" >&6; }
39727      fi
39728    fi
39729  fi
39730
39731
39732
39733  # Only process if variable expands to non-empty
39734
39735  if test "x$BUILD_CC" != x; then
39736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39737
39738  # First separate the path from the arguments. This will split at the first
39739  # space.
39740  complete="$BUILD_CC"
39741  path="${complete%% *}"
39742  tmp="$complete EOL"
39743  arguments="${tmp#* }"
39744
39745  # Input might be given as Windows format, start by converting to
39746  # unix format.
39747  new_path=`$CYGPATH -u "$path"`
39748
39749  # Now try to locate executable using which
39750  new_path=`$WHICH "$new_path" 2> /dev/null`
39751  # bat and cmd files are not always considered executable in cygwin causing which
39752  # to not find them
39753  if test "x$new_path" = x \
39754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39756    new_path=`$CYGPATH -u "$path"`
39757  fi
39758  if test "x$new_path" = x; then
39759    # Oops. Which didn't find the executable.
39760    # The splitting of arguments from the executable at a space might have been incorrect,
39761    # since paths with space are more likely in Windows. Give it another try with the whole
39762    # argument.
39763    path="$complete"
39764    arguments="EOL"
39765    new_path=`$CYGPATH -u "$path"`
39766    new_path=`$WHICH "$new_path" 2> /dev/null`
39767    # bat and cmd files are not always considered executable in cygwin causing which
39768    # to not find them
39769    if test "x$new_path" = x \
39770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39772      new_path=`$CYGPATH -u "$path"`
39773    fi
39774    if test "x$new_path" = x; then
39775      # It's still not found. Now this is an unrecoverable error.
39776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39777$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39778      has_space=`$ECHO "$complete" | $GREP " "`
39779      if test "x$has_space" != x; then
39780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39782      fi
39783      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39784    fi
39785  fi
39786
39787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39790  # "foo.exe" is OK but "foo" is an error.
39791  #
39792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39793  # It is also a way to make sure we got the proper file name for the real test later on.
39794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39795  if test "x$test_shortpath" = x; then
39796    # Short path failed, file does not exist as specified.
39797    # Try adding .exe or .cmd
39798    if test -f "${new_path}.exe"; then
39799      input_to_shortpath="${new_path}.exe"
39800    elif test -f "${new_path}.cmd"; then
39801      input_to_shortpath="${new_path}.cmd"
39802    else
39803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39804$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39807      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39808    fi
39809  else
39810    input_to_shortpath="$new_path"
39811  fi
39812
39813  # Call helper function which possibly converts this using DOS-style short mode.
39814  # If so, the updated path is stored in $new_path.
39815  new_path="$input_to_shortpath"
39816
39817  input_path="$input_to_shortpath"
39818  # Check if we need to convert this using DOS-style short mode. If the path
39819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39820  # take no chances and rewrite it.
39821  # Note: m4 eats our [], so we need to use [ and ] instead.
39822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39823  if test "x$has_forbidden_chars" != x; then
39824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39828      # Going to short mode and back again did indeed matter. Since short mode is
39829      # case insensitive, let's make it lowercase to improve readability.
39830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39831      # Now convert it back to Unix-style (cygpath)
39832      input_path=`$CYGPATH -u "$shortmode_path"`
39833      new_path="$input_path"
39834    fi
39835  fi
39836
39837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39838  if test "x$test_cygdrive_prefix" = x; then
39839    # As a simple fix, exclude /usr/bin since it's not a real path.
39840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39842      # a path prefixed by /cygdrive for fixpath to work.
39843      new_path="$CYGWIN_ROOT_PATH$input_path"
39844    fi
39845  fi
39846
39847  # remove trailing .exe if any
39848  new_path="${new_path/%.exe/}"
39849
39850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39851
39852  # First separate the path from the arguments. This will split at the first
39853  # space.
39854  complete="$BUILD_CC"
39855  path="${complete%% *}"
39856  tmp="$complete EOL"
39857  arguments="${tmp#* }"
39858
39859  # Input might be given as Windows format, start by converting to
39860  # unix format.
39861  new_path="$path"
39862
39863  windows_path="$new_path"
39864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39865    unix_path=`$CYGPATH -u "$windows_path"`
39866    new_path="$unix_path"
39867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39869    new_path="$unix_path"
39870  fi
39871
39872
39873  # Now try to locate executable using which
39874  new_path=`$WHICH "$new_path" 2> /dev/null`
39875
39876  if test "x$new_path" = x; then
39877    # Oops. Which didn't find the executable.
39878    # The splitting of arguments from the executable at a space might have been incorrect,
39879    # since paths with space are more likely in Windows. Give it another try with the whole
39880    # argument.
39881    path="$complete"
39882    arguments="EOL"
39883    new_path="$path"
39884
39885  windows_path="$new_path"
39886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39887    unix_path=`$CYGPATH -u "$windows_path"`
39888    new_path="$unix_path"
39889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39891    new_path="$unix_path"
39892  fi
39893
39894
39895    new_path=`$WHICH "$new_path" 2> /dev/null`
39896    # bat and cmd files are not always considered executable in MSYS causing which
39897    # to not find them
39898    if test "x$new_path" = x \
39899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39901      new_path="$path"
39902
39903  windows_path="$new_path"
39904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39905    unix_path=`$CYGPATH -u "$windows_path"`
39906    new_path="$unix_path"
39907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39909    new_path="$unix_path"
39910  fi
39911
39912    fi
39913
39914    if test "x$new_path" = x; then
39915      # It's still not found. Now this is an unrecoverable error.
39916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39917$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39918      has_space=`$ECHO "$complete" | $GREP " "`
39919      if test "x$has_space" != x; then
39920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39922      fi
39923      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39924    fi
39925  fi
39926
39927  # Now new_path has a complete unix path to the binary
39928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39929    # Keep paths in /bin as-is, but remove trailing .exe if any
39930    new_path="${new_path/%.exe/}"
39931    # Do not save /bin paths to all_fixpath_prefixes!
39932  else
39933    # Not in mixed or Windows style, start by that.
39934    new_path=`cmd //c echo $new_path`
39935
39936  input_path="$new_path"
39937  # Check if we need to convert this using DOS-style short mode. If the path
39938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39939  # take no chances and rewrite it.
39940  # Note: m4 eats our [], so we need to use [ and ] instead.
39941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39942  if test "x$has_forbidden_chars" != x; then
39943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39945  fi
39946
39947    # Output is in $new_path
39948
39949  windows_path="$new_path"
39950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39951    unix_path=`$CYGPATH -u "$windows_path"`
39952    new_path="$unix_path"
39953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39955    new_path="$unix_path"
39956  fi
39957
39958    # remove trailing .exe if any
39959    new_path="${new_path/%.exe/}"
39960
39961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39963  fi
39964
39965    else
39966      # We're on a unix platform. Hooray! :)
39967      # First separate the path from the arguments. This will split at the first
39968      # space.
39969      complete="$BUILD_CC"
39970      path="${complete%% *}"
39971      tmp="$complete EOL"
39972      arguments="${tmp#* }"
39973
39974      # Cannot rely on the command "which" here since it doesn't always work.
39975      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39976      if test -z "$is_absolute_path"; then
39977        # Path to executable is not absolute. Find it.
39978        IFS_save="$IFS"
39979        IFS=:
39980        for p in $PATH; do
39981          if test -f "$p/$path" && test -x "$p/$path"; then
39982            new_path="$p/$path"
39983            break
39984          fi
39985        done
39986        IFS="$IFS_save"
39987      else
39988        # This is an absolute path, we can use it without further modifications.
39989        new_path="$path"
39990      fi
39991
39992      if test "x$new_path" = x; then
39993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39994$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39995        has_space=`$ECHO "$complete" | $GREP " "`
39996        if test "x$has_space" != x; then
39997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39999        fi
40000        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40001      fi
40002    fi
40003
40004    # Now join together the path and the arguments once again
40005    if test "x$arguments" != xEOL; then
40006      new_complete="$new_path ${arguments% *}"
40007    else
40008      new_complete="$new_path"
40009    fi
40010
40011    if test "x$complete" != "x$new_complete"; then
40012      BUILD_CC="$new_complete"
40013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40014$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40015    fi
40016  fi
40017
40018
40019
40020  # Publish this variable in the help.
40021
40022
40023  if test "x$BUILD_CXX" = x; then
40024    # The variable is not set by user, try to locate tool using the code snippet
40025    for ac_prog in cl CC g++
40026do
40027  # Extract the first word of "$ac_prog", so it can be a program name with args.
40028set dummy $ac_prog; ac_word=$2
40029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40030$as_echo_n "checking for $ac_word... " >&6; }
40031if ${ac_cv_path_BUILD_CXX+:} false; then :
40032  $as_echo_n "(cached) " >&6
40033else
40034  case $BUILD_CXX in
40035  [\\/]* | ?:[\\/]*)
40036  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40037  ;;
40038  *)
40039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40040for as_dir in $PATH
40041do
40042  IFS=$as_save_IFS
40043  test -z "$as_dir" && as_dir=.
40044    for ac_exec_ext in '' $ac_executable_extensions; do
40045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40046    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40048    break 2
40049  fi
40050done
40051  done
40052IFS=$as_save_IFS
40053
40054  ;;
40055esac
40056fi
40057BUILD_CXX=$ac_cv_path_BUILD_CXX
40058if test -n "$BUILD_CXX"; then
40059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40060$as_echo "$BUILD_CXX" >&6; }
40061else
40062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40063$as_echo "no" >&6; }
40064fi
40065
40066
40067  test -n "$BUILD_CXX" && break
40068done
40069
40070  else
40071    # The variable is set, but is it from the command line or the environment?
40072
40073    # Try to remove the string !BUILD_CXX! from our list.
40074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40076      # If it failed, the variable was not from the command line. Ignore it,
40077      # but warn the user (except for BASH, which is always set by the calling BASH).
40078      if test "xBUILD_CXX" != xBASH; then
40079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40080$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40081      fi
40082      # Try to locate tool using the code snippet
40083      for ac_prog in cl CC g++
40084do
40085  # Extract the first word of "$ac_prog", so it can be a program name with args.
40086set dummy $ac_prog; ac_word=$2
40087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40088$as_echo_n "checking for $ac_word... " >&6; }
40089if ${ac_cv_path_BUILD_CXX+:} false; then :
40090  $as_echo_n "(cached) " >&6
40091else
40092  case $BUILD_CXX in
40093  [\\/]* | ?:[\\/]*)
40094  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40095  ;;
40096  *)
40097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40098for as_dir in $PATH
40099do
40100  IFS=$as_save_IFS
40101  test -z "$as_dir" && as_dir=.
40102    for ac_exec_ext in '' $ac_executable_extensions; do
40103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40104    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40106    break 2
40107  fi
40108done
40109  done
40110IFS=$as_save_IFS
40111
40112  ;;
40113esac
40114fi
40115BUILD_CXX=$ac_cv_path_BUILD_CXX
40116if test -n "$BUILD_CXX"; then
40117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40118$as_echo "$BUILD_CXX" >&6; }
40119else
40120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40121$as_echo "no" >&6; }
40122fi
40123
40124
40125  test -n "$BUILD_CXX" && break
40126done
40127
40128    else
40129      # If it succeeded, then it was overridden by the user. We will use it
40130      # for the tool.
40131
40132      # First remove it from the list of overridden variables, so we can test
40133      # for unknown variables in the end.
40134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40135
40136      # Check if the provided tool contains a complete path.
40137      tool_specified="$BUILD_CXX"
40138      tool_basename="${tool_specified##*/}"
40139      if test "x$tool_basename" = "x$tool_specified"; then
40140        # A command without a complete path is provided, search $PATH.
40141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40142$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40143        # Extract the first word of "$tool_basename", so it can be a program name with args.
40144set dummy $tool_basename; ac_word=$2
40145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40146$as_echo_n "checking for $ac_word... " >&6; }
40147if ${ac_cv_path_BUILD_CXX+:} false; then :
40148  $as_echo_n "(cached) " >&6
40149else
40150  case $BUILD_CXX in
40151  [\\/]* | ?:[\\/]*)
40152  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40153  ;;
40154  *)
40155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40156for as_dir in $PATH
40157do
40158  IFS=$as_save_IFS
40159  test -z "$as_dir" && as_dir=.
40160    for ac_exec_ext in '' $ac_executable_extensions; do
40161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40162    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40164    break 2
40165  fi
40166done
40167  done
40168IFS=$as_save_IFS
40169
40170  ;;
40171esac
40172fi
40173BUILD_CXX=$ac_cv_path_BUILD_CXX
40174if test -n "$BUILD_CXX"; then
40175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40176$as_echo "$BUILD_CXX" >&6; }
40177else
40178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40179$as_echo "no" >&6; }
40180fi
40181
40182
40183        if test "x$BUILD_CXX" = x; then
40184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40185        fi
40186      else
40187        # Otherwise we believe it is a complete path. Use it as it is.
40188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40189$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40191$as_echo_n "checking for BUILD_CXX... " >&6; }
40192        if test ! -x "$tool_specified"; then
40193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40194$as_echo "not found" >&6; }
40195          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40196        fi
40197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40198$as_echo "$tool_specified" >&6; }
40199      fi
40200    fi
40201  fi
40202
40203
40204
40205  # Only process if variable expands to non-empty
40206
40207  if test "x$BUILD_CXX" != x; then
40208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40209
40210  # First separate the path from the arguments. This will split at the first
40211  # space.
40212  complete="$BUILD_CXX"
40213  path="${complete%% *}"
40214  tmp="$complete EOL"
40215  arguments="${tmp#* }"
40216
40217  # Input might be given as Windows format, start by converting to
40218  # unix format.
40219  new_path=`$CYGPATH -u "$path"`
40220
40221  # Now try to locate executable using which
40222  new_path=`$WHICH "$new_path" 2> /dev/null`
40223  # bat and cmd files are not always considered executable in cygwin causing which
40224  # to not find them
40225  if test "x$new_path" = x \
40226      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40227      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40228    new_path=`$CYGPATH -u "$path"`
40229  fi
40230  if test "x$new_path" = x; then
40231    # Oops. Which didn't find the executable.
40232    # The splitting of arguments from the executable at a space might have been incorrect,
40233    # since paths with space are more likely in Windows. Give it another try with the whole
40234    # argument.
40235    path="$complete"
40236    arguments="EOL"
40237    new_path=`$CYGPATH -u "$path"`
40238    new_path=`$WHICH "$new_path" 2> /dev/null`
40239    # bat and cmd files are not always considered executable in cygwin causing which
40240    # to not find them
40241    if test "x$new_path" = x \
40242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40244      new_path=`$CYGPATH -u "$path"`
40245    fi
40246    if test "x$new_path" = x; then
40247      # It's still not found. Now this is an unrecoverable error.
40248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40249$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40250      has_space=`$ECHO "$complete" | $GREP " "`
40251      if test "x$has_space" != x; then
40252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40254      fi
40255      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40256    fi
40257  fi
40258
40259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40262  # "foo.exe" is OK but "foo" is an error.
40263  #
40264  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40265  # It is also a way to make sure we got the proper file name for the real test later on.
40266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40267  if test "x$test_shortpath" = x; then
40268    # Short path failed, file does not exist as specified.
40269    # Try adding .exe or .cmd
40270    if test -f "${new_path}.exe"; then
40271      input_to_shortpath="${new_path}.exe"
40272    elif test -f "${new_path}.cmd"; then
40273      input_to_shortpath="${new_path}.cmd"
40274    else
40275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40276$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40279      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40280    fi
40281  else
40282    input_to_shortpath="$new_path"
40283  fi
40284
40285  # Call helper function which possibly converts this using DOS-style short mode.
40286  # If so, the updated path is stored in $new_path.
40287  new_path="$input_to_shortpath"
40288
40289  input_path="$input_to_shortpath"
40290  # Check if we need to convert this using DOS-style short mode. If the path
40291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40292  # take no chances and rewrite it.
40293  # Note: m4 eats our [], so we need to use [ and ] instead.
40294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40295  if test "x$has_forbidden_chars" != x; then
40296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40300      # Going to short mode and back again did indeed matter. Since short mode is
40301      # case insensitive, let's make it lowercase to improve readability.
40302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40303      # Now convert it back to Unix-style (cygpath)
40304      input_path=`$CYGPATH -u "$shortmode_path"`
40305      new_path="$input_path"
40306    fi
40307  fi
40308
40309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40310  if test "x$test_cygdrive_prefix" = x; then
40311    # As a simple fix, exclude /usr/bin since it's not a real path.
40312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40314      # a path prefixed by /cygdrive for fixpath to work.
40315      new_path="$CYGWIN_ROOT_PATH$input_path"
40316    fi
40317  fi
40318
40319  # remove trailing .exe if any
40320  new_path="${new_path/%.exe/}"
40321
40322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323
40324  # First separate the path from the arguments. This will split at the first
40325  # space.
40326  complete="$BUILD_CXX"
40327  path="${complete%% *}"
40328  tmp="$complete EOL"
40329  arguments="${tmp#* }"
40330
40331  # Input might be given as Windows format, start by converting to
40332  # unix format.
40333  new_path="$path"
40334
40335  windows_path="$new_path"
40336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40337    unix_path=`$CYGPATH -u "$windows_path"`
40338    new_path="$unix_path"
40339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40341    new_path="$unix_path"
40342  fi
40343
40344
40345  # Now try to locate executable using which
40346  new_path=`$WHICH "$new_path" 2> /dev/null`
40347
40348  if test "x$new_path" = x; then
40349    # Oops. Which didn't find the executable.
40350    # The splitting of arguments from the executable at a space might have been incorrect,
40351    # since paths with space are more likely in Windows. Give it another try with the whole
40352    # argument.
40353    path="$complete"
40354    arguments="EOL"
40355    new_path="$path"
40356
40357  windows_path="$new_path"
40358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40359    unix_path=`$CYGPATH -u "$windows_path"`
40360    new_path="$unix_path"
40361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40363    new_path="$unix_path"
40364  fi
40365
40366
40367    new_path=`$WHICH "$new_path" 2> /dev/null`
40368    # bat and cmd files are not always considered executable in MSYS causing which
40369    # to not find them
40370    if test "x$new_path" = x \
40371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40373      new_path="$path"
40374
40375  windows_path="$new_path"
40376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40377    unix_path=`$CYGPATH -u "$windows_path"`
40378    new_path="$unix_path"
40379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40381    new_path="$unix_path"
40382  fi
40383
40384    fi
40385
40386    if test "x$new_path" = x; then
40387      # It's still not found. Now this is an unrecoverable error.
40388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40389$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40390      has_space=`$ECHO "$complete" | $GREP " "`
40391      if test "x$has_space" != x; then
40392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40394      fi
40395      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40396    fi
40397  fi
40398
40399  # Now new_path has a complete unix path to the binary
40400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40401    # Keep paths in /bin as-is, but remove trailing .exe if any
40402    new_path="${new_path/%.exe/}"
40403    # Do not save /bin paths to all_fixpath_prefixes!
40404  else
40405    # Not in mixed or Windows style, start by that.
40406    new_path=`cmd //c echo $new_path`
40407
40408  input_path="$new_path"
40409  # Check if we need to convert this using DOS-style short mode. If the path
40410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40411  # take no chances and rewrite it.
40412  # Note: m4 eats our [], so we need to use [ and ] instead.
40413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40414  if test "x$has_forbidden_chars" != x; then
40415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40417  fi
40418
40419    # Output is in $new_path
40420
40421  windows_path="$new_path"
40422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40423    unix_path=`$CYGPATH -u "$windows_path"`
40424    new_path="$unix_path"
40425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40427    new_path="$unix_path"
40428  fi
40429
40430    # remove trailing .exe if any
40431    new_path="${new_path/%.exe/}"
40432
40433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40435  fi
40436
40437    else
40438      # We're on a unix platform. Hooray! :)
40439      # First separate the path from the arguments. This will split at the first
40440      # space.
40441      complete="$BUILD_CXX"
40442      path="${complete%% *}"
40443      tmp="$complete EOL"
40444      arguments="${tmp#* }"
40445
40446      # Cannot rely on the command "which" here since it doesn't always work.
40447      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40448      if test -z "$is_absolute_path"; then
40449        # Path to executable is not absolute. Find it.
40450        IFS_save="$IFS"
40451        IFS=:
40452        for p in $PATH; do
40453          if test -f "$p/$path" && test -x "$p/$path"; then
40454            new_path="$p/$path"
40455            break
40456          fi
40457        done
40458        IFS="$IFS_save"
40459      else
40460        # This is an absolute path, we can use it without further modifications.
40461        new_path="$path"
40462      fi
40463
40464      if test "x$new_path" = x; then
40465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40466$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40467        has_space=`$ECHO "$complete" | $GREP " "`
40468        if test "x$has_space" != x; then
40469          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40470$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40471        fi
40472        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40473      fi
40474    fi
40475
40476    # Now join together the path and the arguments once again
40477    if test "x$arguments" != xEOL; then
40478      new_complete="$new_path ${arguments% *}"
40479    else
40480      new_complete="$new_path"
40481    fi
40482
40483    if test "x$complete" != "x$new_complete"; then
40484      BUILD_CXX="$new_complete"
40485      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40486$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40487    fi
40488  fi
40489
40490
40491
40492  # Publish this variable in the help.
40493
40494
40495  if test "x$BUILD_LD" = x; then
40496    # The variable is not set by user, try to locate tool using the code snippet
40497    for ac_prog in ld
40498do
40499  # Extract the first word of "$ac_prog", so it can be a program name with args.
40500set dummy $ac_prog; ac_word=$2
40501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40502$as_echo_n "checking for $ac_word... " >&6; }
40503if ${ac_cv_path_BUILD_LD+:} false; then :
40504  $as_echo_n "(cached) " >&6
40505else
40506  case $BUILD_LD in
40507  [\\/]* | ?:[\\/]*)
40508  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40509  ;;
40510  *)
40511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40512for as_dir in $PATH
40513do
40514  IFS=$as_save_IFS
40515  test -z "$as_dir" && as_dir=.
40516    for ac_exec_ext in '' $ac_executable_extensions; do
40517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40518    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40520    break 2
40521  fi
40522done
40523  done
40524IFS=$as_save_IFS
40525
40526  ;;
40527esac
40528fi
40529BUILD_LD=$ac_cv_path_BUILD_LD
40530if test -n "$BUILD_LD"; then
40531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40532$as_echo "$BUILD_LD" >&6; }
40533else
40534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40535$as_echo "no" >&6; }
40536fi
40537
40538
40539  test -n "$BUILD_LD" && break
40540done
40541
40542  else
40543    # The variable is set, but is it from the command line or the environment?
40544
40545    # Try to remove the string !BUILD_LD! from our list.
40546    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40547    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40548      # If it failed, the variable was not from the command line. Ignore it,
40549      # but warn the user (except for BASH, which is always set by the calling BASH).
40550      if test "xBUILD_LD" != xBASH; then
40551        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40552$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40553      fi
40554      # Try to locate tool using the code snippet
40555      for ac_prog in ld
40556do
40557  # Extract the first word of "$ac_prog", so it can be a program name with args.
40558set dummy $ac_prog; ac_word=$2
40559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40560$as_echo_n "checking for $ac_word... " >&6; }
40561if ${ac_cv_path_BUILD_LD+:} false; then :
40562  $as_echo_n "(cached) " >&6
40563else
40564  case $BUILD_LD in
40565  [\\/]* | ?:[\\/]*)
40566  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40567  ;;
40568  *)
40569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40570for as_dir in $PATH
40571do
40572  IFS=$as_save_IFS
40573  test -z "$as_dir" && as_dir=.
40574    for ac_exec_ext in '' $ac_executable_extensions; do
40575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40576    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40578    break 2
40579  fi
40580done
40581  done
40582IFS=$as_save_IFS
40583
40584  ;;
40585esac
40586fi
40587BUILD_LD=$ac_cv_path_BUILD_LD
40588if test -n "$BUILD_LD"; then
40589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40590$as_echo "$BUILD_LD" >&6; }
40591else
40592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40593$as_echo "no" >&6; }
40594fi
40595
40596
40597  test -n "$BUILD_LD" && break
40598done
40599
40600    else
40601      # If it succeeded, then it was overridden by the user. We will use it
40602      # for the tool.
40603
40604      # First remove it from the list of overridden variables, so we can test
40605      # for unknown variables in the end.
40606      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40607
40608      # Check if the provided tool contains a complete path.
40609      tool_specified="$BUILD_LD"
40610      tool_basename="${tool_specified##*/}"
40611      if test "x$tool_basename" = "x$tool_specified"; then
40612        # A command without a complete path is provided, search $PATH.
40613        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40614$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40615        # Extract the first word of "$tool_basename", so it can be a program name with args.
40616set dummy $tool_basename; ac_word=$2
40617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40618$as_echo_n "checking for $ac_word... " >&6; }
40619if ${ac_cv_path_BUILD_LD+:} false; then :
40620  $as_echo_n "(cached) " >&6
40621else
40622  case $BUILD_LD in
40623  [\\/]* | ?:[\\/]*)
40624  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40625  ;;
40626  *)
40627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40628for as_dir in $PATH
40629do
40630  IFS=$as_save_IFS
40631  test -z "$as_dir" && as_dir=.
40632    for ac_exec_ext in '' $ac_executable_extensions; do
40633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40634    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40636    break 2
40637  fi
40638done
40639  done
40640IFS=$as_save_IFS
40641
40642  ;;
40643esac
40644fi
40645BUILD_LD=$ac_cv_path_BUILD_LD
40646if test -n "$BUILD_LD"; then
40647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40648$as_echo "$BUILD_LD" >&6; }
40649else
40650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40651$as_echo "no" >&6; }
40652fi
40653
40654
40655        if test "x$BUILD_LD" = x; then
40656          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40657        fi
40658      else
40659        # Otherwise we believe it is a complete path. Use it as it is.
40660        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40661$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40663$as_echo_n "checking for BUILD_LD... " >&6; }
40664        if test ! -x "$tool_specified"; then
40665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40666$as_echo "not found" >&6; }
40667          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40668        fi
40669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40670$as_echo "$tool_specified" >&6; }
40671      fi
40672    fi
40673  fi
40674
40675
40676
40677  # Only process if variable expands to non-empty
40678
40679  if test "x$BUILD_LD" != x; then
40680    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40681
40682  # First separate the path from the arguments. This will split at the first
40683  # space.
40684  complete="$BUILD_LD"
40685  path="${complete%% *}"
40686  tmp="$complete EOL"
40687  arguments="${tmp#* }"
40688
40689  # Input might be given as Windows format, start by converting to
40690  # unix format.
40691  new_path=`$CYGPATH -u "$path"`
40692
40693  # Now try to locate executable using which
40694  new_path=`$WHICH "$new_path" 2> /dev/null`
40695  # bat and cmd files are not always considered executable in cygwin causing which
40696  # to not find them
40697  if test "x$new_path" = x \
40698      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40699      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40700    new_path=`$CYGPATH -u "$path"`
40701  fi
40702  if test "x$new_path" = x; then
40703    # Oops. Which didn't find the executable.
40704    # The splitting of arguments from the executable at a space might have been incorrect,
40705    # since paths with space are more likely in Windows. Give it another try with the whole
40706    # argument.
40707    path="$complete"
40708    arguments="EOL"
40709    new_path=`$CYGPATH -u "$path"`
40710    new_path=`$WHICH "$new_path" 2> /dev/null`
40711    # bat and cmd files are not always considered executable in cygwin causing which
40712    # to not find them
40713    if test "x$new_path" = x \
40714        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40715        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40716      new_path=`$CYGPATH -u "$path"`
40717    fi
40718    if test "x$new_path" = x; then
40719      # It's still not found. Now this is an unrecoverable error.
40720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40721$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40722      has_space=`$ECHO "$complete" | $GREP " "`
40723      if test "x$has_space" != x; then
40724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40726      fi
40727      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40728    fi
40729  fi
40730
40731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40734  # "foo.exe" is OK but "foo" is an error.
40735  #
40736  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40737  # It is also a way to make sure we got the proper file name for the real test later on.
40738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40739  if test "x$test_shortpath" = x; then
40740    # Short path failed, file does not exist as specified.
40741    # Try adding .exe or .cmd
40742    if test -f "${new_path}.exe"; then
40743      input_to_shortpath="${new_path}.exe"
40744    elif test -f "${new_path}.cmd"; then
40745      input_to_shortpath="${new_path}.cmd"
40746    else
40747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40748$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40751      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40752    fi
40753  else
40754    input_to_shortpath="$new_path"
40755  fi
40756
40757  # Call helper function which possibly converts this using DOS-style short mode.
40758  # If so, the updated path is stored in $new_path.
40759  new_path="$input_to_shortpath"
40760
40761  input_path="$input_to_shortpath"
40762  # Check if we need to convert this using DOS-style short mode. If the path
40763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40764  # take no chances and rewrite it.
40765  # Note: m4 eats our [], so we need to use [ and ] instead.
40766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40767  if test "x$has_forbidden_chars" != x; then
40768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40772      # Going to short mode and back again did indeed matter. Since short mode is
40773      # case insensitive, let's make it lowercase to improve readability.
40774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40775      # Now convert it back to Unix-style (cygpath)
40776      input_path=`$CYGPATH -u "$shortmode_path"`
40777      new_path="$input_path"
40778    fi
40779  fi
40780
40781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40782  if test "x$test_cygdrive_prefix" = x; then
40783    # As a simple fix, exclude /usr/bin since it's not a real path.
40784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40786      # a path prefixed by /cygdrive for fixpath to work.
40787      new_path="$CYGWIN_ROOT_PATH$input_path"
40788    fi
40789  fi
40790
40791  # remove trailing .exe if any
40792  new_path="${new_path/%.exe/}"
40793
40794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40795
40796  # First separate the path from the arguments. This will split at the first
40797  # space.
40798  complete="$BUILD_LD"
40799  path="${complete%% *}"
40800  tmp="$complete EOL"
40801  arguments="${tmp#* }"
40802
40803  # Input might be given as Windows format, start by converting to
40804  # unix format.
40805  new_path="$path"
40806
40807  windows_path="$new_path"
40808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40809    unix_path=`$CYGPATH -u "$windows_path"`
40810    new_path="$unix_path"
40811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40813    new_path="$unix_path"
40814  fi
40815
40816
40817  # Now try to locate executable using which
40818  new_path=`$WHICH "$new_path" 2> /dev/null`
40819
40820  if test "x$new_path" = x; then
40821    # Oops. Which didn't find the executable.
40822    # The splitting of arguments from the executable at a space might have been incorrect,
40823    # since paths with space are more likely in Windows. Give it another try with the whole
40824    # argument.
40825    path="$complete"
40826    arguments="EOL"
40827    new_path="$path"
40828
40829  windows_path="$new_path"
40830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40831    unix_path=`$CYGPATH -u "$windows_path"`
40832    new_path="$unix_path"
40833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40835    new_path="$unix_path"
40836  fi
40837
40838
40839    new_path=`$WHICH "$new_path" 2> /dev/null`
40840    # bat and cmd files are not always considered executable in MSYS causing which
40841    # to not find them
40842    if test "x$new_path" = x \
40843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40845      new_path="$path"
40846
40847  windows_path="$new_path"
40848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849    unix_path=`$CYGPATH -u "$windows_path"`
40850    new_path="$unix_path"
40851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40853    new_path="$unix_path"
40854  fi
40855
40856    fi
40857
40858    if test "x$new_path" = x; then
40859      # It's still not found. Now this is an unrecoverable error.
40860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40861$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40862      has_space=`$ECHO "$complete" | $GREP " "`
40863      if test "x$has_space" != x; then
40864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40866      fi
40867      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40868    fi
40869  fi
40870
40871  # Now new_path has a complete unix path to the binary
40872  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40873    # Keep paths in /bin as-is, but remove trailing .exe if any
40874    new_path="${new_path/%.exe/}"
40875    # Do not save /bin paths to all_fixpath_prefixes!
40876  else
40877    # Not in mixed or Windows style, start by that.
40878    new_path=`cmd //c echo $new_path`
40879
40880  input_path="$new_path"
40881  # Check if we need to convert this using DOS-style short mode. If the path
40882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40883  # take no chances and rewrite it.
40884  # Note: m4 eats our [], so we need to use [ and ] instead.
40885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40886  if test "x$has_forbidden_chars" != x; then
40887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40889  fi
40890
40891    # Output is in $new_path
40892
40893  windows_path="$new_path"
40894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895    unix_path=`$CYGPATH -u "$windows_path"`
40896    new_path="$unix_path"
40897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899    new_path="$unix_path"
40900  fi
40901
40902    # remove trailing .exe if any
40903    new_path="${new_path/%.exe/}"
40904
40905    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40906    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40907  fi
40908
40909    else
40910      # We're on a unix platform. Hooray! :)
40911      # First separate the path from the arguments. This will split at the first
40912      # space.
40913      complete="$BUILD_LD"
40914      path="${complete%% *}"
40915      tmp="$complete EOL"
40916      arguments="${tmp#* }"
40917
40918      # Cannot rely on the command "which" here since it doesn't always work.
40919      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40920      if test -z "$is_absolute_path"; then
40921        # Path to executable is not absolute. Find it.
40922        IFS_save="$IFS"
40923        IFS=:
40924        for p in $PATH; do
40925          if test -f "$p/$path" && test -x "$p/$path"; then
40926            new_path="$p/$path"
40927            break
40928          fi
40929        done
40930        IFS="$IFS_save"
40931      else
40932        # This is an absolute path, we can use it without further modifications.
40933        new_path="$path"
40934      fi
40935
40936      if test "x$new_path" = x; then
40937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40938$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40939        has_space=`$ECHO "$complete" | $GREP " "`
40940        if test "x$has_space" != x; then
40941          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40943        fi
40944        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40945      fi
40946    fi
40947
40948    # Now join together the path and the arguments once again
40949    if test "x$arguments" != xEOL; then
40950      new_complete="$new_path ${arguments% *}"
40951    else
40952      new_complete="$new_path"
40953    fi
40954
40955    if test "x$complete" != "x$new_complete"; then
40956      BUILD_LD="$new_complete"
40957      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40958$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40959    fi
40960  fi
40961
40962  else
40963    # If we are not cross compiling, use the normal target compilers for
40964    # building the build platform executables.
40965    BUILD_CC="$CC"
40966    BUILD_CXX="$CXX"
40967    BUILD_LD="$LD"
40968  fi
40969
40970
40971
40972
40973
40974
40975  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40976    # For hotspot, we need these in Windows mixed path,
40977    # so rewrite them all. Need added .exe suffix.
40978    HOTSPOT_CXX="$CXX.exe"
40979    HOTSPOT_LD="$LD.exe"
40980    HOTSPOT_MT="$MT.exe"
40981    HOTSPOT_RC="$RC.exe"
40982
40983  unix_path="$HOTSPOT_CXX"
40984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40985    windows_path=`$CYGPATH -m "$unix_path"`
40986    HOTSPOT_CXX="$windows_path"
40987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40988    windows_path=`cmd //c echo $unix_path`
40989    HOTSPOT_CXX="$windows_path"
40990  fi
40991
40992
40993  unix_path="$HOTSPOT_LD"
40994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40995    windows_path=`$CYGPATH -m "$unix_path"`
40996    HOTSPOT_LD="$windows_path"
40997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40998    windows_path=`cmd //c echo $unix_path`
40999    HOTSPOT_LD="$windows_path"
41000  fi
41001
41002
41003  unix_path="$HOTSPOT_MT"
41004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41005    windows_path=`$CYGPATH -m "$unix_path"`
41006    HOTSPOT_MT="$windows_path"
41007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41008    windows_path=`cmd //c echo $unix_path`
41009    HOTSPOT_MT="$windows_path"
41010  fi
41011
41012
41013  unix_path="$HOTSPOT_RC"
41014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41015    windows_path=`$CYGPATH -m "$unix_path"`
41016    HOTSPOT_RC="$windows_path"
41017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41018    windows_path=`cmd //c echo $unix_path`
41019    HOTSPOT_RC="$windows_path"
41020  fi
41021
41022
41023
41024  else
41025    HOTSPOT_CXX="$CXX"
41026    HOTSPOT_LD="$LD"
41027  fi
41028
41029
41030
41031  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41032    USE_CLANG=true
41033  fi
41034
41035
41036
41037
41038
41039  # The package path is used only on macosx?
41040  # FIXME: clean this up, and/or move it elsewhere.
41041  PACKAGE_PATH=/opt/local
41042
41043
41044  # Check for extra potential brokenness.
41045  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41046    # On Windows, double-check that we got the right compiler.
41047    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41048    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41049    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41050      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41051        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
41052      fi
41053    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41054      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41055        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41056      fi
41057    fi
41058  fi
41059
41060  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41061    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41062    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41063    # This is later checked when setting flags.
41064
41065    # "-Og" suppported for GCC 4.8 and later
41066    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41067
41068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41069$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41070  supports=yes
41071
41072  saved_cflags="$CFLAGS"
41073  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41074  ac_ext=c
41075ac_cpp='$CPP $CPPFLAGS'
41076ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41077ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41078ac_compiler_gnu=$ac_cv_c_compiler_gnu
41079
41080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41081/* end confdefs.h.  */
41082int i;
41083_ACEOF
41084if ac_fn_c_try_compile "$LINENO"; then :
41085
41086else
41087  supports=no
41088fi
41089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41090  ac_ext=cpp
41091ac_cpp='$CXXCPP $CPPFLAGS'
41092ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41093ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41094ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41095
41096  CFLAGS="$saved_cflags"
41097
41098  saved_cxxflags="$CXXFLAGS"
41099  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41100  ac_ext=cpp
41101ac_cpp='$CXXCPP $CPPFLAGS'
41102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41105
41106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41107/* end confdefs.h.  */
41108int i;
41109_ACEOF
41110if ac_fn_cxx_try_compile "$LINENO"; then :
41111
41112else
41113  supports=no
41114fi
41115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41116  ac_ext=cpp
41117ac_cpp='$CXXCPP $CPPFLAGS'
41118ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41119ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41120ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41121
41122  CXXFLAGS="$saved_cxxflags"
41123
41124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41125$as_echo "$supports" >&6; }
41126  if test "x$supports" = "xyes" ; then
41127    HAS_CFLAG_OPTIMIZE_DEBUG=true
41128  else
41129    HAS_CFLAG_OPTIMIZE_DEBUG=false
41130  fi
41131
41132
41133    # "-z relro" supported in GNU binutils 2.17 and later
41134    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41135
41136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41137$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41138  supports=yes
41139
41140  saved_ldflags="$LDFLAGS"
41141  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41142  ac_ext=c
41143ac_cpp='$CPP $CPPFLAGS'
41144ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41145ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41146ac_compiler_gnu=$ac_cv_c_compiler_gnu
41147
41148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41149/* end confdefs.h.  */
41150
41151int
41152main ()
41153{
41154
41155  ;
41156  return 0;
41157}
41158_ACEOF
41159if ac_fn_c_try_link "$LINENO"; then :
41160
41161else
41162  supports=no
41163fi
41164rm -f core conftest.err conftest.$ac_objext \
41165    conftest$ac_exeext conftest.$ac_ext
41166  ac_ext=cpp
41167ac_cpp='$CXXCPP $CPPFLAGS'
41168ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41169ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41170ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41171
41172  LDFLAGS="$saved_ldflags"
41173
41174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41175$as_echo "$supports" >&6; }
41176  if test "x$supports" = "xyes" ; then
41177    HAS_LINKER_RELRO=true
41178  else
41179    HAS_LINKER_RELRO=false
41180  fi
41181
41182
41183    # "-z now" supported in GNU binutils 2.11 and later
41184    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41185
41186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41187$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41188  supports=yes
41189
41190  saved_ldflags="$LDFLAGS"
41191  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41192  ac_ext=c
41193ac_cpp='$CPP $CPPFLAGS'
41194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41196ac_compiler_gnu=$ac_cv_c_compiler_gnu
41197
41198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41199/* end confdefs.h.  */
41200
41201int
41202main ()
41203{
41204
41205  ;
41206  return 0;
41207}
41208_ACEOF
41209if ac_fn_c_try_link "$LINENO"; then :
41210
41211else
41212  supports=no
41213fi
41214rm -f core conftest.err conftest.$ac_objext \
41215    conftest$ac_exeext conftest.$ac_ext
41216  ac_ext=cpp
41217ac_cpp='$CXXCPP $CPPFLAGS'
41218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41221
41222  LDFLAGS="$saved_ldflags"
41223
41224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41225$as_echo "$supports" >&6; }
41226  if test "x$supports" = "xyes" ; then
41227    HAS_LINKER_NOW=true
41228  else
41229    HAS_LINKER_NOW=false
41230  fi
41231
41232  fi
41233
41234  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41235  # in executable.'
41236  USING_BROKEN_SUSE_LD=no
41237  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41239$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41240    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41241    $ECHO "int main() { }" > main.c
41242    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41244$as_echo "no" >&6; }
41245      USING_BROKEN_SUSE_LD=no
41246    else
41247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41248$as_echo "yes" >&6; }
41249      USING_BROKEN_SUSE_LD=yes
41250    fi
41251    rm -rf version-script.map main.c a.out
41252  fi
41253
41254
41255
41256# Setup the JTReg Regression Test Harness.
41257
41258
41259# Check whether --with-jtreg was given.
41260if test "${with_jtreg+set}" = set; then :
41261  withval=$with_jtreg;
41262else
41263  with_jtreg=no
41264fi
41265
41266
41267  if test "x$with_jtreg" = xno; then
41268    # jtreg disabled
41269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41270$as_echo_n "checking for jtreg... " >&6; }
41271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41272$as_echo "no" >&6; }
41273  else
41274    if test "x$with_jtreg" != xyes; then
41275      # with path specified.
41276      JT_HOME="$with_jtreg"
41277    fi
41278
41279    if test "x$JT_HOME" != x; then
41280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41281$as_echo_n "checking for jtreg... " >&6; }
41282
41283      # use JT_HOME enviroment var.
41284
41285  # Only process if variable expands to non-empty
41286
41287  if test "x$JT_HOME" != x; then
41288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41289
41290  # Input might be given as Windows format, start by converting to
41291  # unix format.
41292  path="$JT_HOME"
41293  new_path=`$CYGPATH -u "$path"`
41294
41295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41298  # "foo.exe" is OK but "foo" is an error.
41299  #
41300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41301  # It is also a way to make sure we got the proper file name for the real test later on.
41302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41303  if test "x$test_shortpath" = x; then
41304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41305$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41306    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41307  fi
41308
41309  # Call helper function which possibly converts this using DOS-style short mode.
41310  # If so, the updated path is stored in $new_path.
41311
41312  input_path="$new_path"
41313  # Check if we need to convert this using DOS-style short mode. If the path
41314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41315  # take no chances and rewrite it.
41316  # Note: m4 eats our [], so we need to use [ and ] instead.
41317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41318  if test "x$has_forbidden_chars" != x; then
41319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41323      # Going to short mode and back again did indeed matter. Since short mode is
41324      # case insensitive, let's make it lowercase to improve readability.
41325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41326      # Now convert it back to Unix-style (cygpath)
41327      input_path=`$CYGPATH -u "$shortmode_path"`
41328      new_path="$input_path"
41329    fi
41330  fi
41331
41332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41333  if test "x$test_cygdrive_prefix" = x; then
41334    # As a simple fix, exclude /usr/bin since it's not a real path.
41335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41337      # a path prefixed by /cygdrive for fixpath to work.
41338      new_path="$CYGWIN_ROOT_PATH$input_path"
41339    fi
41340  fi
41341
41342
41343  if test "x$path" != "x$new_path"; then
41344    JT_HOME="$new_path"
41345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41346$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41347  fi
41348
41349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41350
41351  path="$JT_HOME"
41352  has_colon=`$ECHO $path | $GREP ^.:`
41353  new_path="$path"
41354  if test "x$has_colon" = x; then
41355    # Not in mixed or Windows style, start by that.
41356    new_path=`cmd //c echo $path`
41357  fi
41358
41359
41360  input_path="$new_path"
41361  # Check if we need to convert this using DOS-style short mode. If the path
41362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41363  # take no chances and rewrite it.
41364  # Note: m4 eats our [], so we need to use [ and ] instead.
41365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41366  if test "x$has_forbidden_chars" != x; then
41367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41369  fi
41370
41371
41372  windows_path="$new_path"
41373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41374    unix_path=`$CYGPATH -u "$windows_path"`
41375    new_path="$unix_path"
41376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41378    new_path="$unix_path"
41379  fi
41380
41381  if test "x$path" != "x$new_path"; then
41382    JT_HOME="$new_path"
41383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41384$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41385  fi
41386
41387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41389
41390    else
41391      # We're on a unix platform. Hooray! :)
41392      path="$JT_HOME"
41393      has_space=`$ECHO "$path" | $GREP " "`
41394      if test "x$has_space" != x; then
41395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41396$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41398      fi
41399
41400      # Use eval to expand a potential ~
41401      eval path="$path"
41402      if test ! -f "$path" && test ! -d "$path"; then
41403        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41404      fi
41405
41406      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41407    fi
41408  fi
41409
41410
41411      # jtreg win32 script works for everybody
41412      JTREGEXE="$JT_HOME/bin/jtreg"
41413
41414      if test ! -f "$JTREGEXE"; then
41415        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41416      fi
41417
41418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41419$as_echo "$JTREGEXE" >&6; }
41420    else
41421      # try to find jtreg on path
41422
41423
41424
41425  # Publish this variable in the help.
41426
41427
41428  if test "x$JTREGEXE" = x; then
41429    # The variable is not set by user, try to locate tool using the code snippet
41430    for ac_prog in jtreg
41431do
41432  # Extract the first word of "$ac_prog", so it can be a program name with args.
41433set dummy $ac_prog; ac_word=$2
41434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41435$as_echo_n "checking for $ac_word... " >&6; }
41436if ${ac_cv_path_JTREGEXE+:} false; then :
41437  $as_echo_n "(cached) " >&6
41438else
41439  case $JTREGEXE in
41440  [\\/]* | ?:[\\/]*)
41441  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41442  ;;
41443  *)
41444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41445for as_dir in $PATH
41446do
41447  IFS=$as_save_IFS
41448  test -z "$as_dir" && as_dir=.
41449    for ac_exec_ext in '' $ac_executable_extensions; do
41450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41451    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41453    break 2
41454  fi
41455done
41456  done
41457IFS=$as_save_IFS
41458
41459  ;;
41460esac
41461fi
41462JTREGEXE=$ac_cv_path_JTREGEXE
41463if test -n "$JTREGEXE"; then
41464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41465$as_echo "$JTREGEXE" >&6; }
41466else
41467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41468$as_echo "no" >&6; }
41469fi
41470
41471
41472  test -n "$JTREGEXE" && break
41473done
41474
41475  else
41476    # The variable is set, but is it from the command line or the environment?
41477
41478    # Try to remove the string !JTREGEXE! from our list.
41479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41481      # If it failed, the variable was not from the command line. Ignore it,
41482      # but warn the user (except for BASH, which is always set by the calling BASH).
41483      if test "xJTREGEXE" != xBASH; then
41484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41485$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41486      fi
41487      # Try to locate tool using the code snippet
41488      for ac_prog in jtreg
41489do
41490  # Extract the first word of "$ac_prog", so it can be a program name with args.
41491set dummy $ac_prog; ac_word=$2
41492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41493$as_echo_n "checking for $ac_word... " >&6; }
41494if ${ac_cv_path_JTREGEXE+:} false; then :
41495  $as_echo_n "(cached) " >&6
41496else
41497  case $JTREGEXE in
41498  [\\/]* | ?:[\\/]*)
41499  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41500  ;;
41501  *)
41502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41503for as_dir in $PATH
41504do
41505  IFS=$as_save_IFS
41506  test -z "$as_dir" && as_dir=.
41507    for ac_exec_ext in '' $ac_executable_extensions; do
41508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41509    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41511    break 2
41512  fi
41513done
41514  done
41515IFS=$as_save_IFS
41516
41517  ;;
41518esac
41519fi
41520JTREGEXE=$ac_cv_path_JTREGEXE
41521if test -n "$JTREGEXE"; then
41522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41523$as_echo "$JTREGEXE" >&6; }
41524else
41525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41526$as_echo "no" >&6; }
41527fi
41528
41529
41530  test -n "$JTREGEXE" && break
41531done
41532
41533    else
41534      # If it succeeded, then it was overridden by the user. We will use it
41535      # for the tool.
41536
41537      # First remove it from the list of overridden variables, so we can test
41538      # for unknown variables in the end.
41539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41540
41541      # Check if the provided tool contains a complete path.
41542      tool_specified="$JTREGEXE"
41543      tool_basename="${tool_specified##*/}"
41544      if test "x$tool_basename" = "x$tool_specified"; then
41545        # A command without a complete path is provided, search $PATH.
41546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41547$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41548        # Extract the first word of "$tool_basename", so it can be a program name with args.
41549set dummy $tool_basename; ac_word=$2
41550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41551$as_echo_n "checking for $ac_word... " >&6; }
41552if ${ac_cv_path_JTREGEXE+:} false; then :
41553  $as_echo_n "(cached) " >&6
41554else
41555  case $JTREGEXE in
41556  [\\/]* | ?:[\\/]*)
41557  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41558  ;;
41559  *)
41560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41561for as_dir in $PATH
41562do
41563  IFS=$as_save_IFS
41564  test -z "$as_dir" && as_dir=.
41565    for ac_exec_ext in '' $ac_executable_extensions; do
41566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41567    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41569    break 2
41570  fi
41571done
41572  done
41573IFS=$as_save_IFS
41574
41575  ;;
41576esac
41577fi
41578JTREGEXE=$ac_cv_path_JTREGEXE
41579if test -n "$JTREGEXE"; then
41580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41581$as_echo "$JTREGEXE" >&6; }
41582else
41583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41584$as_echo "no" >&6; }
41585fi
41586
41587
41588        if test "x$JTREGEXE" = x; then
41589          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41590        fi
41591      else
41592        # Otherwise we believe it is a complete path. Use it as it is.
41593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41594$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41596$as_echo_n "checking for JTREGEXE... " >&6; }
41597        if test ! -x "$tool_specified"; then
41598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41599$as_echo "not found" >&6; }
41600          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41601        fi
41602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41603$as_echo "$tool_specified" >&6; }
41604      fi
41605    fi
41606  fi
41607
41608
41609
41610  if test "x$JTREGEXE" = x; then
41611    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41612  fi
41613
41614
41615      JT_HOME="`$DIRNAME $JTREGEXE`"
41616    fi
41617  fi
41618
41619
41620
41621
41622
41623
41624  # Option used to tell the compiler whether to create 32- or 64-bit executables
41625  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41626    COMPILER_TARGET_BITS_FLAG="-q"
41627  else
41628    COMPILER_TARGET_BITS_FLAG="-m"
41629  fi
41630
41631
41632  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41633  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41634    ARFLAGS="-r"
41635  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41636    ARFLAGS="-X64"
41637  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41638    # lib.exe is used as AR to create static libraries.
41639    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41640  else
41641    ARFLAGS=""
41642  fi
41643
41644
41645  ## Setup strip.
41646  # FIXME: should this really be per platform, or should it be per toolchain type?
41647  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41648  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41649  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41650    STRIPFLAGS="-g"
41651  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41652    STRIPFLAGS="-x"
41653  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41654    STRIPFLAGS="-S"
41655  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41656    STRIPFLAGS="-X32_64"
41657  fi
41658
41659  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41660    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41661  fi
41662
41663
41664  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41665    CC_OUT_OPTION=-Fo
41666    EXE_OUT_OPTION=-out:
41667    LD_OUT_OPTION=-out:
41668    AR_OUT_OPTION=-out:
41669  else
41670    # The option used to specify the target .o,.a or .so file.
41671    # When compiling, how to specify the to be created object file.
41672    CC_OUT_OPTION='-o$(SPACE)'
41673    # When linking, how to specify the to be created executable.
41674    EXE_OUT_OPTION='-o$(SPACE)'
41675    # When linking, how to specify the to be created dynamically linkable library.
41676    LD_OUT_OPTION='-o$(SPACE)'
41677    # When archiving, how to specify the to be create static archive for object files.
41678    AR_OUT_OPTION='rcs$(SPACE)'
41679  fi
41680
41681
41682
41683
41684
41685  # On Windows, we need to set RC flags.
41686  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41687    RC_FLAGS="-nologo -l0x409"
41688    if test "x$VARIANT" = xOPT; then
41689      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41690    fi
41691
41692    # The version variables used to create RC_FLAGS may be overridden
41693    # in a custom configure script, or possibly the command line.
41694    # Let those variables be expanded at make time in spec.gmk.
41695    # The \$ are escaped to the shell, and the $(...) variables
41696    # are evaluated by make.
41697    RC_FLAGS="$RC_FLAGS \
41698        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41699        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41700        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41701        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
41702        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41703        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41704        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41705  fi
41706
41707
41708  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41709    # silence copyright notice and other headers.
41710    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41711  fi
41712
41713  if test "x$SYSROOT" != "x"; then
41714    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41715      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41716        # Solaris Studio does not have a concept of sysroot. Instead we must
41717        # make sure the default include and lib dirs are appended to each
41718        # compile and link command line.
41719        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41720        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41721            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41722            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41723      fi
41724    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41725      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41726      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41727      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41728    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41729      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41730      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41731    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41732      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41733      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41734    fi
41735    # Propagate the sysroot args to hotspot
41736    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41737    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41738    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41739  fi
41740
41741  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41742  # set this here so it doesn't have to be peppered throughout the forest
41743  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41744    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41745    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41746  fi
41747
41748
41749
41750
41751
41752# FIXME: Currently we must test this after toolchain but before flags. Fix!
41753
41754# Now we can test some aspects on the target using configure macros.
41755
41756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41757$as_echo_n "checking for ANSI C header files... " >&6; }
41758if ${ac_cv_header_stdc+:} false; then :
41759  $as_echo_n "(cached) " >&6
41760else
41761  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41762/* end confdefs.h.  */
41763#include <stdlib.h>
41764#include <stdarg.h>
41765#include <string.h>
41766#include <float.h>
41767
41768int
41769main ()
41770{
41771
41772  ;
41773  return 0;
41774}
41775_ACEOF
41776if ac_fn_cxx_try_compile "$LINENO"; then :
41777  ac_cv_header_stdc=yes
41778else
41779  ac_cv_header_stdc=no
41780fi
41781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41782
41783if test $ac_cv_header_stdc = yes; then
41784  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41786/* end confdefs.h.  */
41787#include <string.h>
41788
41789_ACEOF
41790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41791  $EGREP "memchr" >/dev/null 2>&1; then :
41792
41793else
41794  ac_cv_header_stdc=no
41795fi
41796rm -f conftest*
41797
41798fi
41799
41800if test $ac_cv_header_stdc = yes; then
41801  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41803/* end confdefs.h.  */
41804#include <stdlib.h>
41805
41806_ACEOF
41807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41808  $EGREP "free" >/dev/null 2>&1; then :
41809
41810else
41811  ac_cv_header_stdc=no
41812fi
41813rm -f conftest*
41814
41815fi
41816
41817if test $ac_cv_header_stdc = yes; then
41818  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41819  if test "$cross_compiling" = yes; then :
41820  :
41821else
41822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41823/* end confdefs.h.  */
41824#include <ctype.h>
41825#include <stdlib.h>
41826#if ((' ' & 0x0FF) == 0x020)
41827# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41828# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41829#else
41830# define ISLOWER(c) \
41831		   (('a' <= (c) && (c) <= 'i') \
41832		     || ('j' <= (c) && (c) <= 'r') \
41833		     || ('s' <= (c) && (c) <= 'z'))
41834# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41835#endif
41836
41837#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41838int
41839main ()
41840{
41841  int i;
41842  for (i = 0; i < 256; i++)
41843    if (XOR (islower (i), ISLOWER (i))
41844	|| toupper (i) != TOUPPER (i))
41845      return 2;
41846  return 0;
41847}
41848_ACEOF
41849if ac_fn_cxx_try_run "$LINENO"; then :
41850
41851else
41852  ac_cv_header_stdc=no
41853fi
41854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41855  conftest.$ac_objext conftest.beam conftest.$ac_ext
41856fi
41857
41858fi
41859fi
41860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41861$as_echo "$ac_cv_header_stdc" >&6; }
41862if test $ac_cv_header_stdc = yes; then
41863
41864$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41865
41866fi
41867
41868# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41869for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41870		  inttypes.h stdint.h unistd.h
41871do :
41872  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41873ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41874"
41875if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41876  cat >>confdefs.h <<_ACEOF
41877#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41878_ACEOF
41879
41880fi
41881
41882done
41883
41884
41885
41886  ###############################################################################
41887  #
41888  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41889  # (The JVM can use 32 or 64 bit Java pointers but that decision
41890  # is made at runtime.)
41891  #
41892
41893  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41894    # Always specify -m flag on Solaris
41895    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41896
41897  # When we add flags to the "official" CFLAGS etc, we need to
41898  # keep track of these additions in ADDED_CFLAGS etc. These
41899  # will later be checked to make sure only controlled additions
41900  # have been made to CFLAGS etc.
41901  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41902  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41903  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41904
41905  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41906  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41907  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41908
41909  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41910  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41911  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41912
41913  elif test "x$COMPILE_TYPE" = xreduced; then
41914    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41915      # Specify -m if running reduced on unix platforms
41916
41917  # When we add flags to the "official" CFLAGS etc, we need to
41918  # keep track of these additions in ADDED_CFLAGS etc. These
41919  # will later be checked to make sure only controlled additions
41920  # have been made to CFLAGS etc.
41921  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41922  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41923  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41924
41925  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41926  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41927  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41928
41929  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41930  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41931  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41932
41933    fi
41934  fi
41935
41936  # Make compilation sanity check
41937  for ac_header in stdio.h
41938do :
41939  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41940if test "x$ac_cv_header_stdio_h" = xyes; then :
41941  cat >>confdefs.h <<_ACEOF
41942#define HAVE_STDIO_H 1
41943_ACEOF
41944
41945else
41946
41947    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41948$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41949    if test "x$COMPILE_TYPE" = xreduced; then
41950      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41951$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41952    elif test "x$COMPILE_TYPE" = xcross; then
41953      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41954$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41955    fi
41956    as_fn_error $? "Cannot continue." "$LINENO" 5
41957
41958fi
41959
41960done
41961
41962
41963  # The cast to long int works around a bug in the HP C Compiler
41964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41966# This bug is HP SR number 8606223364.
41967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41968$as_echo_n "checking size of int *... " >&6; }
41969if ${ac_cv_sizeof_int_p+:} false; then :
41970  $as_echo_n "(cached) " >&6
41971else
41972  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41973
41974else
41975  if test "$ac_cv_type_int_p" = yes; then
41976     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41978as_fn_error 77 "cannot compute sizeof (int *)
41979See \`config.log' for more details" "$LINENO" 5; }
41980   else
41981     ac_cv_sizeof_int_p=0
41982   fi
41983fi
41984
41985fi
41986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41987$as_echo "$ac_cv_sizeof_int_p" >&6; }
41988
41989
41990
41991cat >>confdefs.h <<_ACEOF
41992#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41993_ACEOF
41994
41995
41996
41997  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41998  if test "x$ac_cv_sizeof_int_p" = x; then
41999    # The test failed, lets stick to the assumed value.
42000    { $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
42001$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42002  else
42003    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42004
42005    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42006      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42007      # Let's try to implicitely set the compilers target architecture and retry the test
42008      { $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
42009$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;}
42010      { $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
42011$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;}
42012
42013  # When we add flags to the "official" CFLAGS etc, we need to
42014  # keep track of these additions in ADDED_CFLAGS etc. These
42015  # will later be checked to make sure only controlled additions
42016  # have been made to CFLAGS etc.
42017  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42018  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42019  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42020
42021  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42022  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42023  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42024
42025  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42026  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42027  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42028
42029
42030      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42031      unset ac_cv_sizeof_int_p
42032      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42033      cat >>confdefs.h <<_ACEOF
42034#undef SIZEOF_INT_P
42035_ACEOF
42036
42037      # The cast to long int works around a bug in the HP C Compiler
42038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42040# This bug is HP SR number 8606223364.
42041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42042$as_echo_n "checking size of int *... " >&6; }
42043if ${ac_cv_sizeof_int_p+:} false; then :
42044  $as_echo_n "(cached) " >&6
42045else
42046  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42047
42048else
42049  if test "$ac_cv_type_int_p" = yes; then
42050     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42052as_fn_error 77 "cannot compute sizeof (int *)
42053See \`config.log' for more details" "$LINENO" 5; }
42054   else
42055     ac_cv_sizeof_int_p=0
42056   fi
42057fi
42058
42059fi
42060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42061$as_echo "$ac_cv_sizeof_int_p" >&6; }
42062
42063
42064
42065cat >>confdefs.h <<_ACEOF
42066#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42067_ACEOF
42068
42069
42070
42071      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42072
42073      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42074        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
42075      fi
42076    fi
42077  fi
42078
42079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42080$as_echo_n "checking for target address size... " >&6; }
42081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42082$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42083
42084
42085  ###############################################################################
42086  #
42087  # Is the target little of big endian?
42088  #
42089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42090$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42091if ${ac_cv_c_bigendian+:} false; then :
42092  $as_echo_n "(cached) " >&6
42093else
42094  ac_cv_c_bigendian=unknown
42095    # See if we're dealing with a universal compiler.
42096    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42097/* end confdefs.h.  */
42098#ifndef __APPLE_CC__
42099	       not a universal capable compiler
42100	     #endif
42101	     typedef int dummy;
42102
42103_ACEOF
42104if ac_fn_cxx_try_compile "$LINENO"; then :
42105
42106	# Check for potential -arch flags.  It is not universal unless
42107	# there are at least two -arch flags with different values.
42108	ac_arch=
42109	ac_prev=
42110	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42111	 if test -n "$ac_prev"; then
42112	   case $ac_word in
42113	     i?86 | x86_64 | ppc | ppc64)
42114	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42115		 ac_arch=$ac_word
42116	       else
42117		 ac_cv_c_bigendian=universal
42118		 break
42119	       fi
42120	       ;;
42121	   esac
42122	   ac_prev=
42123	 elif test "x$ac_word" = "x-arch"; then
42124	   ac_prev=arch
42125	 fi
42126       done
42127fi
42128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42129    if test $ac_cv_c_bigendian = unknown; then
42130      # See if sys/param.h defines the BYTE_ORDER macro.
42131      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42132/* end confdefs.h.  */
42133#include <sys/types.h>
42134	     #include <sys/param.h>
42135
42136int
42137main ()
42138{
42139#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42140		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42141		     && LITTLE_ENDIAN)
42142	      bogus endian macros
42143	     #endif
42144
42145  ;
42146  return 0;
42147}
42148_ACEOF
42149if ac_fn_cxx_try_compile "$LINENO"; then :
42150  # It does; now see whether it defined to BIG_ENDIAN or not.
42151	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42152/* end confdefs.h.  */
42153#include <sys/types.h>
42154		#include <sys/param.h>
42155
42156int
42157main ()
42158{
42159#if BYTE_ORDER != BIG_ENDIAN
42160		 not big endian
42161		#endif
42162
42163  ;
42164  return 0;
42165}
42166_ACEOF
42167if ac_fn_cxx_try_compile "$LINENO"; then :
42168  ac_cv_c_bigendian=yes
42169else
42170  ac_cv_c_bigendian=no
42171fi
42172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42173fi
42174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42175    fi
42176    if test $ac_cv_c_bigendian = unknown; then
42177      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42178      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42179/* end confdefs.h.  */
42180#include <limits.h>
42181
42182int
42183main ()
42184{
42185#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42186	      bogus endian macros
42187	     #endif
42188
42189  ;
42190  return 0;
42191}
42192_ACEOF
42193if ac_fn_cxx_try_compile "$LINENO"; then :
42194  # It does; now see whether it defined to _BIG_ENDIAN or not.
42195	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42196/* end confdefs.h.  */
42197#include <limits.h>
42198
42199int
42200main ()
42201{
42202#ifndef _BIG_ENDIAN
42203		 not big endian
42204		#endif
42205
42206  ;
42207  return 0;
42208}
42209_ACEOF
42210if ac_fn_cxx_try_compile "$LINENO"; then :
42211  ac_cv_c_bigendian=yes
42212else
42213  ac_cv_c_bigendian=no
42214fi
42215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42216fi
42217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42218    fi
42219    if test $ac_cv_c_bigendian = unknown; then
42220      # Compile a test program.
42221      if test "$cross_compiling" = yes; then :
42222  # Try to guess by grepping values from an object file.
42223	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42224/* end confdefs.h.  */
42225short int ascii_mm[] =
42226		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42227		short int ascii_ii[] =
42228		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42229		int use_ascii (int i) {
42230		  return ascii_mm[i] + ascii_ii[i];
42231		}
42232		short int ebcdic_ii[] =
42233		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42234		short int ebcdic_mm[] =
42235		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42236		int use_ebcdic (int i) {
42237		  return ebcdic_mm[i] + ebcdic_ii[i];
42238		}
42239		extern int foo;
42240
42241int
42242main ()
42243{
42244return use_ascii (foo) == use_ebcdic (foo);
42245  ;
42246  return 0;
42247}
42248_ACEOF
42249if ac_fn_cxx_try_compile "$LINENO"; then :
42250  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42251	      ac_cv_c_bigendian=yes
42252	    fi
42253	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42254	      if test "$ac_cv_c_bigendian" = unknown; then
42255		ac_cv_c_bigendian=no
42256	      else
42257		# finding both strings is unlikely to happen, but who knows?
42258		ac_cv_c_bigendian=unknown
42259	      fi
42260	    fi
42261fi
42262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42263else
42264  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42265/* end confdefs.h.  */
42266$ac_includes_default
42267int
42268main ()
42269{
42270
42271	     /* Are we little or big endian?  From Harbison&Steele.  */
42272	     union
42273	     {
42274	       long int l;
42275	       char c[sizeof (long int)];
42276	     } u;
42277	     u.l = 1;
42278	     return u.c[sizeof (long int) - 1] == 1;
42279
42280  ;
42281  return 0;
42282}
42283_ACEOF
42284if ac_fn_cxx_try_run "$LINENO"; then :
42285  ac_cv_c_bigendian=no
42286else
42287  ac_cv_c_bigendian=yes
42288fi
42289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42290  conftest.$ac_objext conftest.beam conftest.$ac_ext
42291fi
42292
42293    fi
42294fi
42295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42296$as_echo "$ac_cv_c_bigendian" >&6; }
42297 case $ac_cv_c_bigendian in #(
42298   yes)
42299     ENDIAN="big";; #(
42300   no)
42301     ENDIAN="little" ;; #(
42302   universal)
42303     ENDIAN="universal_endianness"
42304     ;; #(
42305   *)
42306     ENDIAN="unknown" ;;
42307 esac
42308
42309
42310  if test "x$ENDIAN" = xuniversal_endianness; then
42311    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42312  fi
42313  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42314    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
42315  fi
42316
42317
42318# Configure flags for the tools
42319
42320  ###############################################################################
42321  #
42322  # How to compile shared libraries.
42323  #
42324
42325  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42326    PICFLAG="-fPIC"
42327    C_FLAG_REORDER=''
42328    CXX_FLAG_REORDER=''
42329
42330    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42331      # Linking is different on MacOSX
42332      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42333      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42334      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42335      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42336      SET_SHARED_LIBRARY_MAPFILE=''
42337    else
42338      # Default works for linux, might work on other platforms as well.
42339      SHARED_LIBRARY_FLAGS='-shared'
42340      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42341      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42342      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42343      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42344    fi
42345  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42346    PICFLAG=''
42347    C_FLAG_REORDER=''
42348    CXX_FLAG_REORDER=''
42349
42350    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42351      # Linking is different on MacOSX
42352      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42353      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42354      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42355      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42356      SET_SHARED_LIBRARY_MAPFILE=''
42357    else
42358      # Default works for linux, might work on other platforms as well.
42359      SHARED_LIBRARY_FLAGS='-shared'
42360      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42361      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42362      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42363      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42364    fi
42365  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42366    PICFLAG="-KPIC"
42367    C_FLAG_REORDER='-xF'
42368    CXX_FLAG_REORDER='-xF'
42369    SHARED_LIBRARY_FLAGS="-G"
42370    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42371    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42372    SET_SHARED_LIBRARY_NAME=''
42373    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42374  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42375    PICFLAG="-qpic=large"
42376    C_FLAG_REORDER=''
42377    CXX_FLAG_REORDER=''
42378    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42379    SET_EXECUTABLE_ORIGIN=""
42380    SET_SHARED_LIBRARY_ORIGIN=''
42381    SET_SHARED_LIBRARY_NAME=''
42382    SET_SHARED_LIBRARY_MAPFILE=''
42383  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42384    PICFLAG=""
42385    C_FLAG_REORDER=''
42386    CXX_FLAG_REORDER=''
42387    SHARED_LIBRARY_FLAGS="-LD"
42388    SET_EXECUTABLE_ORIGIN=''
42389    SET_SHARED_LIBRARY_ORIGIN=''
42390    SET_SHARED_LIBRARY_NAME=''
42391    SET_SHARED_LIBRARY_MAPFILE=''
42392  fi
42393
42394
42395
42396
42397
42398
42399
42400
42401  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42402    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42403    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42404    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42405  fi
42406  # The (cross) compiler is now configured, we can now test capabilities
42407  # of the target platform.
42408
42409
42410
42411  ###############################################################################
42412  #
42413  # Setup the opt flags for different compilers
42414  # and different operating systems.
42415  #
42416
42417  # FIXME: this was indirectly the old default, but just inherited.
42418  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42419  #   C_FLAG_DEPS="-MMD -MF"
42420  # fi
42421
42422  # Generate make dependency files
42423  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42424    C_FLAG_DEPS="-MMD -MF"
42425  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42426    C_FLAG_DEPS="-MMD -MF"
42427  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42428    C_FLAG_DEPS="-xMMD -xMF"
42429  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42430    C_FLAG_DEPS="-qmakedep=gcc -MF"
42431  fi
42432  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42433
42434
42435
42436  # Debug symbols
42437  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42438    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42439      # reduce from default "-g2" option to save space
42440      CFLAGS_DEBUG_SYMBOLS="-g1"
42441      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42442    else
42443      CFLAGS_DEBUG_SYMBOLS="-g"
42444      CXXFLAGS_DEBUG_SYMBOLS="-g"
42445    fi
42446  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42447    CFLAGS_DEBUG_SYMBOLS="-g"
42448    CXXFLAGS_DEBUG_SYMBOLS="-g"
42449  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42450    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42451    # FIXME: likely a bug, this disables debug symbols rather than enables them
42452    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42453  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42454    CFLAGS_DEBUG_SYMBOLS="-g"
42455    CXXFLAGS_DEBUG_SYMBOLS="-g"
42456  fi
42457
42458
42459
42460  # bounds, memory and behavior checking options
42461  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42462    case $DEBUG_LEVEL in
42463    release )
42464      # no adjustment
42465      ;;
42466    fastdebug )
42467      # no adjustment
42468      ;;
42469    slowdebug )
42470      # Add runtime stack smashing and undefined behavior checks.
42471      # Not all versions of gcc support -fstack-protector
42472      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42473
42474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42475$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42476  supports=yes
42477
42478  saved_cflags="$CFLAGS"
42479  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42480  ac_ext=c
42481ac_cpp='$CPP $CPPFLAGS'
42482ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42483ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42484ac_compiler_gnu=$ac_cv_c_compiler_gnu
42485
42486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42487/* end confdefs.h.  */
42488int i;
42489_ACEOF
42490if ac_fn_c_try_compile "$LINENO"; then :
42491
42492else
42493  supports=no
42494fi
42495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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  CFLAGS="$saved_cflags"
42503
42504  saved_cxxflags="$CXXFLAGS"
42505  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42506  ac_ext=cpp
42507ac_cpp='$CXXCPP $CPPFLAGS'
42508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42511
42512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42513/* end confdefs.h.  */
42514int i;
42515_ACEOF
42516if ac_fn_cxx_try_compile "$LINENO"; then :
42517
42518else
42519  supports=no
42520fi
42521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42522  ac_ext=cpp
42523ac_cpp='$CXXCPP $CPPFLAGS'
42524ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42525ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42526ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42527
42528  CXXFLAGS="$saved_cxxflags"
42529
42530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42531$as_echo "$supports" >&6; }
42532  if test "x$supports" = "xyes" ; then
42533    :
42534  else
42535    STACK_PROTECTOR_CFLAG=""
42536  fi
42537
42538
42539      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42540      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42541      ;;
42542    esac
42543  fi
42544
42545  # Optimization levels
42546  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42547    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42548
42549    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42550      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42551      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42552      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42553      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42554      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42555      C_O_FLAG_NONE="-xregs=no%frameptr"
42556      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42557      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42558      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42559      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42560      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42561      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42562        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42563        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42564      fi
42565    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42566      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42567      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42568      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42569      C_O_FLAG_DEBUG=""
42570      C_O_FLAG_NONE=""
42571      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42572      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42573      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42574      C_O_FLAG_DEBUG=""
42575      CXX_O_FLAG_NONE=""
42576    fi
42577  else
42578    # The remaining toolchains share opt flags between CC and CXX;
42579    # setup for C and duplicate afterwards.
42580    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42581      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42582        # On MacOSX we optimize for size, something
42583        # we should do for all platforms?
42584        C_O_FLAG_HIGHEST="-Os"
42585        C_O_FLAG_HI="-Os"
42586        C_O_FLAG_NORM="-Os"
42587      else
42588        C_O_FLAG_HIGHEST="-O3"
42589        C_O_FLAG_HI="-O3"
42590        C_O_FLAG_NORM="-O2"
42591      fi
42592      C_O_FLAG_DEBUG="-O0"
42593      C_O_FLAG_NONE="-O0"
42594    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42595      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42596        # On MacOSX we optimize for size, something
42597        # we should do for all platforms?
42598        C_O_FLAG_HIGHEST="-Os"
42599        C_O_FLAG_HI="-Os"
42600        C_O_FLAG_NORM="-Os"
42601      else
42602        C_O_FLAG_HIGHEST="-O3"
42603        C_O_FLAG_HI="-O3"
42604        C_O_FLAG_NORM="-O2"
42605      fi
42606      C_O_FLAG_DEBUG="-O0"
42607      C_O_FLAG_NONE="-O0"
42608    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42609      C_O_FLAG_HIGHEST="-O3"
42610      C_O_FLAG_HI="-O3 -qstrict"
42611      C_O_FLAG_NORM="-O2"
42612      C_O_FLAG_DEBUG="-qnoopt"
42613      C_O_FLAG_NONE="-qnoop"
42614    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42615      C_O_FLAG_HIGHEST="-O2"
42616      C_O_FLAG_HI="-O1"
42617      C_O_FLAG_NORM="-O1"
42618      C_O_FLAG_DEBUG="-Od"
42619      C_O_FLAG_NONE="-Od"
42620    fi
42621    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42622    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42623    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42624    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42625    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42626  fi
42627
42628  # Adjust optimization flags according to debug level.
42629  case $DEBUG_LEVEL in
42630    release )
42631      # no adjustment
42632      ;;
42633    fastdebug )
42634      # Not quite so much optimization
42635      C_O_FLAG_HI="$C_O_FLAG_NORM"
42636      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42637      ;;
42638    slowdebug )
42639      # Disable optimization
42640      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42641      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42642      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42643      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42644      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42645      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42646      ;;
42647  esac
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661  # Special extras...
42662  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42663    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42664      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42665      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42666    fi
42667    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42668    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42669  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42670    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42671    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42672  fi
42673
42674  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42675    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42676$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42677  fi
42678
42679  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42680    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42681$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42682  fi
42683
42684  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42685    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42686$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42687  fi
42688
42689
42690# Check whether --with-extra-cflags was given.
42691if test "${with_extra_cflags+set}" = set; then :
42692  withval=$with_extra_cflags;
42693fi
42694
42695
42696
42697# Check whether --with-extra-cxxflags was given.
42698if test "${with_extra_cxxflags+set}" = set; then :
42699  withval=$with_extra_cxxflags;
42700fi
42701
42702
42703
42704# Check whether --with-extra-ldflags was given.
42705if test "${with_extra_ldflags+set}" = set; then :
42706  withval=$with_extra_ldflags;
42707fi
42708
42709
42710  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42711  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42712  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42713
42714  # Hotspot needs these set in their legacy form
42715  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42716  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42717  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42718
42719
42720
42721
42722
42723  ###############################################################################
42724  #
42725  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42726  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42727  #
42728
42729  # Setup compiler/platform specific flags into
42730  #    CFLAGS_JDK    - C Compiler flags
42731  #    CXXFLAGS_JDK  - C++ Compiler flags
42732  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42733  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42734    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42735      # Force compatibility with i586 on 32 bit intel platforms.
42736      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42737    fi
42738    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42739        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42740    case $OPENJDK_TARGET_CPU_ARCH in
42741      arm )
42742        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42743        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42744        ;;
42745      ppc )
42746        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42747        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42748        ;;
42749      * )
42750        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42751        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42752        ;;
42753    esac
42754  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42755    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42756    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42757      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42758    fi
42759
42760    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42761    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42762  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42763    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42764    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42765  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42766    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42767        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42768        -DWIN32_LEAN_AND_MEAN \
42769        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42770        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42771        -DWIN32 -DIAL"
42772    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42773      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42774    else
42775      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42776    fi
42777    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42778    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42779    # studio.
42780    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42781      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42782          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42783    fi
42784  fi
42785
42786  ###############################################################################
42787
42788  # Adjust flags according to debug level.
42789  case $DEBUG_LEVEL in
42790    fastdebug | slowdebug )
42791      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42792      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42793      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42794      ;;
42795    release )
42796      ;;
42797    * )
42798      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42799      ;;
42800  esac
42801
42802  # Setup LP64
42803  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42804
42805  # Set some common defines. These works for all compilers, but assume
42806  # -D is universally accepted.
42807
42808  # Setup endianness
42809  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42810    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42811    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42812    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42813    #   Note: -Dmacro         is the same as    #define macro 1
42814    #         -Dmacro=        is the same as    #define macro
42815    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42816      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42817    else
42818      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42819    fi
42820  else
42821    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42822    # are defined in the system?
42823    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42824      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42825    else
42826      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42827    fi
42828  fi
42829
42830  # Setup target OS define. Use OS target name but in upper case.
42831  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42832  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42833
42834  # Setup target CPU
42835  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42836
42837  # Setup debug/release defines
42838  if test "x$DEBUG_LEVEL" = xrelease; then
42839    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42840    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42841      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42842    fi
42843  else
42844    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42845  fi
42846
42847  # Set some additional per-OS defines.
42848  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42849    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42850  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42851    # FIXME: PPC64 should not be here.
42852    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42853  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42854    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42855  fi
42856
42857  # Additional macosx handling
42858  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42859    # Setting these parameters makes it an error to link to macosx APIs that are
42860    # newer than the given OS version and makes the linked binaries compatible
42861    # even if built on a newer version of the OS.
42862    # The expected format is X.Y.Z
42863    MACOSX_VERSION_MIN=10.7.0
42864
42865
42866    # The macro takes the version with no dots, ex: 1070
42867    # Let the flags variables get resolved in make for easier override on make
42868    # command line.
42869    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42870    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42871  fi
42872
42873  # Setup some hard coded includes
42874  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42875      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42876      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42877      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42878
42879  # The shared libraries are compiled using the picflag.
42880  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42881  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42882
42883  # Executable flags
42884  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42885  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42886
42887
42888
42889
42890
42891
42892  # Flags for compiling test libraries
42893  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42894  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42895
42896  # Flags for compiling test executables
42897  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42898  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42899
42900
42901
42902
42903
42904
42905  # Setup LDFLAGS et al.
42906  #
42907
42908  # Now this is odd. The JDK native libraries have to link against libjvm.so
42909  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42910  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42911  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42912  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42913  # libraries will link to whatever is in memory. Yuck.
42914  #
42915  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42916  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42917    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42918    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42919      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42920    fi
42921    # TODO: make -debug optional "--disable-full-debug-symbols"
42922    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42923  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42924    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42925    # We have previously set HAS_GNU_HASH if this is the case
42926    if test -n "$HAS_GNU_HASH"; then
42927      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42928    fi
42929    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42930      # And since we now know that the linker is gnu, then add -z defs, to forbid
42931      # undefined symbols in object files.
42932      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42933      case $DEBUG_LEVEL in
42934        release )
42935          # tell linker to optimize libraries.
42936          # Should this be supplied to the OSS linker as well?
42937          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42938          ;;
42939        slowdebug )
42940          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42941            # do relocations at load
42942            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42943            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42944          fi
42945          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42946            # mark relocations read only
42947            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42948            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42949          fi
42950          ;;
42951        fastdebug )
42952          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42953            # mark relocations read only
42954            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42955            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42956          fi
42957          ;;
42958        * )
42959          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42960          ;;
42961        esac
42962    fi
42963  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42964    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42965    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42966  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42967    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42968  fi
42969
42970  # Customize LDFLAGS for executables
42971
42972  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42973
42974  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42975    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42976      LDFLAGS_STACK_SIZE=1048576
42977    else
42978      LDFLAGS_STACK_SIZE=327680
42979    fi
42980    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42981  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42982    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42983  fi
42984
42985  # Customize LDFLAGS for libs
42986  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42987
42988  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42989    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42990    LDFLAGS_JDKLIB_SUFFIX=""
42991  else
42992    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42993        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42994
42995    # On some platforms (mac) the linker warns about non existing -L dirs.
42996    # Add server first if available. Linking aginst client does not always produce the same results.
42997    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42998    # Default to server for other variants.
42999    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43000      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43001    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43002      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43003    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43004      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43005    else
43006      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43007    fi
43008
43009    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
43010    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43011      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
43012    fi
43013  fi
43014
43015
43016
43017
43018
43019
43020
43021  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
43022  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
43023  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
43024  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
43025
43026
43027
43028
43029
43030
43031
43032  # Some Zero and Shark settings.
43033  # ZERO_ARCHFLAG tells the compiler which mode to build for
43034  case "${OPENJDK_TARGET_CPU}" in
43035    s390)
43036      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43037      ;;
43038    *)
43039      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43040  esac
43041
43042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43043$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43044  supports=yes
43045
43046  saved_cflags="$CFLAGS"
43047  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43048  ac_ext=c
43049ac_cpp='$CPP $CPPFLAGS'
43050ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43051ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43052ac_compiler_gnu=$ac_cv_c_compiler_gnu
43053
43054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43055/* end confdefs.h.  */
43056int i;
43057_ACEOF
43058if ac_fn_c_try_compile "$LINENO"; then :
43059
43060else
43061  supports=no
43062fi
43063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43064  ac_ext=cpp
43065ac_cpp='$CXXCPP $CPPFLAGS'
43066ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43067ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43068ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43069
43070  CFLAGS="$saved_cflags"
43071
43072  saved_cxxflags="$CXXFLAGS"
43073  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43074  ac_ext=cpp
43075ac_cpp='$CXXCPP $CPPFLAGS'
43076ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43077ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43078ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43079
43080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43081/* end confdefs.h.  */
43082int i;
43083_ACEOF
43084if ac_fn_cxx_try_compile "$LINENO"; then :
43085
43086else
43087  supports=no
43088fi
43089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43090  ac_ext=cpp
43091ac_cpp='$CXXCPP $CPPFLAGS'
43092ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43093ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43094ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43095
43096  CXXFLAGS="$saved_cxxflags"
43097
43098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43099$as_echo "$supports" >&6; }
43100  if test "x$supports" = "xyes" ; then
43101    :
43102  else
43103    ZERO_ARCHFLAG=""
43104  fi
43105
43106
43107
43108  # Check that the compiler supports -mX (or -qX on AIX) flags
43109  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43110
43111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43112$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43113  supports=yes
43114
43115  saved_cflags="$CFLAGS"
43116  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43117  ac_ext=c
43118ac_cpp='$CPP $CPPFLAGS'
43119ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43120ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43121ac_compiler_gnu=$ac_cv_c_compiler_gnu
43122
43123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43124/* end confdefs.h.  */
43125int i;
43126_ACEOF
43127if ac_fn_c_try_compile "$LINENO"; then :
43128
43129else
43130  supports=no
43131fi
43132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43133  ac_ext=cpp
43134ac_cpp='$CXXCPP $CPPFLAGS'
43135ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43136ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43137ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43138
43139  CFLAGS="$saved_cflags"
43140
43141  saved_cxxflags="$CXXFLAGS"
43142  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43143  ac_ext=cpp
43144ac_cpp='$CXXCPP $CPPFLAGS'
43145ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43146ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43147ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43148
43149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43150/* end confdefs.h.  */
43151int i;
43152_ACEOF
43153if ac_fn_cxx_try_compile "$LINENO"; then :
43154
43155else
43156  supports=no
43157fi
43158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43159  ac_ext=cpp
43160ac_cpp='$CXXCPP $CPPFLAGS'
43161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43164
43165  CXXFLAGS="$saved_cxxflags"
43166
43167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43168$as_echo "$supports" >&6; }
43169  if test "x$supports" = "xyes" ; then
43170    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43171  else
43172    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43173  fi
43174
43175
43176
43177  # Check whether --enable-warnings-as-errors was given.
43178if test "${enable_warnings_as_errors+set}" = set; then :
43179  enableval=$enable_warnings_as_errors;
43180fi
43181
43182
43183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43184$as_echo_n "checking if native warnings are errors... " >&6; }
43185  if test "x$enable_warnings_as_errors" = "xyes"; then
43186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43187$as_echo "yes (explicitely set)" >&6; }
43188    WARNINGS_AS_ERRORS=true
43189  elif test "x$enable_warnings_as_errors" = "xno"; then
43190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43191$as_echo "no" >&6; }
43192    WARNINGS_AS_ERRORS=false
43193  elif test "x$enable_warnings_as_errors" = "x"; then
43194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43195$as_echo "yes (default)" >&6; }
43196    WARNINGS_AS_ERRORS=true
43197  else
43198    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43199  fi
43200
43201
43202  case "${TOOLCHAIN_TYPE}" in
43203    microsoft)
43204      DISABLE_WARNING_PREFIX="-wd"
43205      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43206      ;;
43207    solstudio)
43208      DISABLE_WARNING_PREFIX="-erroff="
43209      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43210      ;;
43211    gcc)
43212      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43213
43214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43215$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43216  supports=yes
43217
43218  saved_cflags="$CFLAGS"
43219  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43220  ac_ext=c
43221ac_cpp='$CPP $CPPFLAGS'
43222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43224ac_compiler_gnu=$ac_cv_c_compiler_gnu
43225
43226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43227/* end confdefs.h.  */
43228int i;
43229_ACEOF
43230if ac_fn_c_try_compile "$LINENO"; then :
43231
43232else
43233  supports=no
43234fi
43235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43236  ac_ext=cpp
43237ac_cpp='$CXXCPP $CPPFLAGS'
43238ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43239ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43240ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43241
43242  CFLAGS="$saved_cflags"
43243
43244  saved_cxxflags="$CXXFLAGS"
43245  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43246  ac_ext=cpp
43247ac_cpp='$CXXCPP $CPPFLAGS'
43248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43251
43252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43253/* end confdefs.h.  */
43254int i;
43255_ACEOF
43256if ac_fn_cxx_try_compile "$LINENO"; then :
43257
43258else
43259  supports=no
43260fi
43261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43262  ac_ext=cpp
43263ac_cpp='$CXXCPP $CPPFLAGS'
43264ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43265ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43266ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43267
43268  CXXFLAGS="$saved_cxxflags"
43269
43270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43271$as_echo "$supports" >&6; }
43272  if test "x$supports" = "xyes" ; then
43273    GCC_CAN_DISABLE_WARNINGS=true
43274  else
43275    GCC_CAN_DISABLE_WARNINGS=false
43276
43277  fi
43278
43279      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43280        DISABLE_WARNING_PREFIX="-Wno-"
43281      else
43282        DISABLE_WARNING_PREFIX=
43283      fi
43284      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43285      ;;
43286    clang)
43287      DISABLE_WARNING_PREFIX="-Wno-"
43288      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43289      ;;
43290  esac
43291
43292
43293
43294
43295# Setup debug symbols (need objcopy from the toolchain for that)
43296
43297  #
43298  # ENABLE_DEBUG_SYMBOLS
43299  # This must be done after the toolchain is setup, since we're looking at objcopy.
43300  #
43301  # Check whether --enable-debug-symbols was given.
43302if test "${enable_debug_symbols+set}" = set; then :
43303  enableval=$enable_debug_symbols;
43304fi
43305
43306
43307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43308$as_echo_n "checking if we should generate debug symbols... " >&6; }
43309
43310  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43311    # explicit enabling of enable-debug-symbols and can't find objcopy
43312    #   this is an error
43313    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43314  fi
43315
43316  if test "x$enable_debug_symbols" = "xyes"; then
43317    ENABLE_DEBUG_SYMBOLS=true
43318  elif test "x$enable_debug_symbols" = "xno"; then
43319    ENABLE_DEBUG_SYMBOLS=false
43320  else
43321    # Default is on if objcopy is found
43322    if test "x$OBJCOPY" != x; then
43323      ENABLE_DEBUG_SYMBOLS=true
43324    # MacOS X and Windows don't use objcopy but default is on for those OSes
43325    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43326      ENABLE_DEBUG_SYMBOLS=true
43327    else
43328      ENABLE_DEBUG_SYMBOLS=false
43329    fi
43330  fi
43331
43332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43333$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43334
43335  #
43336  # ZIP_DEBUGINFO_FILES
43337  #
43338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43339$as_echo_n "checking if we should zip debug-info files... " >&6; }
43340  # Check whether --enable-zip-debug-info was given.
43341if test "${enable_zip_debug_info+set}" = set; then :
43342  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43343else
43344  enable_zip_debug_info="yes"
43345fi
43346
43347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43348$as_echo "${enable_zip_debug_info}" >&6; }
43349
43350  if test "x${enable_zip_debug_info}" = "xno"; then
43351    ZIP_DEBUGINFO_FILES=false
43352  else
43353    ZIP_DEBUGINFO_FILES=true
43354  fi
43355
43356
43357
43358
43359
43360  # Check whether --enable-native-coverage was given.
43361if test "${enable_native_coverage+set}" = set; then :
43362  enableval=$enable_native_coverage;
43363fi
43364
43365  GCOV_ENABLED="false"
43366  if test "x$enable_native_coverage" = "xyes"; then
43367    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43369$as_echo_n "checking if native coverage is enabled... " >&6; }
43370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43371$as_echo "yes" >&6; }
43372      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43373      GCOV_LDFLAGS="-fprofile-arcs"
43374      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43375      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43376      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43377      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43378      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43379      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43380      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43381      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43382      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43383      GCOV_ENABLED="true"
43384    else
43385      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43386    fi
43387  elif test "x$enable_native_coverage" = "xno"; then
43388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43389$as_echo_n "checking if native coverage is enabled... " >&6; }
43390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43391$as_echo "no" >&6; }
43392  elif test "x$enable_native_coverage" != "x"; then
43393    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43394  fi
43395
43396
43397
43398
43399###############################################################################
43400#
43401# Check dependencies for external and internal libraries.
43402#
43403###############################################################################
43404
43405# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43406
43407  # When using cygwin or msys, we need a wrapper binary that renames
43408  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43409  # @files and rewrites these too! This wrapper binary is
43410  # called fixpath.
43411  FIXPATH=
43412  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43414$as_echo_n "checking if fixpath can be created... " >&6; }
43415    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43416    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43417    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43418    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43419      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43420      FIXPATH="$FIXPATH_BIN -c"
43421    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43422      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43423      # @ was chosen as separator to minimize risk of other tools messing around with it
43424      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43425          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43426      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43427      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43428    fi
43429    FIXPATH_SRC_W="$FIXPATH_SRC"
43430    FIXPATH_BIN_W="$FIXPATH_BIN"
43431
43432  unix_path="$FIXPATH_SRC_W"
43433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43434    windows_path=`$CYGPATH -m "$unix_path"`
43435    FIXPATH_SRC_W="$windows_path"
43436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43437    windows_path=`cmd //c echo $unix_path`
43438    FIXPATH_SRC_W="$windows_path"
43439  fi
43440
43441
43442  unix_path="$FIXPATH_BIN_W"
43443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43444    windows_path=`$CYGPATH -m "$unix_path"`
43445    FIXPATH_BIN_W="$windows_path"
43446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43447    windows_path=`cmd //c echo $unix_path`
43448    FIXPATH_BIN_W="$windows_path"
43449  fi
43450
43451    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43452    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43453    cd $FIXPATH_DIR
43454    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43455    cd $CURDIR
43456
43457    if test ! -x $FIXPATH_BIN; then
43458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43459$as_echo "no" >&6; }
43460      cat $FIXPATH_DIR/fixpath1.log
43461      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43462    fi
43463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43464$as_echo "yes" >&6; }
43465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43466$as_echo_n "checking if fixpath.exe works... " >&6; }
43467    cd $FIXPATH_DIR
43468    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43469        > $FIXPATH_DIR/fixpath2.log 2>&1
43470    cd $CURDIR
43471    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43473$as_echo "no" >&6; }
43474      cat $FIXPATH_DIR/fixpath2.log
43475      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43476    fi
43477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43478$as_echo "yes" >&6; }
43479  fi
43480
43481
43482
43483
43484
43485
43486  ###############################################################################
43487  #
43488  # OS specific settings that we never will need to probe.
43489  #
43490  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43492$as_echo_n "checking what is not needed on Linux?... " >&6; }
43493    PULSE_NOT_NEEDED=yes
43494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43495$as_echo "pulse" >&6; }
43496  fi
43497
43498  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43500$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43501    ALSA_NOT_NEEDED=yes
43502    PULSE_NOT_NEEDED=yes
43503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43504$as_echo "alsa pulse" >&6; }
43505  fi
43506
43507  if test "x$OPENJDK_TARGET_OS" = xaix; then
43508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43509$as_echo_n "checking what is not needed on AIX?... " >&6; }
43510    ALSA_NOT_NEEDED=yes
43511    PULSE_NOT_NEEDED=yes
43512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43513$as_echo "alsa pulse" >&6; }
43514  fi
43515
43516
43517  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43519$as_echo_n "checking what is not needed on Windows?... " >&6; }
43520    CUPS_NOT_NEEDED=yes
43521    ALSA_NOT_NEEDED=yes
43522    PULSE_NOT_NEEDED=yes
43523    X11_NOT_NEEDED=yes
43524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43525$as_echo "alsa cups pulse x11" >&6; }
43526  fi
43527
43528  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43530$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43531    ALSA_NOT_NEEDED=yes
43532    PULSE_NOT_NEEDED=yes
43533    X11_NOT_NEEDED=yes
43534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43535$as_echo "alsa pulse x11" >&6; }
43536  fi
43537
43538  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43540$as_echo_n "checking what is not needed on bsd?... " >&6; }
43541    ALSA_NOT_NEEDED=yes
43542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43543$as_echo "alsa" >&6; }
43544  fi
43545
43546  if test "x$OPENJDK" = "xfalse"; then
43547    FREETYPE_NOT_NEEDED=yes
43548  fi
43549
43550  if test "x$SUPPORT_HEADFUL" = xno; then
43551    X11_NOT_NEEDED=yes
43552  fi
43553
43554
43555
43556  ###############################################################################
43557  #
43558  # Check for X Windows
43559  #
43560
43561  if test "x$X11_NOT_NEEDED" = xyes; then
43562    if test "x${with_x}" != x; then
43563      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43564$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43565    fi
43566    X_CFLAGS=
43567    X_LIBS=
43568  else
43569    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43570    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43571    # --x-libraries for the sysroot, if that seems to be correct.
43572    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43573      if test "x$SYSROOT" != "x"; then
43574        if test "x$x_includes" = xNONE; then
43575          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43576            x_includes="$SYSROOT/usr/X11R6/include"
43577          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43578            x_includes="$SYSROOT/usr/include"
43579          fi
43580        fi
43581        if test "x$x_libraries" = xNONE; then
43582          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43583            x_libraries="$SYSROOT/usr/X11R6/lib"
43584          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43585            x_libraries="$SYSROOT/usr/lib64"
43586          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43587            x_libraries="$SYSROOT/usr/lib"
43588          fi
43589        fi
43590      fi
43591    fi
43592
43593    # Now let autoconf do it's magic
43594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43595$as_echo_n "checking for X... " >&6; }
43596
43597
43598# Check whether --with-x was given.
43599if test "${with_x+set}" = set; then :
43600  withval=$with_x;
43601fi
43602
43603# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43604if test "x$with_x" = xno; then
43605  # The user explicitly disabled X.
43606  have_x=disabled
43607else
43608  case $x_includes,$x_libraries in #(
43609    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43610    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43611  $as_echo_n "(cached) " >&6
43612else
43613  # One or both of the vars are not set, and there is no cached value.
43614ac_x_includes=no ac_x_libraries=no
43615rm -f -r conftest.dir
43616if mkdir conftest.dir; then
43617  cd conftest.dir
43618  cat >Imakefile <<'_ACEOF'
43619incroot:
43620	@echo incroot='${INCROOT}'
43621usrlibdir:
43622	@echo usrlibdir='${USRLIBDIR}'
43623libdir:
43624	@echo libdir='${LIBDIR}'
43625_ACEOF
43626  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43627    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43628    for ac_var in incroot usrlibdir libdir; do
43629      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43630    done
43631    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43632    for ac_extension in a so sl dylib la dll; do
43633      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43634	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43635	ac_im_usrlibdir=$ac_im_libdir; break
43636      fi
43637    done
43638    # Screen out bogus values from the imake configuration.  They are
43639    # bogus both because they are the default anyway, and because
43640    # using them would break gcc on systems where it needs fixed includes.
43641    case $ac_im_incroot in
43642	/usr/include) ac_x_includes= ;;
43643	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43644    esac
43645    case $ac_im_usrlibdir in
43646	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43647	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43648    esac
43649  fi
43650  cd ..
43651  rm -f -r conftest.dir
43652fi
43653
43654# Standard set of common directories for X headers.
43655# Check X11 before X11Rn because it is often a symlink to the current release.
43656ac_x_header_dirs='
43657/usr/X11/include
43658/usr/X11R7/include
43659/usr/X11R6/include
43660/usr/X11R5/include
43661/usr/X11R4/include
43662
43663/usr/include/X11
43664/usr/include/X11R7
43665/usr/include/X11R6
43666/usr/include/X11R5
43667/usr/include/X11R4
43668
43669/usr/local/X11/include
43670/usr/local/X11R7/include
43671/usr/local/X11R6/include
43672/usr/local/X11R5/include
43673/usr/local/X11R4/include
43674
43675/usr/local/include/X11
43676/usr/local/include/X11R7
43677/usr/local/include/X11R6
43678/usr/local/include/X11R5
43679/usr/local/include/X11R4
43680
43681/usr/X386/include
43682/usr/x386/include
43683/usr/XFree86/include/X11
43684
43685/usr/include
43686/usr/local/include
43687/usr/unsupported/include
43688/usr/athena/include
43689/usr/local/x11r5/include
43690/usr/lpp/Xamples/include
43691
43692/usr/openwin/include
43693/usr/openwin/share/include'
43694
43695if test "$ac_x_includes" = no; then
43696  # Guess where to find include files, by looking for Xlib.h.
43697  # First, try using that file with no special directory specified.
43698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43699/* end confdefs.h.  */
43700#include <X11/Xlib.h>
43701_ACEOF
43702if ac_fn_cxx_try_cpp "$LINENO"; then :
43703  # We can compile using X headers with no special include directory.
43704ac_x_includes=
43705else
43706  for ac_dir in $ac_x_header_dirs; do
43707  if test -r "$ac_dir/X11/Xlib.h"; then
43708    ac_x_includes=$ac_dir
43709    break
43710  fi
43711done
43712fi
43713rm -f conftest.err conftest.i conftest.$ac_ext
43714fi # $ac_x_includes = no
43715
43716if test "$ac_x_libraries" = no; then
43717  # Check for the libraries.
43718  # See if we find them without any special options.
43719  # Don't add to $LIBS permanently.
43720  ac_save_LIBS=$LIBS
43721  LIBS="-lX11 $LIBS"
43722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43723/* end confdefs.h.  */
43724#include <X11/Xlib.h>
43725int
43726main ()
43727{
43728XrmInitialize ()
43729  ;
43730  return 0;
43731}
43732_ACEOF
43733if ac_fn_cxx_try_link "$LINENO"; then :
43734  LIBS=$ac_save_LIBS
43735# We can link X programs with no special library path.
43736ac_x_libraries=
43737else
43738  LIBS=$ac_save_LIBS
43739for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43740do
43741  # Don't even attempt the hair of trying to link an X program!
43742  for ac_extension in a so sl dylib la dll; do
43743    if test -r "$ac_dir/libX11.$ac_extension"; then
43744      ac_x_libraries=$ac_dir
43745      break 2
43746    fi
43747  done
43748done
43749fi
43750rm -f core conftest.err conftest.$ac_objext \
43751    conftest$ac_exeext conftest.$ac_ext
43752fi # $ac_x_libraries = no
43753
43754case $ac_x_includes,$ac_x_libraries in #(
43755  no,* | *,no | *\'*)
43756    # Didn't find X, or a directory has "'" in its name.
43757    ac_cv_have_x="have_x=no";; #(
43758  *)
43759    # Record where we found X for the cache.
43760    ac_cv_have_x="have_x=yes\
43761	ac_x_includes='$ac_x_includes'\
43762	ac_x_libraries='$ac_x_libraries'"
43763esac
43764fi
43765;; #(
43766    *) have_x=yes;;
43767  esac
43768  eval "$ac_cv_have_x"
43769fi # $with_x != no
43770
43771if test "$have_x" != yes; then
43772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43773$as_echo "$have_x" >&6; }
43774  no_x=yes
43775else
43776  # If each of the values was on the command line, it overrides each guess.
43777  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43778  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43779  # Update the cache value to reflect the command line values.
43780  ac_cv_have_x="have_x=yes\
43781	ac_x_includes='$x_includes'\
43782	ac_x_libraries='$x_libraries'"
43783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43784$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43785fi
43786
43787    if test "$no_x" = yes; then
43788  # Not all programs may use this symbol, but it does not hurt to define it.
43789
43790$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43791
43792  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43793else
43794  if test -n "$x_includes"; then
43795    X_CFLAGS="$X_CFLAGS -I$x_includes"
43796  fi
43797
43798  # It would also be nice to do this for all -L options, not just this one.
43799  if test -n "$x_libraries"; then
43800    X_LIBS="$X_LIBS -L$x_libraries"
43801    # For Solaris; some versions of Sun CC require a space after -R and
43802    # others require no space.  Words are not sufficient . . . .
43803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43804$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43805    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43806    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43807    ac_cxx_werror_flag=yes
43808    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43809/* end confdefs.h.  */
43810
43811int
43812main ()
43813{
43814
43815  ;
43816  return 0;
43817}
43818_ACEOF
43819if ac_fn_cxx_try_link "$LINENO"; then :
43820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43821$as_echo "no" >&6; }
43822       X_LIBS="$X_LIBS -R$x_libraries"
43823else
43824  LIBS="$ac_xsave_LIBS -R $x_libraries"
43825       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43826/* end confdefs.h.  */
43827
43828int
43829main ()
43830{
43831
43832  ;
43833  return 0;
43834}
43835_ACEOF
43836if ac_fn_cxx_try_link "$LINENO"; then :
43837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43838$as_echo "yes" >&6; }
43839	  X_LIBS="$X_LIBS -R $x_libraries"
43840else
43841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43842$as_echo "neither works" >&6; }
43843fi
43844rm -f core conftest.err conftest.$ac_objext \
43845    conftest$ac_exeext conftest.$ac_ext
43846fi
43847rm -f core conftest.err conftest.$ac_objext \
43848    conftest$ac_exeext conftest.$ac_ext
43849    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43850    LIBS=$ac_xsave_LIBS
43851  fi
43852
43853  # Check for system-dependent libraries X programs must link with.
43854  # Do this before checking for the system-independent R6 libraries
43855  # (-lICE), since we may need -lsocket or whatever for X linking.
43856
43857  if test "$ISC" = yes; then
43858    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43859  else
43860    # Martyn Johnson says this is needed for Ultrix, if the X
43861    # libraries were built with DECnet support.  And Karl Berry says
43862    # the Alpha needs dnet_stub (dnet does not exist).
43863    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43864    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43865/* end confdefs.h.  */
43866
43867/* Override any GCC internal prototype to avoid an error.
43868   Use char because int might match the return type of a GCC
43869   builtin and then its argument prototype would still apply.  */
43870#ifdef __cplusplus
43871extern "C"
43872#endif
43873char XOpenDisplay ();
43874int
43875main ()
43876{
43877return XOpenDisplay ();
43878  ;
43879  return 0;
43880}
43881_ACEOF
43882if ac_fn_cxx_try_link "$LINENO"; then :
43883
43884else
43885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43886$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43887if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43888  $as_echo_n "(cached) " >&6
43889else
43890  ac_check_lib_save_LIBS=$LIBS
43891LIBS="-ldnet  $LIBS"
43892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43893/* end confdefs.h.  */
43894
43895/* Override any GCC internal prototype to avoid an error.
43896   Use char because int might match the return type of a GCC
43897   builtin and then its argument prototype would still apply.  */
43898#ifdef __cplusplus
43899extern "C"
43900#endif
43901char dnet_ntoa ();
43902int
43903main ()
43904{
43905return dnet_ntoa ();
43906  ;
43907  return 0;
43908}
43909_ACEOF
43910if ac_fn_cxx_try_link "$LINENO"; then :
43911  ac_cv_lib_dnet_dnet_ntoa=yes
43912else
43913  ac_cv_lib_dnet_dnet_ntoa=no
43914fi
43915rm -f core conftest.err conftest.$ac_objext \
43916    conftest$ac_exeext conftest.$ac_ext
43917LIBS=$ac_check_lib_save_LIBS
43918fi
43919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43920$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43921if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43922  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43923fi
43924
43925    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43927$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43928if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43929  $as_echo_n "(cached) " >&6
43930else
43931  ac_check_lib_save_LIBS=$LIBS
43932LIBS="-ldnet_stub  $LIBS"
43933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43934/* end confdefs.h.  */
43935
43936/* Override any GCC internal prototype to avoid an error.
43937   Use char because int might match the return type of a GCC
43938   builtin and then its argument prototype would still apply.  */
43939#ifdef __cplusplus
43940extern "C"
43941#endif
43942char dnet_ntoa ();
43943int
43944main ()
43945{
43946return dnet_ntoa ();
43947  ;
43948  return 0;
43949}
43950_ACEOF
43951if ac_fn_cxx_try_link "$LINENO"; then :
43952  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43953else
43954  ac_cv_lib_dnet_stub_dnet_ntoa=no
43955fi
43956rm -f core conftest.err conftest.$ac_objext \
43957    conftest$ac_exeext conftest.$ac_ext
43958LIBS=$ac_check_lib_save_LIBS
43959fi
43960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43961$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43962if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43963  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43964fi
43965
43966    fi
43967fi
43968rm -f core conftest.err conftest.$ac_objext \
43969    conftest$ac_exeext conftest.$ac_ext
43970    LIBS="$ac_xsave_LIBS"
43971
43972    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43973    # to get the SysV transport functions.
43974    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43975    # needs -lnsl.
43976    # The nsl library prevents programs from opening the X display
43977    # on Irix 5.2, according to T.E. Dickey.
43978    # The functions gethostbyname, getservbyname, and inet_addr are
43979    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43980    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43981if test "x$ac_cv_func_gethostbyname" = xyes; then :
43982
43983fi
43984
43985    if test $ac_cv_func_gethostbyname = no; then
43986      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43987$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43988if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43989  $as_echo_n "(cached) " >&6
43990else
43991  ac_check_lib_save_LIBS=$LIBS
43992LIBS="-lnsl  $LIBS"
43993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43994/* end confdefs.h.  */
43995
43996/* Override any GCC internal prototype to avoid an error.
43997   Use char because int might match the return type of a GCC
43998   builtin and then its argument prototype would still apply.  */
43999#ifdef __cplusplus
44000extern "C"
44001#endif
44002char gethostbyname ();
44003int
44004main ()
44005{
44006return gethostbyname ();
44007  ;
44008  return 0;
44009}
44010_ACEOF
44011if ac_fn_cxx_try_link "$LINENO"; then :
44012  ac_cv_lib_nsl_gethostbyname=yes
44013else
44014  ac_cv_lib_nsl_gethostbyname=no
44015fi
44016rm -f core conftest.err conftest.$ac_objext \
44017    conftest$ac_exeext conftest.$ac_ext
44018LIBS=$ac_check_lib_save_LIBS
44019fi
44020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
44021$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
44022if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
44023  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
44024fi
44025
44026      if test $ac_cv_lib_nsl_gethostbyname = no; then
44027	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
44028$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
44029if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
44030  $as_echo_n "(cached) " >&6
44031else
44032  ac_check_lib_save_LIBS=$LIBS
44033LIBS="-lbsd  $LIBS"
44034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44035/* end confdefs.h.  */
44036
44037/* Override any GCC internal prototype to avoid an error.
44038   Use char because int might match the return type of a GCC
44039   builtin and then its argument prototype would still apply.  */
44040#ifdef __cplusplus
44041extern "C"
44042#endif
44043char gethostbyname ();
44044int
44045main ()
44046{
44047return gethostbyname ();
44048  ;
44049  return 0;
44050}
44051_ACEOF
44052if ac_fn_cxx_try_link "$LINENO"; then :
44053  ac_cv_lib_bsd_gethostbyname=yes
44054else
44055  ac_cv_lib_bsd_gethostbyname=no
44056fi
44057rm -f core conftest.err conftest.$ac_objext \
44058    conftest$ac_exeext conftest.$ac_ext
44059LIBS=$ac_check_lib_save_LIBS
44060fi
44061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
44062$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
44063if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
44064  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
44065fi
44066
44067      fi
44068    fi
44069
44070    # lieder@skyler.mavd.honeywell.com says without -lsocket,
44071    # socket/setsockopt and other routines are undefined under SCO ODT
44072    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
44073    # on later versions), says Simon Leinen: it contains gethostby*
44074    # variants that don't use the name server (or something).  -lsocket
44075    # must be given before -lnsl if both are needed.  We assume that
44076    # if connect needs -lnsl, so does gethostbyname.
44077    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
44078if test "x$ac_cv_func_connect" = xyes; then :
44079
44080fi
44081
44082    if test $ac_cv_func_connect = no; then
44083      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
44084$as_echo_n "checking for connect in -lsocket... " >&6; }
44085if ${ac_cv_lib_socket_connect+:} false; then :
44086  $as_echo_n "(cached) " >&6
44087else
44088  ac_check_lib_save_LIBS=$LIBS
44089LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
44090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44091/* end confdefs.h.  */
44092
44093/* Override any GCC internal prototype to avoid an error.
44094   Use char because int might match the return type of a GCC
44095   builtin and then its argument prototype would still apply.  */
44096#ifdef __cplusplus
44097extern "C"
44098#endif
44099char connect ();
44100int
44101main ()
44102{
44103return connect ();
44104  ;
44105  return 0;
44106}
44107_ACEOF
44108if ac_fn_cxx_try_link "$LINENO"; then :
44109  ac_cv_lib_socket_connect=yes
44110else
44111  ac_cv_lib_socket_connect=no
44112fi
44113rm -f core conftest.err conftest.$ac_objext \
44114    conftest$ac_exeext conftest.$ac_ext
44115LIBS=$ac_check_lib_save_LIBS
44116fi
44117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
44118$as_echo "$ac_cv_lib_socket_connect" >&6; }
44119if test "x$ac_cv_lib_socket_connect" = xyes; then :
44120  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
44121fi
44122
44123    fi
44124
44125    # Guillermo Gomez says -lposix is necessary on A/UX.
44126    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
44127if test "x$ac_cv_func_remove" = xyes; then :
44128
44129fi
44130
44131    if test $ac_cv_func_remove = no; then
44132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
44133$as_echo_n "checking for remove in -lposix... " >&6; }
44134if ${ac_cv_lib_posix_remove+:} false; then :
44135  $as_echo_n "(cached) " >&6
44136else
44137  ac_check_lib_save_LIBS=$LIBS
44138LIBS="-lposix  $LIBS"
44139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44140/* end confdefs.h.  */
44141
44142/* Override any GCC internal prototype to avoid an error.
44143   Use char because int might match the return type of a GCC
44144   builtin and then its argument prototype would still apply.  */
44145#ifdef __cplusplus
44146extern "C"
44147#endif
44148char remove ();
44149int
44150main ()
44151{
44152return remove ();
44153  ;
44154  return 0;
44155}
44156_ACEOF
44157if ac_fn_cxx_try_link "$LINENO"; then :
44158  ac_cv_lib_posix_remove=yes
44159else
44160  ac_cv_lib_posix_remove=no
44161fi
44162rm -f core conftest.err conftest.$ac_objext \
44163    conftest$ac_exeext conftest.$ac_ext
44164LIBS=$ac_check_lib_save_LIBS
44165fi
44166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
44167$as_echo "$ac_cv_lib_posix_remove" >&6; }
44168if test "x$ac_cv_lib_posix_remove" = xyes; then :
44169  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
44170fi
44171
44172    fi
44173
44174    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
44175    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
44176if test "x$ac_cv_func_shmat" = xyes; then :
44177
44178fi
44179
44180    if test $ac_cv_func_shmat = no; then
44181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44182$as_echo_n "checking for shmat in -lipc... " >&6; }
44183if ${ac_cv_lib_ipc_shmat+:} false; then :
44184  $as_echo_n "(cached) " >&6
44185else
44186  ac_check_lib_save_LIBS=$LIBS
44187LIBS="-lipc  $LIBS"
44188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44189/* end confdefs.h.  */
44190
44191/* Override any GCC internal prototype to avoid an error.
44192   Use char because int might match the return type of a GCC
44193   builtin and then its argument prototype would still apply.  */
44194#ifdef __cplusplus
44195extern "C"
44196#endif
44197char shmat ();
44198int
44199main ()
44200{
44201return shmat ();
44202  ;
44203  return 0;
44204}
44205_ACEOF
44206if ac_fn_cxx_try_link "$LINENO"; then :
44207  ac_cv_lib_ipc_shmat=yes
44208else
44209  ac_cv_lib_ipc_shmat=no
44210fi
44211rm -f core conftest.err conftest.$ac_objext \
44212    conftest$ac_exeext conftest.$ac_ext
44213LIBS=$ac_check_lib_save_LIBS
44214fi
44215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44216$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44217if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44218  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44219fi
44220
44221    fi
44222  fi
44223
44224  # Check for libraries that X11R6 Xt/Xaw programs need.
44225  ac_save_LDFLAGS=$LDFLAGS
44226  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44227  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44228  # check for ICE first), but we must link in the order -lSM -lICE or
44229  # we get undefined symbols.  So assume we have SM if we have ICE.
44230  # These have to be linked with before -lX11, unlike the other
44231  # libraries we check for below, so use a different variable.
44232  # John Interrante, Karl Berry
44233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44234$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44235if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44236  $as_echo_n "(cached) " >&6
44237else
44238  ac_check_lib_save_LIBS=$LIBS
44239LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44241/* end confdefs.h.  */
44242
44243/* Override any GCC internal prototype to avoid an error.
44244   Use char because int might match the return type of a GCC
44245   builtin and then its argument prototype would still apply.  */
44246#ifdef __cplusplus
44247extern "C"
44248#endif
44249char IceConnectionNumber ();
44250int
44251main ()
44252{
44253return IceConnectionNumber ();
44254  ;
44255  return 0;
44256}
44257_ACEOF
44258if ac_fn_cxx_try_link "$LINENO"; then :
44259  ac_cv_lib_ICE_IceConnectionNumber=yes
44260else
44261  ac_cv_lib_ICE_IceConnectionNumber=no
44262fi
44263rm -f core conftest.err conftest.$ac_objext \
44264    conftest$ac_exeext conftest.$ac_ext
44265LIBS=$ac_check_lib_save_LIBS
44266fi
44267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44268$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44269if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44270  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44271fi
44272
44273  LDFLAGS=$ac_save_LDFLAGS
44274
44275fi
44276
44277
44278    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44279    # this doesn't make sense so we remove it.
44280    if test "x$COMPILE_TYPE" = xcross; then
44281      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44282    fi
44283
44284    if test "x$no_x" = xyes; then
44285
44286  # Print a helpful message on how to acquire the necessary build dependency.
44287  # x11 is the help tag: freetype, cups, pulse, alsa etc
44288  MISSING_DEPENDENCY=x11
44289
44290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44291    cygwin_help $MISSING_DEPENDENCY
44292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44293    msys_help $MISSING_DEPENDENCY
44294  else
44295    PKGHANDLER_COMMAND=
44296
44297    case $PKGHANDLER in
44298      apt-get)
44299        apt_help     $MISSING_DEPENDENCY ;;
44300      yum)
44301        yum_help     $MISSING_DEPENDENCY ;;
44302      port)
44303        port_help    $MISSING_DEPENDENCY ;;
44304      pkgutil)
44305        pkgutil_help $MISSING_DEPENDENCY ;;
44306      pkgadd)
44307        pkgadd_help  $MISSING_DEPENDENCY ;;
44308    esac
44309
44310    if test "x$PKGHANDLER_COMMAND" != x; then
44311      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44312    fi
44313  fi
44314
44315      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44316    fi
44317
44318    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44319      OPENWIN_HOME="/usr/openwin"
44320      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44321      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44322          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44323          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44324          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44325    fi
44326
44327    ac_ext=c
44328ac_cpp='$CPP $CPPFLAGS'
44329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44331ac_compiler_gnu=$ac_cv_c_compiler_gnu
44332
44333    OLD_CFLAGS="$CFLAGS"
44334    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44335
44336    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44337    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44338do :
44339  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44340ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44341          # include <X11/Xlib.h>
44342          # include <X11/Xutil.h>
44343
44344
44345"
44346if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44347  cat >>confdefs.h <<_ACEOF
44348#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44349_ACEOF
44350 X11_HEADERS_OK=yes
44351else
44352  X11_HEADERS_OK=no; break
44353fi
44354
44355done
44356
44357
44358    if test "x$X11_HEADERS_OK" = xno; then
44359
44360  # Print a helpful message on how to acquire the necessary build dependency.
44361  # x11 is the help tag: freetype, cups, pulse, alsa etc
44362  MISSING_DEPENDENCY=x11
44363
44364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44365    cygwin_help $MISSING_DEPENDENCY
44366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44367    msys_help $MISSING_DEPENDENCY
44368  else
44369    PKGHANDLER_COMMAND=
44370
44371    case $PKGHANDLER in
44372      apt-get)
44373        apt_help     $MISSING_DEPENDENCY ;;
44374      yum)
44375        yum_help     $MISSING_DEPENDENCY ;;
44376      port)
44377        port_help    $MISSING_DEPENDENCY ;;
44378      pkgutil)
44379        pkgutil_help $MISSING_DEPENDENCY ;;
44380      pkgadd)
44381        pkgadd_help  $MISSING_DEPENDENCY ;;
44382    esac
44383
44384    if test "x$PKGHANDLER_COMMAND" != x; then
44385      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44386    fi
44387  fi
44388
44389      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44390    fi
44391
44392    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44393    # defined in libawt_xawt.
44394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44395$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44396    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44397/* end confdefs.h.  */
44398#include <X11/extensions/Xrender.h>
44399int
44400main ()
44401{
44402XLinearGradient x;
44403  ;
44404  return 0;
44405}
44406_ACEOF
44407if ac_fn_c_try_compile "$LINENO"; then :
44408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44409$as_echo "yes" >&6; }
44410else
44411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44412$as_echo "no" >&6; }
44413         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44414fi
44415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44416
44417    CFLAGS="$OLD_CFLAGS"
44418    ac_ext=cpp
44419ac_cpp='$CXXCPP $CPPFLAGS'
44420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44423
44424  fi # X11_NOT_NEEDED
44425
44426
44427
44428
44429
44430
44431  ###############################################################################
44432  #
44433  # The common unix printing system cups is used to print from java.
44434  #
44435
44436# Check whether --with-cups was given.
44437if test "${with_cups+set}" = set; then :
44438  withval=$with_cups;
44439fi
44440
44441
44442# Check whether --with-cups-include was given.
44443if test "${with_cups_include+set}" = set; then :
44444  withval=$with_cups_include;
44445fi
44446
44447
44448  if test "x$CUPS_NOT_NEEDED" = xyes; then
44449    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44450      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44451$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44452    fi
44453    CUPS_CFLAGS=
44454  else
44455    CUPS_FOUND=no
44456
44457    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44458      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44459    fi
44460
44461    if test "x${with_cups}" != x; then
44462      CUPS_CFLAGS="-I${with_cups}/include"
44463      CUPS_FOUND=yes
44464    fi
44465    if test "x${with_cups_include}" != x; then
44466      CUPS_CFLAGS="-I${with_cups_include}"
44467      CUPS_FOUND=yes
44468    fi
44469    if test "x$CUPS_FOUND" = xno; then
44470
44471
44472  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44473    # Source the builddeps file again, to make sure it uses the latest variables!
44474    . $builddepsfile
44475    # Look for a target and build machine specific resource!
44476    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44477    if test "x$resource" = x; then
44478      # Ok, lets instead look for a target specific resource
44479      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44480    fi
44481    if test "x$resource" = x; then
44482      # Ok, lets instead look for a build specific resource
44483      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44484    fi
44485    if test "x$resource" = x; then
44486      # Ok, lets instead look for a generic resource
44487      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44488      resource=${builddep_cups}
44489    fi
44490    if test "x$resource" != x; then
44491      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44492$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44493      # If the resource in the builddeps.conf file is an existing directory,
44494      # for example /java/linux/cups
44495      if test -d ${resource}; then
44496        depdir=${resource}
44497      else
44498
44499  # cups is for example mymodule
44500  # $resource is for example libs/general/libmymod_1_2_3.zip
44501  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44502  # $with_builddeps_dir is for example /localhome/builddeps
44503  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44504  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44505  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44506  filename=`basename $resource`
44507  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44508  filebase=${filename%%.*}
44509  extension=${filename#*.}
44510  installdir=$with_builddeps_dir/$filebase
44511  if test ! -f $installdir/$filename.unpacked; then
44512    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44513$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44514    if test ! -d $installdir; then
44515      mkdir -p $installdir
44516    fi
44517    if test ! -d $installdir; then
44518      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44519    fi
44520    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44521    touch $tmpfile
44522    if test ! -f $tmpfile; then
44523      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44524    fi
44525
44526  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44527  # $tmpfile is the local file name for the downloaded file.
44528  VALID_TOOL=no
44529  if test "x$BDEPS_FTP" = xwget; then
44530    VALID_TOOL=yes
44531    wget -O $tmpfile $with_builddeps_server/$resource
44532  fi
44533  if test "x$BDEPS_FTP" = xlftp; then
44534    VALID_TOOL=yes
44535    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44536  fi
44537  if test "x$BDEPS_FTP" = xftp; then
44538    VALID_TOOL=yes
44539    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44540    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44541    FTPUSERPWD=${FTPSERVER%%@*}
44542    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44543      FTPUSER=${userpwd%%:*}
44544      FTPPWD=${userpwd#*@}
44545      FTPSERVER=${FTPSERVER#*@}
44546    else
44547      FTPUSER=ftp
44548      FTPPWD=ftp
44549    fi
44550    # the "pass" command does not work on some
44551    # ftp clients (read ftp.exe) but if it works,
44552    # passive mode is better!
44553    ( \
44554        echo "user $FTPUSER $FTPPWD"        ; \
44555        echo "pass"                         ; \
44556        echo "bin"                          ; \
44557        echo "get $FTPPATH $tmpfile"              ; \
44558    ) | ftp -in $FTPSERVER
44559  fi
44560  if test "x$VALID_TOOL" != xyes; then
44561    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44562  fi
44563
44564    mv $tmpfile $installdir/$filename
44565    if test ! -s $installdir/$filename; then
44566      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44567    fi
44568    case "$extension" in
44569      zip)  echo "Unzipping $installdir/$filename..."
44570        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44571        ;;
44572      tar.gz) echo "Untaring $installdir/$filename..."
44573        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44574        ;;
44575      tgz) echo "Untaring $installdir/$filename..."
44576        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44577        ;;
44578      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44579        ;;
44580    esac
44581  fi
44582  if test -f $installdir/$filename.unpacked; then
44583    depdir=$installdir
44584  fi
44585
44586      fi
44587      # Source the builddeps file again, because in the previous command, the depdir
44588      # was updated to point at the current build dependency install directory.
44589      . $builddepsfile
44590      # Now extract variables from the builddeps.conf files.
44591      theroot=${builddep_cups_ROOT}
44592      thecflags=${builddep_cups_CFLAGS}
44593      thelibs=${builddep_cups_LIBS}
44594      if test "x$depdir" = x; then
44595        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44596      fi
44597      CUPS=$depdir
44598      if test "x$theroot" != x; then
44599        CUPS="$theroot"
44600      fi
44601      if test "x$thecflags" != x; then
44602        CUPS_CFLAGS="$thecflags"
44603      fi
44604      if test "x$thelibs" != x; then
44605        CUPS_LIBS="$thelibs"
44606      fi
44607      CUPS_FOUND=yes
44608
44609    fi
44610
44611  fi
44612
44613    fi
44614    if test "x$CUPS_FOUND" = xno; then
44615      # Are the cups headers installed in the default /usr/include location?
44616      for ac_header in cups/cups.h cups/ppd.h
44617do :
44618  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44619ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44620if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44621  cat >>confdefs.h <<_ACEOF
44622#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44623_ACEOF
44624
44625            CUPS_FOUND=yes
44626            CUPS_CFLAGS=
44627            DEFAULT_CUPS=yes
44628
44629
44630fi
44631
44632done
44633
44634    fi
44635    if test "x$CUPS_FOUND" = xno; then
44636      # Getting nervous now? Lets poke around for standard Solaris third-party
44637      # package installation locations.
44638      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44639$as_echo_n "checking for cups headers... " >&6; }
44640      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44641        # An SFW package seems to be installed!
44642        CUPS_FOUND=yes
44643        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44644      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44645        # A CSW package seems to be installed!
44646        CUPS_FOUND=yes
44647        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44648      fi
44649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44650$as_echo "$CUPS_FOUND" >&6; }
44651    fi
44652    if test "x$CUPS_FOUND" = xno; then
44653
44654  # Print a helpful message on how to acquire the necessary build dependency.
44655  # cups is the help tag: freetype, cups, pulse, alsa etc
44656  MISSING_DEPENDENCY=cups
44657
44658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44659    cygwin_help $MISSING_DEPENDENCY
44660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44661    msys_help $MISSING_DEPENDENCY
44662  else
44663    PKGHANDLER_COMMAND=
44664
44665    case $PKGHANDLER in
44666      apt-get)
44667        apt_help     $MISSING_DEPENDENCY ;;
44668      yum)
44669        yum_help     $MISSING_DEPENDENCY ;;
44670      port)
44671        port_help    $MISSING_DEPENDENCY ;;
44672      pkgutil)
44673        pkgutil_help $MISSING_DEPENDENCY ;;
44674      pkgadd)
44675        pkgadd_help  $MISSING_DEPENDENCY ;;
44676    esac
44677
44678    if test "x$PKGHANDLER_COMMAND" != x; then
44679      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44680    fi
44681  fi
44682
44683      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44684    fi
44685  fi
44686
44687
44688
44689
44690
44691
44692  ###############################################################################
44693  #
44694  # The ubiquitous freetype library is used to render fonts.
44695  #
44696
44697# Check whether --with-freetype was given.
44698if test "${with_freetype+set}" = set; then :
44699  withval=$with_freetype;
44700fi
44701
44702
44703# Check whether --with-freetype-include was given.
44704if test "${with_freetype_include+set}" = set; then :
44705  withval=$with_freetype_include;
44706fi
44707
44708
44709# Check whether --with-freetype-lib was given.
44710if test "${with_freetype_lib+set}" = set; then :
44711  withval=$with_freetype_lib;
44712fi
44713
44714
44715# Check whether --with-freetype-src was given.
44716if test "${with_freetype_src+set}" = set; then :
44717  withval=$with_freetype_src;
44718fi
44719
44720  # Check whether --enable-freetype-bundling was given.
44721if test "${enable_freetype_bundling+set}" = set; then :
44722  enableval=$enable_freetype_bundling;
44723fi
44724
44725
44726  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44727  FREETYPE_BASE_NAME=freetype
44728  FREETYPE_CFLAGS=
44729  FREETYPE_LIBS=
44730  FREETYPE_BUNDLE_LIB_PATH=
44731
44732  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44733    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
44734      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44735$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44736    fi
44737    if test "x$enable_freetype_bundling" != x; then
44738      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44739$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44740    fi
44741  else
44742    # freetype is needed to build; go get it!
44743
44744    BUNDLE_FREETYPE="$enable_freetype_bundling"
44745
44746    if  test "x$with_freetype_src" != x; then
44747      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44748        # Try to build freetype if --with-freetype-src was given on Windows
44749
44750  FREETYPE_SRC_PATH="$with_freetype_src"
44751  BUILD_FREETYPE=yes
44752
44753  # Check if the freetype sources are acessible..
44754  if ! test -d $FREETYPE_SRC_PATH; then
44755    { $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
44756$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44757    BUILD_FREETYPE=no
44758  fi
44759  # ..and contain a vc2010 project file
44760  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44761  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44762    { $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
44763$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44764    BUILD_FREETYPE=no
44765  fi
44766  # Now check if configure found a version of 'msbuild.exe'
44767  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44768    { $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
44769$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;}
44770    BUILD_FREETYPE=no
44771  fi
44772
44773  # Ready to go..
44774  if test "x$BUILD_FREETYPE" = xyes; then
44775
44776    # msbuild requires trailing slashes for output directories
44777    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44778    freetype_lib_path_unix="$freetype_lib_path"
44779    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44780
44781  unix_path="$vcxproj_path"
44782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44783    windows_path=`$CYGPATH -m "$unix_path"`
44784    vcxproj_path="$windows_path"
44785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44786    windows_path=`cmd //c echo $unix_path`
44787    vcxproj_path="$windows_path"
44788  fi
44789
44790
44791  unix_path="$freetype_lib_path"
44792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44793    windows_path=`$CYGPATH -m "$unix_path"`
44794    freetype_lib_path="$windows_path"
44795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44796    windows_path=`cmd //c echo $unix_path`
44797    freetype_lib_path="$windows_path"
44798  fi
44799
44800
44801  unix_path="$freetype_obj_path"
44802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44803    windows_path=`$CYGPATH -m "$unix_path"`
44804    freetype_obj_path="$windows_path"
44805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44806    windows_path=`cmd //c echo $unix_path`
44807    freetype_obj_path="$windows_path"
44808  fi
44809
44810    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44811      freetype_platform=x64
44812    else
44813      freetype_platform=win32
44814    fi
44815
44816    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44817    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44818    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44819    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44820    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44821$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44822
44823    # First we try to build the freetype.dll
44824    $ECHO -e "@echo off\n"\
44825	     "$MSBUILD $vcxproj_path "\
44826		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44827		       "/p:Configuration=\"Release Multithreaded\" "\
44828		       "/p:Platform=$freetype_platform "\
44829		       "/p:ConfigurationType=DynamicLibrary "\
44830		       "/p:TargetName=freetype "\
44831		       "/p:OutDir=\"$freetype_lib_path\" "\
44832		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44833    cmd /c freetype.bat
44834
44835    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44836      # If that succeeds we also build freetype.lib
44837      $ECHO -e "@echo off\n"\
44838	       "$MSBUILD $vcxproj_path "\
44839			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44840			 "/p:Configuration=\"Release Multithreaded\" "\
44841			 "/p:Platform=$freetype_platform "\
44842			 "/p:ConfigurationType=StaticLibrary "\
44843			 "/p:TargetName=freetype "\
44844			 "/p:OutDir=\"$freetype_lib_path\" "\
44845			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44846      cmd /c freetype.bat
44847
44848      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44849	# Once we build both, lib and dll, set freetype lib and include path appropriately
44850	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44851	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44852	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44853$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44854      else
44855	BUILD_FREETYPE=no
44856      fi
44857    else
44858      BUILD_FREETYPE=no
44859    fi
44860  fi
44861
44862        if test "x$BUILD_FREETYPE" = xyes; then
44863          # Okay, we built it. Check that it works.
44864
44865  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44866  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44867  METHOD="--with-freetype-src"
44868
44869  # Let's start with an optimistic view of the world :-)
44870  FOUND_FREETYPE=yes
44871
44872  # First look for the canonical freetype main include file ft2build.h.
44873  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44874    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44875    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44876    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44877      # Fail.
44878      FOUND_FREETYPE=no
44879    fi
44880  fi
44881
44882  if test "x$FOUND_FREETYPE" = xyes; then
44883    # Include file found, let's continue the sanity check.
44884    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44885$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44886
44887    # Reset to default value
44888    FREETYPE_BASE_NAME=freetype
44889    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44890    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44891      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44892          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44893        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44894        # for the .6 version explicitly.
44895        FREETYPE_BASE_NAME=freetype.6
44896        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44897        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44898$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44899      else
44900        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44901$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44902        FOUND_FREETYPE=no
44903      fi
44904    else
44905      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44906        # On Windows, we will need both .lib and .dll file.
44907        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44908          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44909$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44910          FOUND_FREETYPE=no
44911        fi
44912      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44913          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44914        # Found lib in isa dir, use that instead.
44915        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44916        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44917$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44918      fi
44919    fi
44920  fi
44921
44922  if test "x$FOUND_FREETYPE" = xyes; then
44923
44924  # Only process if variable expands to non-empty
44925
44926  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44928
44929  # Input might be given as Windows format, start by converting to
44930  # unix format.
44931  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44932  new_path=`$CYGPATH -u "$path"`
44933
44934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44937  # "foo.exe" is OK but "foo" is an error.
44938  #
44939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44940  # It is also a way to make sure we got the proper file name for the real test later on.
44941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44942  if test "x$test_shortpath" = x; then
44943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44945    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44946  fi
44947
44948  # Call helper function which possibly converts this using DOS-style short mode.
44949  # If so, the updated path is stored in $new_path.
44950
44951  input_path="$new_path"
44952  # Check if we need to convert this using DOS-style short mode. If the path
44953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44954  # take no chances and rewrite it.
44955  # Note: m4 eats our [], so we need to use [ and ] instead.
44956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44957  if test "x$has_forbidden_chars" != x; then
44958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44962      # Going to short mode and back again did indeed matter. Since short mode is
44963      # case insensitive, let's make it lowercase to improve readability.
44964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44965      # Now convert it back to Unix-style (cygpath)
44966      input_path=`$CYGPATH -u "$shortmode_path"`
44967      new_path="$input_path"
44968    fi
44969  fi
44970
44971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44972  if test "x$test_cygdrive_prefix" = x; then
44973    # As a simple fix, exclude /usr/bin since it's not a real path.
44974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44976      # a path prefixed by /cygdrive for fixpath to work.
44977      new_path="$CYGWIN_ROOT_PATH$input_path"
44978    fi
44979  fi
44980
44981
44982  if test "x$path" != "x$new_path"; then
44983    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44985$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44986  fi
44987
44988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44989
44990  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44991  has_colon=`$ECHO $path | $GREP ^.:`
44992  new_path="$path"
44993  if test "x$has_colon" = x; then
44994    # Not in mixed or Windows style, start by that.
44995    new_path=`cmd //c echo $path`
44996  fi
44997
44998
44999  input_path="$new_path"
45000  # Check if we need to convert this using DOS-style short mode. If the path
45001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45002  # take no chances and rewrite it.
45003  # Note: m4 eats our [], so we need to use [ and ] instead.
45004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45005  if test "x$has_forbidden_chars" != x; then
45006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45008  fi
45009
45010
45011  windows_path="$new_path"
45012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45013    unix_path=`$CYGPATH -u "$windows_path"`
45014    new_path="$unix_path"
45015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45017    new_path="$unix_path"
45018  fi
45019
45020  if test "x$path" != "x$new_path"; then
45021    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45023$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45024  fi
45025
45026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45028
45029    else
45030      # We're on a unix platform. Hooray! :)
45031      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45032      has_space=`$ECHO "$path" | $GREP " "`
45033      if test "x$has_space" != x; then
45034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45035$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45037      fi
45038
45039      # Use eval to expand a potential ~
45040      eval path="$path"
45041      if test ! -f "$path" && test ! -d "$path"; then
45042        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45043      fi
45044
45045      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45046    fi
45047  fi
45048
45049
45050  # Only process if variable expands to non-empty
45051
45052  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45054
45055  # Input might be given as Windows format, start by converting to
45056  # unix format.
45057  path="$POTENTIAL_FREETYPE_LIB_PATH"
45058  new_path=`$CYGPATH -u "$path"`
45059
45060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45063  # "foo.exe" is OK but "foo" is an error.
45064  #
45065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45066  # It is also a way to make sure we got the proper file name for the real test later on.
45067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45068  if test "x$test_shortpath" = x; then
45069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45071    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45072  fi
45073
45074  # Call helper function which possibly converts this using DOS-style short mode.
45075  # If so, the updated path is stored in $new_path.
45076
45077  input_path="$new_path"
45078  # Check if we need to convert this using DOS-style short mode. If the path
45079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45080  # take no chances and rewrite it.
45081  # Note: m4 eats our [], so we need to use [ and ] instead.
45082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45083  if test "x$has_forbidden_chars" != x; then
45084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45088      # Going to short mode and back again did indeed matter. Since short mode is
45089      # case insensitive, let's make it lowercase to improve readability.
45090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45091      # Now convert it back to Unix-style (cygpath)
45092      input_path=`$CYGPATH -u "$shortmode_path"`
45093      new_path="$input_path"
45094    fi
45095  fi
45096
45097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45098  if test "x$test_cygdrive_prefix" = x; then
45099    # As a simple fix, exclude /usr/bin since it's not a real path.
45100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45102      # a path prefixed by /cygdrive for fixpath to work.
45103      new_path="$CYGWIN_ROOT_PATH$input_path"
45104    fi
45105  fi
45106
45107
45108  if test "x$path" != "x$new_path"; then
45109    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45111$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45112  fi
45113
45114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45115
45116  path="$POTENTIAL_FREETYPE_LIB_PATH"
45117  has_colon=`$ECHO $path | $GREP ^.:`
45118  new_path="$path"
45119  if test "x$has_colon" = x; then
45120    # Not in mixed or Windows style, start by that.
45121    new_path=`cmd //c echo $path`
45122  fi
45123
45124
45125  input_path="$new_path"
45126  # Check if we need to convert this using DOS-style short mode. If the path
45127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45128  # take no chances and rewrite it.
45129  # Note: m4 eats our [], so we need to use [ and ] instead.
45130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45131  if test "x$has_forbidden_chars" != x; then
45132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45134  fi
45135
45136
45137  windows_path="$new_path"
45138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45139    unix_path=`$CYGPATH -u "$windows_path"`
45140    new_path="$unix_path"
45141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45143    new_path="$unix_path"
45144  fi
45145
45146  if test "x$path" != "x$new_path"; then
45147    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45150  fi
45151
45152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45154
45155    else
45156      # We're on a unix platform. Hooray! :)
45157      path="$POTENTIAL_FREETYPE_LIB_PATH"
45158      has_space=`$ECHO "$path" | $GREP " "`
45159      if test "x$has_space" != x; then
45160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45162        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45163      fi
45164
45165      # Use eval to expand a potential ~
45166      eval path="$path"
45167      if test ! -f "$path" && test ! -d "$path"; then
45168        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45169      fi
45170
45171      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45172    fi
45173  fi
45174
45175
45176    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45178$as_echo_n "checking for freetype includes... " >&6; }
45179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45180$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45181    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45183$as_echo_n "checking for freetype libraries... " >&6; }
45184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45185$as_echo "$FREETYPE_LIB_PATH" >&6; }
45186  fi
45187
45188          if test "x$FOUND_FREETYPE" != xyes; then
45189            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45190          fi
45191        else
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45193$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45194          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45195        fi
45196      else
45197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45198$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45199      fi
45200    fi
45201
45202    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45203      # User has specified settings
45204
45205      if test "x$BUNDLE_FREETYPE" = x; then
45206        # If not specified, default is to bundle freetype
45207        BUNDLE_FREETYPE=yes
45208      fi
45209
45210      if test "x$with_freetype" != x; then
45211        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45212        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45213      fi
45214
45215      # Allow --with-freetype-lib and --with-freetype-include to override
45216      if test "x$with_freetype_include" != x; then
45217        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45218      fi
45219      if test "x$with_freetype_lib" != x; then
45220        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45221      fi
45222
45223      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45224        # Okay, we got it. Check that it works.
45225
45226  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45227  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45228  METHOD="--with-freetype"
45229
45230  # Let's start with an optimistic view of the world :-)
45231  FOUND_FREETYPE=yes
45232
45233  # First look for the canonical freetype main include file ft2build.h.
45234  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45235    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45236    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45237    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45238      # Fail.
45239      FOUND_FREETYPE=no
45240    fi
45241  fi
45242
45243  if test "x$FOUND_FREETYPE" = xyes; then
45244    # Include file found, let's continue the sanity check.
45245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45246$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45247
45248    # Reset to default value
45249    FREETYPE_BASE_NAME=freetype
45250    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45251    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45252      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45253          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45254        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45255        # for the .6 version explicitly.
45256        FREETYPE_BASE_NAME=freetype.6
45257        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45258        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45259$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45260      else
45261        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45262$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45263        FOUND_FREETYPE=no
45264      fi
45265    else
45266      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45267        # On Windows, we will need both .lib and .dll file.
45268        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45269          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45270$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45271          FOUND_FREETYPE=no
45272        fi
45273      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45274          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45275        # Found lib in isa dir, use that instead.
45276        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45277        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45278$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45279      fi
45280    fi
45281  fi
45282
45283  if test "x$FOUND_FREETYPE" = xyes; then
45284
45285  # Only process if variable expands to non-empty
45286
45287  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45289
45290  # Input might be given as Windows format, start by converting to
45291  # unix format.
45292  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45293  new_path=`$CYGPATH -u "$path"`
45294
45295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45298  # "foo.exe" is OK but "foo" is an error.
45299  #
45300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45301  # It is also a way to make sure we got the proper file name for the real test later on.
45302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45303  if test "x$test_shortpath" = x; then
45304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45306    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45307  fi
45308
45309  # Call helper function which possibly converts this using DOS-style short mode.
45310  # If so, the updated path is stored in $new_path.
45311
45312  input_path="$new_path"
45313  # Check if we need to convert this using DOS-style short mode. If the path
45314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45315  # take no chances and rewrite it.
45316  # Note: m4 eats our [], so we need to use [ and ] instead.
45317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45318  if test "x$has_forbidden_chars" != x; then
45319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45323      # Going to short mode and back again did indeed matter. Since short mode is
45324      # case insensitive, let's make it lowercase to improve readability.
45325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45326      # Now convert it back to Unix-style (cygpath)
45327      input_path=`$CYGPATH -u "$shortmode_path"`
45328      new_path="$input_path"
45329    fi
45330  fi
45331
45332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45333  if test "x$test_cygdrive_prefix" = x; then
45334    # As a simple fix, exclude /usr/bin since it's not a real path.
45335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45337      # a path prefixed by /cygdrive for fixpath to work.
45338      new_path="$CYGWIN_ROOT_PATH$input_path"
45339    fi
45340  fi
45341
45342
45343  if test "x$path" != "x$new_path"; then
45344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45347  fi
45348
45349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45350
45351  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45352  has_colon=`$ECHO $path | $GREP ^.:`
45353  new_path="$path"
45354  if test "x$has_colon" = x; then
45355    # Not in mixed or Windows style, start by that.
45356    new_path=`cmd //c echo $path`
45357  fi
45358
45359
45360  input_path="$new_path"
45361  # Check if we need to convert this using DOS-style short mode. If the path
45362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45363  # take no chances and rewrite it.
45364  # Note: m4 eats our [], so we need to use [ and ] instead.
45365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45366  if test "x$has_forbidden_chars" != x; then
45367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45369  fi
45370
45371
45372  windows_path="$new_path"
45373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45374    unix_path=`$CYGPATH -u "$windows_path"`
45375    new_path="$unix_path"
45376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45378    new_path="$unix_path"
45379  fi
45380
45381  if test "x$path" != "x$new_path"; then
45382    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45385  fi
45386
45387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45389
45390    else
45391      # We're on a unix platform. Hooray! :)
45392      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45393      has_space=`$ECHO "$path" | $GREP " "`
45394      if test "x$has_space" != x; then
45395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45398      fi
45399
45400      # Use eval to expand a potential ~
45401      eval path="$path"
45402      if test ! -f "$path" && test ! -d "$path"; then
45403        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45404      fi
45405
45406      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45407    fi
45408  fi
45409
45410
45411  # Only process if variable expands to non-empty
45412
45413  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45415
45416  # Input might be given as Windows format, start by converting to
45417  # unix format.
45418  path="$POTENTIAL_FREETYPE_LIB_PATH"
45419  new_path=`$CYGPATH -u "$path"`
45420
45421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45424  # "foo.exe" is OK but "foo" is an error.
45425  #
45426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45427  # It is also a way to make sure we got the proper file name for the real test later on.
45428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45429  if test "x$test_shortpath" = x; then
45430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45433  fi
45434
45435  # Call helper function which possibly converts this using DOS-style short mode.
45436  # If so, the updated path is stored in $new_path.
45437
45438  input_path="$new_path"
45439  # Check if we need to convert this using DOS-style short mode. If the path
45440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45441  # take no chances and rewrite it.
45442  # Note: m4 eats our [], so we need to use [ and ] instead.
45443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45444  if test "x$has_forbidden_chars" != x; then
45445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45449      # Going to short mode and back again did indeed matter. Since short mode is
45450      # case insensitive, let's make it lowercase to improve readability.
45451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45452      # Now convert it back to Unix-style (cygpath)
45453      input_path=`$CYGPATH -u "$shortmode_path"`
45454      new_path="$input_path"
45455    fi
45456  fi
45457
45458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45459  if test "x$test_cygdrive_prefix" = x; then
45460    # As a simple fix, exclude /usr/bin since it's not a real path.
45461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45463      # a path prefixed by /cygdrive for fixpath to work.
45464      new_path="$CYGWIN_ROOT_PATH$input_path"
45465    fi
45466  fi
45467
45468
45469  if test "x$path" != "x$new_path"; then
45470    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45473  fi
45474
45475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45476
45477  path="$POTENTIAL_FREETYPE_LIB_PATH"
45478  has_colon=`$ECHO $path | $GREP ^.:`
45479  new_path="$path"
45480  if test "x$has_colon" = x; then
45481    # Not in mixed or Windows style, start by that.
45482    new_path=`cmd //c echo $path`
45483  fi
45484
45485
45486  input_path="$new_path"
45487  # Check if we need to convert this using DOS-style short mode. If the path
45488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45489  # take no chances and rewrite it.
45490  # Note: m4 eats our [], so we need to use [ and ] instead.
45491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45492  if test "x$has_forbidden_chars" != x; then
45493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45495  fi
45496
45497
45498  windows_path="$new_path"
45499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45500    unix_path=`$CYGPATH -u "$windows_path"`
45501    new_path="$unix_path"
45502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45504    new_path="$unix_path"
45505  fi
45506
45507  if test "x$path" != "x$new_path"; then
45508    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45511  fi
45512
45513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45515
45516    else
45517      # We're on a unix platform. Hooray! :)
45518      path="$POTENTIAL_FREETYPE_LIB_PATH"
45519      has_space=`$ECHO "$path" | $GREP " "`
45520      if test "x$has_space" != x; then
45521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45524      fi
45525
45526      # Use eval to expand a potential ~
45527      eval path="$path"
45528      if test ! -f "$path" && test ! -d "$path"; then
45529        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45530      fi
45531
45532      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45533    fi
45534  fi
45535
45536
45537    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45539$as_echo_n "checking for freetype includes... " >&6; }
45540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45541$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45542    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45544$as_echo_n "checking for freetype libraries... " >&6; }
45545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45546$as_echo "$FREETYPE_LIB_PATH" >&6; }
45547  fi
45548
45549        if test "x$FOUND_FREETYPE" != xyes; then
45550          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45551        fi
45552      else
45553        # User specified only one of lib or include. This is an error.
45554        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45555          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45556$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45557          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45558        else
45559          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45560$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45561          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45562        fi
45563      fi
45564    else
45565      # User did not specify settings, but we need freetype. Try to locate it.
45566
45567      if test "x$BUNDLE_FREETYPE" = x; then
45568        # If not specified, default is to bundle freetype only on windows
45569        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45570          BUNDLE_FREETYPE=yes
45571        else
45572          BUNDLE_FREETYPE=no
45573        fi
45574      fi
45575
45576      if test "x$FOUND_FREETYPE" != xyes; then
45577        # Check builddeps
45578
45579
45580  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45581    # Source the builddeps file again, to make sure it uses the latest variables!
45582    . $builddepsfile
45583    # Look for a target and build machine specific resource!
45584    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45585    if test "x$resource" = x; then
45586      # Ok, lets instead look for a target specific resource
45587      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45588    fi
45589    if test "x$resource" = x; then
45590      # Ok, lets instead look for a build specific resource
45591      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45592    fi
45593    if test "x$resource" = x; then
45594      # Ok, lets instead look for a generic resource
45595      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45596      resource=${builddep_freetype2}
45597    fi
45598    if test "x$resource" != x; then
45599      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45600$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45601      # If the resource in the builddeps.conf file is an existing directory,
45602      # for example /java/linux/cups
45603      if test -d ${resource}; then
45604        depdir=${resource}
45605      else
45606
45607  # freetype2 is for example mymodule
45608  # $resource is for example libs/general/libmymod_1_2_3.zip
45609  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45610  # $with_builddeps_dir is for example /localhome/builddeps
45611  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45612  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45613  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45614  filename=`basename $resource`
45615  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45616  filebase=${filename%%.*}
45617  extension=${filename#*.}
45618  installdir=$with_builddeps_dir/$filebase
45619  if test ! -f $installdir/$filename.unpacked; then
45620    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45621$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45622    if test ! -d $installdir; then
45623      mkdir -p $installdir
45624    fi
45625    if test ! -d $installdir; then
45626      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45627    fi
45628    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45629    touch $tmpfile
45630    if test ! -f $tmpfile; then
45631      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45632    fi
45633
45634  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45635  # $tmpfile is the local file name for the downloaded file.
45636  VALID_TOOL=no
45637  if test "x$BDEPS_FTP" = xwget; then
45638    VALID_TOOL=yes
45639    wget -O $tmpfile $with_builddeps_server/$resource
45640  fi
45641  if test "x$BDEPS_FTP" = xlftp; then
45642    VALID_TOOL=yes
45643    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45644  fi
45645  if test "x$BDEPS_FTP" = xftp; then
45646    VALID_TOOL=yes
45647    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45648    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45649    FTPUSERPWD=${FTPSERVER%%@*}
45650    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45651      FTPUSER=${userpwd%%:*}
45652      FTPPWD=${userpwd#*@}
45653      FTPSERVER=${FTPSERVER#*@}
45654    else
45655      FTPUSER=ftp
45656      FTPPWD=ftp
45657    fi
45658    # the "pass" command does not work on some
45659    # ftp clients (read ftp.exe) but if it works,
45660    # passive mode is better!
45661    ( \
45662        echo "user $FTPUSER $FTPPWD"        ; \
45663        echo "pass"                         ; \
45664        echo "bin"                          ; \
45665        echo "get $FTPPATH $tmpfile"              ; \
45666    ) | ftp -in $FTPSERVER
45667  fi
45668  if test "x$VALID_TOOL" != xyes; then
45669    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45670  fi
45671
45672    mv $tmpfile $installdir/$filename
45673    if test ! -s $installdir/$filename; then
45674      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45675    fi
45676    case "$extension" in
45677      zip)  echo "Unzipping $installdir/$filename..."
45678        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45679        ;;
45680      tar.gz) echo "Untaring $installdir/$filename..."
45681        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45682        ;;
45683      tgz) echo "Untaring $installdir/$filename..."
45684        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45685        ;;
45686      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45687        ;;
45688    esac
45689  fi
45690  if test -f $installdir/$filename.unpacked; then
45691    depdir=$installdir
45692  fi
45693
45694      fi
45695      # Source the builddeps file again, because in the previous command, the depdir
45696      # was updated to point at the current build dependency install directory.
45697      . $builddepsfile
45698      # Now extract variables from the builddeps.conf files.
45699      theroot=${builddep_freetype2_ROOT}
45700      thecflags=${builddep_freetype2_CFLAGS}
45701      thelibs=${builddep_freetype2_LIBS}
45702      if test "x$depdir" = x; then
45703        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45704      fi
45705      FREETYPE=$depdir
45706      if test "x$theroot" != x; then
45707        FREETYPE="$theroot"
45708      fi
45709      if test "x$thecflags" != x; then
45710        FREETYPE_CFLAGS="$thecflags"
45711      fi
45712      if test "x$thelibs" != x; then
45713        FREETYPE_LIBS="$thelibs"
45714      fi
45715      FOUND_FREETYPE=yes
45716      else FOUND_FREETYPE=no
45717
45718    fi
45719    else FOUND_FREETYPE=no
45720
45721  fi
45722
45723        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45724        if test "x$FOUND_FREETYPE" = xyes; then
45725          if test "x$BUNDLE_FREETYPE" = xyes; then
45726            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45727$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45728            FOUND_FREETYPE=no
45729          else
45730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45731$as_echo_n "checking for freetype... " >&6; }
45732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45733$as_echo "yes (using builddeps)" >&6; }
45734          fi
45735        fi
45736      fi
45737
45738      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45739      if test "x$SYSROOT" = x; then
45740        if test "x$FOUND_FREETYPE" != xyes; then
45741          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45742          if test "x$PKG_CONFIG" != x; then
45743
45744pkg_failed=no
45745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45746$as_echo_n "checking for FREETYPE... " >&6; }
45747
45748if test -n "$FREETYPE_CFLAGS"; then
45749    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45750 elif test -n "$PKG_CONFIG"; then
45751    if test -n "$PKG_CONFIG" && \
45752    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45753  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45754  ac_status=$?
45755  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45756  test $ac_status = 0; }; then
45757  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45758else
45759  pkg_failed=yes
45760fi
45761 else
45762    pkg_failed=untried
45763fi
45764if test -n "$FREETYPE_LIBS"; then
45765    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45766 elif test -n "$PKG_CONFIG"; then
45767    if test -n "$PKG_CONFIG" && \
45768    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45769  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45770  ac_status=$?
45771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45772  test $ac_status = 0; }; then
45773  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45774else
45775  pkg_failed=yes
45776fi
45777 else
45778    pkg_failed=untried
45779fi
45780
45781
45782
45783if test $pkg_failed = yes; then
45784
45785if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45786        _pkg_short_errors_supported=yes
45787else
45788        _pkg_short_errors_supported=no
45789fi
45790        if test $_pkg_short_errors_supported = yes; then
45791	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45792        else
45793	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45794        fi
45795	# Put the nasty error message in config.log where it belongs
45796	echo "$FREETYPE_PKG_ERRORS" >&5
45797
45798	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45799$as_echo "no" >&6; }
45800                FOUND_FREETYPE=no
45801elif test $pkg_failed = untried; then
45802	FOUND_FREETYPE=no
45803else
45804	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45805	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45807$as_echo "yes" >&6; }
45808	FOUND_FREETYPE=yes
45809fi
45810            if test "x$FOUND_FREETYPE" = xyes; then
45811              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45812              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45813              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45814              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45815                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45816              fi
45817              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45818              if test "x$BUNDLE_FREETYPE" = xyes; then
45819                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45820$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45821                FOUND_FREETYPE=no
45822              else
45823                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45824$as_echo_n "checking for freetype... " >&6; }
45825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45826$as_echo "yes (using pkg-config)" >&6; }
45827              fi
45828            fi
45829          fi
45830        fi
45831      fi
45832
45833      if test "x$FOUND_FREETYPE" != xyes; then
45834        # Check in well-known locations
45835        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45836          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45837
45838  windows_path="$FREETYPE_BASE_DIR"
45839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45840    unix_path=`$CYGPATH -u "$windows_path"`
45841    FREETYPE_BASE_DIR="$unix_path"
45842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45844    FREETYPE_BASE_DIR="$unix_path"
45845  fi
45846
45847
45848  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45849  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45850  METHOD="well-known location"
45851
45852  # Let's start with an optimistic view of the world :-)
45853  FOUND_FREETYPE=yes
45854
45855  # First look for the canonical freetype main include file ft2build.h.
45856  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45857    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45858    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45859    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45860      # Fail.
45861      FOUND_FREETYPE=no
45862    fi
45863  fi
45864
45865  if test "x$FOUND_FREETYPE" = xyes; then
45866    # Include file found, let's continue the sanity check.
45867    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45868$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45869
45870    # Reset to default value
45871    FREETYPE_BASE_NAME=freetype
45872    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45873    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45874      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45875          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45876        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45877        # for the .6 version explicitly.
45878        FREETYPE_BASE_NAME=freetype.6
45879        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45880        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45881$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45882      else
45883        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45884$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45885        FOUND_FREETYPE=no
45886      fi
45887    else
45888      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45889        # On Windows, we will need both .lib and .dll file.
45890        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45891          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45892$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45893          FOUND_FREETYPE=no
45894        fi
45895      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45896          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45897        # Found lib in isa dir, use that instead.
45898        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45899        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45900$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45901      fi
45902    fi
45903  fi
45904
45905  if test "x$FOUND_FREETYPE" = xyes; then
45906
45907  # Only process if variable expands to non-empty
45908
45909  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45911
45912  # Input might be given as Windows format, start by converting to
45913  # unix format.
45914  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45915  new_path=`$CYGPATH -u "$path"`
45916
45917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45920  # "foo.exe" is OK but "foo" is an error.
45921  #
45922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45923  # It is also a way to make sure we got the proper file name for the real test later on.
45924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45925  if test "x$test_shortpath" = x; then
45926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45927$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45928    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45929  fi
45930
45931  # Call helper function which possibly converts this using DOS-style short mode.
45932  # If so, the updated path is stored in $new_path.
45933
45934  input_path="$new_path"
45935  # Check if we need to convert this using DOS-style short mode. If the path
45936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45937  # take no chances and rewrite it.
45938  # Note: m4 eats our [], so we need to use [ and ] instead.
45939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45940  if test "x$has_forbidden_chars" != x; then
45941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45945      # Going to short mode and back again did indeed matter. Since short mode is
45946      # case insensitive, let's make it lowercase to improve readability.
45947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45948      # Now convert it back to Unix-style (cygpath)
45949      input_path=`$CYGPATH -u "$shortmode_path"`
45950      new_path="$input_path"
45951    fi
45952  fi
45953
45954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45955  if test "x$test_cygdrive_prefix" = x; then
45956    # As a simple fix, exclude /usr/bin since it's not a real path.
45957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45959      # a path prefixed by /cygdrive for fixpath to work.
45960      new_path="$CYGWIN_ROOT_PATH$input_path"
45961    fi
45962  fi
45963
45964
45965  if test "x$path" != "x$new_path"; then
45966    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45968$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45969  fi
45970
45971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45972
45973  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45974  has_colon=`$ECHO $path | $GREP ^.:`
45975  new_path="$path"
45976  if test "x$has_colon" = x; then
45977    # Not in mixed or Windows style, start by that.
45978    new_path=`cmd //c echo $path`
45979  fi
45980
45981
45982  input_path="$new_path"
45983  # Check if we need to convert this using DOS-style short mode. If the path
45984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45985  # take no chances and rewrite it.
45986  # Note: m4 eats our [], so we need to use [ and ] instead.
45987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45988  if test "x$has_forbidden_chars" != x; then
45989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45991  fi
45992
45993
45994  windows_path="$new_path"
45995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45996    unix_path=`$CYGPATH -u "$windows_path"`
45997    new_path="$unix_path"
45998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46000    new_path="$unix_path"
46001  fi
46002
46003  if test "x$path" != "x$new_path"; then
46004    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46006$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46007  fi
46008
46009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46011
46012    else
46013      # We're on a unix platform. Hooray! :)
46014      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46015      has_space=`$ECHO "$path" | $GREP " "`
46016      if test "x$has_space" != x; then
46017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46018$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46020      fi
46021
46022      # Use eval to expand a potential ~
46023      eval path="$path"
46024      if test ! -f "$path" && test ! -d "$path"; then
46025        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46026      fi
46027
46028      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46029    fi
46030  fi
46031
46032
46033  # Only process if variable expands to non-empty
46034
46035  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46037
46038  # Input might be given as Windows format, start by converting to
46039  # unix format.
46040  path="$POTENTIAL_FREETYPE_LIB_PATH"
46041  new_path=`$CYGPATH -u "$path"`
46042
46043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46046  # "foo.exe" is OK but "foo" is an error.
46047  #
46048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46049  # It is also a way to make sure we got the proper file name for the real test later on.
46050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46051  if test "x$test_shortpath" = x; then
46052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46053$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46054    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46055  fi
46056
46057  # Call helper function which possibly converts this using DOS-style short mode.
46058  # If so, the updated path is stored in $new_path.
46059
46060  input_path="$new_path"
46061  # Check if we need to convert this using DOS-style short mode. If the path
46062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46063  # take no chances and rewrite it.
46064  # Note: m4 eats our [], so we need to use [ and ] instead.
46065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46066  if test "x$has_forbidden_chars" != x; then
46067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46071      # Going to short mode and back again did indeed matter. Since short mode is
46072      # case insensitive, let's make it lowercase to improve readability.
46073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46074      # Now convert it back to Unix-style (cygpath)
46075      input_path=`$CYGPATH -u "$shortmode_path"`
46076      new_path="$input_path"
46077    fi
46078  fi
46079
46080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46081  if test "x$test_cygdrive_prefix" = x; then
46082    # As a simple fix, exclude /usr/bin since it's not a real path.
46083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46085      # a path prefixed by /cygdrive for fixpath to work.
46086      new_path="$CYGWIN_ROOT_PATH$input_path"
46087    fi
46088  fi
46089
46090
46091  if test "x$path" != "x$new_path"; then
46092    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46095  fi
46096
46097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46098
46099  path="$POTENTIAL_FREETYPE_LIB_PATH"
46100  has_colon=`$ECHO $path | $GREP ^.:`
46101  new_path="$path"
46102  if test "x$has_colon" = x; then
46103    # Not in mixed or Windows style, start by that.
46104    new_path=`cmd //c echo $path`
46105  fi
46106
46107
46108  input_path="$new_path"
46109  # Check if we need to convert this using DOS-style short mode. If the path
46110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46111  # take no chances and rewrite it.
46112  # Note: m4 eats our [], so we need to use [ and ] instead.
46113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46114  if test "x$has_forbidden_chars" != x; then
46115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46117  fi
46118
46119
46120  windows_path="$new_path"
46121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46122    unix_path=`$CYGPATH -u "$windows_path"`
46123    new_path="$unix_path"
46124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46126    new_path="$unix_path"
46127  fi
46128
46129  if test "x$path" != "x$new_path"; then
46130    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46133  fi
46134
46135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46137
46138    else
46139      # We're on a unix platform. Hooray! :)
46140      path="$POTENTIAL_FREETYPE_LIB_PATH"
46141      has_space=`$ECHO "$path" | $GREP " "`
46142      if test "x$has_space" != x; then
46143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46144$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46146      fi
46147
46148      # Use eval to expand a potential ~
46149      eval path="$path"
46150      if test ! -f "$path" && test ! -d "$path"; then
46151        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46152      fi
46153
46154      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46155    fi
46156  fi
46157
46158
46159    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46161$as_echo_n "checking for freetype includes... " >&6; }
46162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46163$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46164    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46166$as_echo_n "checking for freetype libraries... " >&6; }
46167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46168$as_echo "$FREETYPE_LIB_PATH" >&6; }
46169  fi
46170
46171          if test "x$FOUND_FREETYPE" != xyes; then
46172            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
46173
46174  windows_path="$FREETYPE_BASE_DIR"
46175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46176    unix_path=`$CYGPATH -u "$windows_path"`
46177    FREETYPE_BASE_DIR="$unix_path"
46178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46180    FREETYPE_BASE_DIR="$unix_path"
46181  fi
46182
46183
46184  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46185  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46186  METHOD="well-known location"
46187
46188  # Let's start with an optimistic view of the world :-)
46189  FOUND_FREETYPE=yes
46190
46191  # First look for the canonical freetype main include file ft2build.h.
46192  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46193    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46194    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46195    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46196      # Fail.
46197      FOUND_FREETYPE=no
46198    fi
46199  fi
46200
46201  if test "x$FOUND_FREETYPE" = xyes; then
46202    # Include file found, let's continue the sanity check.
46203    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46204$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46205
46206    # Reset to default value
46207    FREETYPE_BASE_NAME=freetype
46208    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46209    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46210      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46211          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46212        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46213        # for the .6 version explicitly.
46214        FREETYPE_BASE_NAME=freetype.6
46215        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46216        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46217$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46218      else
46219        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46220$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46221        FOUND_FREETYPE=no
46222      fi
46223    else
46224      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46225        # On Windows, we will need both .lib and .dll file.
46226        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46227          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46228$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46229          FOUND_FREETYPE=no
46230        fi
46231      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46232          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46233        # Found lib in isa dir, use that instead.
46234        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46235        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46236$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46237      fi
46238    fi
46239  fi
46240
46241  if test "x$FOUND_FREETYPE" = xyes; then
46242
46243  # Only process if variable expands to non-empty
46244
46245  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46247
46248  # Input might be given as Windows format, start by converting to
46249  # unix format.
46250  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46251  new_path=`$CYGPATH -u "$path"`
46252
46253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46256  # "foo.exe" is OK but "foo" is an error.
46257  #
46258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46259  # It is also a way to make sure we got the proper file name for the real test later on.
46260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46261  if test "x$test_shortpath" = x; then
46262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46265  fi
46266
46267  # Call helper function which possibly converts this using DOS-style short mode.
46268  # If so, the updated path is stored in $new_path.
46269
46270  input_path="$new_path"
46271  # Check if we need to convert this using DOS-style short mode. If the path
46272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46273  # take no chances and rewrite it.
46274  # Note: m4 eats our [], so we need to use [ and ] instead.
46275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46276  if test "x$has_forbidden_chars" != x; then
46277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46281      # Going to short mode and back again did indeed matter. Since short mode is
46282      # case insensitive, let's make it lowercase to improve readability.
46283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46284      # Now convert it back to Unix-style (cygpath)
46285      input_path=`$CYGPATH -u "$shortmode_path"`
46286      new_path="$input_path"
46287    fi
46288  fi
46289
46290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46291  if test "x$test_cygdrive_prefix" = x; then
46292    # As a simple fix, exclude /usr/bin since it's not a real path.
46293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46295      # a path prefixed by /cygdrive for fixpath to work.
46296      new_path="$CYGWIN_ROOT_PATH$input_path"
46297    fi
46298  fi
46299
46300
46301  if test "x$path" != "x$new_path"; then
46302    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46305  fi
46306
46307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46308
46309  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46310  has_colon=`$ECHO $path | $GREP ^.:`
46311  new_path="$path"
46312  if test "x$has_colon" = x; then
46313    # Not in mixed or Windows style, start by that.
46314    new_path=`cmd //c echo $path`
46315  fi
46316
46317
46318  input_path="$new_path"
46319  # Check if we need to convert this using DOS-style short mode. If the path
46320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46321  # take no chances and rewrite it.
46322  # Note: m4 eats our [], so we need to use [ and ] instead.
46323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46324  if test "x$has_forbidden_chars" != x; then
46325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46327  fi
46328
46329
46330  windows_path="$new_path"
46331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46332    unix_path=`$CYGPATH -u "$windows_path"`
46333    new_path="$unix_path"
46334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46336    new_path="$unix_path"
46337  fi
46338
46339  if test "x$path" != "x$new_path"; then
46340    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46343  fi
46344
46345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46347
46348    else
46349      # We're on a unix platform. Hooray! :)
46350      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46351      has_space=`$ECHO "$path" | $GREP " "`
46352      if test "x$has_space" != x; then
46353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46356      fi
46357
46358      # Use eval to expand a potential ~
46359      eval path="$path"
46360      if test ! -f "$path" && test ! -d "$path"; then
46361        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46362      fi
46363
46364      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46365    fi
46366  fi
46367
46368
46369  # Only process if variable expands to non-empty
46370
46371  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46373
46374  # Input might be given as Windows format, start by converting to
46375  # unix format.
46376  path="$POTENTIAL_FREETYPE_LIB_PATH"
46377  new_path=`$CYGPATH -u "$path"`
46378
46379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46382  # "foo.exe" is OK but "foo" is an error.
46383  #
46384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46385  # It is also a way to make sure we got the proper file name for the real test later on.
46386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46387  if test "x$test_shortpath" = x; then
46388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46390    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46391  fi
46392
46393  # Call helper function which possibly converts this using DOS-style short mode.
46394  # If so, the updated path is stored in $new_path.
46395
46396  input_path="$new_path"
46397  # Check if we need to convert this using DOS-style short mode. If the path
46398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46399  # take no chances and rewrite it.
46400  # Note: m4 eats our [], so we need to use [ and ] instead.
46401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46402  if test "x$has_forbidden_chars" != x; then
46403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46407      # Going to short mode and back again did indeed matter. Since short mode is
46408      # case insensitive, let's make it lowercase to improve readability.
46409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46410      # Now convert it back to Unix-style (cygpath)
46411      input_path=`$CYGPATH -u "$shortmode_path"`
46412      new_path="$input_path"
46413    fi
46414  fi
46415
46416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46417  if test "x$test_cygdrive_prefix" = x; then
46418    # As a simple fix, exclude /usr/bin since it's not a real path.
46419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46421      # a path prefixed by /cygdrive for fixpath to work.
46422      new_path="$CYGWIN_ROOT_PATH$input_path"
46423    fi
46424  fi
46425
46426
46427  if test "x$path" != "x$new_path"; then
46428    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46431  fi
46432
46433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46434
46435  path="$POTENTIAL_FREETYPE_LIB_PATH"
46436  has_colon=`$ECHO $path | $GREP ^.:`
46437  new_path="$path"
46438  if test "x$has_colon" = x; then
46439    # Not in mixed or Windows style, start by that.
46440    new_path=`cmd //c echo $path`
46441  fi
46442
46443
46444  input_path="$new_path"
46445  # Check if we need to convert this using DOS-style short mode. If the path
46446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46447  # take no chances and rewrite it.
46448  # Note: m4 eats our [], so we need to use [ and ] instead.
46449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46450  if test "x$has_forbidden_chars" != x; then
46451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46453  fi
46454
46455
46456  windows_path="$new_path"
46457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46458    unix_path=`$CYGPATH -u "$windows_path"`
46459    new_path="$unix_path"
46460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46462    new_path="$unix_path"
46463  fi
46464
46465  if test "x$path" != "x$new_path"; then
46466    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46469  fi
46470
46471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46473
46474    else
46475      # We're on a unix platform. Hooray! :)
46476      path="$POTENTIAL_FREETYPE_LIB_PATH"
46477      has_space=`$ECHO "$path" | $GREP " "`
46478      if test "x$has_space" != x; then
46479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46482      fi
46483
46484      # Use eval to expand a potential ~
46485      eval path="$path"
46486      if test ! -f "$path" && test ! -d "$path"; then
46487        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46488      fi
46489
46490      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46491    fi
46492  fi
46493
46494
46495    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46497$as_echo_n "checking for freetype includes... " >&6; }
46498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46499$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46500    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46502$as_echo_n "checking for freetype libraries... " >&6; }
46503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46504$as_echo "$FREETYPE_LIB_PATH" >&6; }
46505  fi
46506
46507          fi
46508        else
46509          FREETYPE_BASE_DIR="$SYSROOT/usr"
46510
46511  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46512  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46513  METHOD="well-known location"
46514
46515  # Let's start with an optimistic view of the world :-)
46516  FOUND_FREETYPE=yes
46517
46518  # First look for the canonical freetype main include file ft2build.h.
46519  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46520    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46521    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46522    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46523      # Fail.
46524      FOUND_FREETYPE=no
46525    fi
46526  fi
46527
46528  if test "x$FOUND_FREETYPE" = xyes; then
46529    # Include file found, let's continue the sanity check.
46530    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46531$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46532
46533    # Reset to default value
46534    FREETYPE_BASE_NAME=freetype
46535    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46536    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46537      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46538          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46539        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46540        # for the .6 version explicitly.
46541        FREETYPE_BASE_NAME=freetype.6
46542        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46543        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46544$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46545      else
46546        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46547$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46548        FOUND_FREETYPE=no
46549      fi
46550    else
46551      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46552        # On Windows, we will need both .lib and .dll file.
46553        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46554          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46555$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46556          FOUND_FREETYPE=no
46557        fi
46558      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46559          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46560        # Found lib in isa dir, use that instead.
46561        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46562        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46563$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46564      fi
46565    fi
46566  fi
46567
46568  if test "x$FOUND_FREETYPE" = xyes; then
46569
46570  # Only process if variable expands to non-empty
46571
46572  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46574
46575  # Input might be given as Windows format, start by converting to
46576  # unix format.
46577  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46578  new_path=`$CYGPATH -u "$path"`
46579
46580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46583  # "foo.exe" is OK but "foo" is an error.
46584  #
46585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46586  # It is also a way to make sure we got the proper file name for the real test later on.
46587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46588  if test "x$test_shortpath" = x; then
46589    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46590$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46591    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46592  fi
46593
46594  # Call helper function which possibly converts this using DOS-style short mode.
46595  # If so, the updated path is stored in $new_path.
46596
46597  input_path="$new_path"
46598  # Check if we need to convert this using DOS-style short mode. If the path
46599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46600  # take no chances and rewrite it.
46601  # Note: m4 eats our [], so we need to use [ and ] instead.
46602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46603  if test "x$has_forbidden_chars" != x; then
46604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46608      # Going to short mode and back again did indeed matter. Since short mode is
46609      # case insensitive, let's make it lowercase to improve readability.
46610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46611      # Now convert it back to Unix-style (cygpath)
46612      input_path=`$CYGPATH -u "$shortmode_path"`
46613      new_path="$input_path"
46614    fi
46615  fi
46616
46617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46618  if test "x$test_cygdrive_prefix" = x; then
46619    # As a simple fix, exclude /usr/bin since it's not a real path.
46620    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46622      # a path prefixed by /cygdrive for fixpath to work.
46623      new_path="$CYGWIN_ROOT_PATH$input_path"
46624    fi
46625  fi
46626
46627
46628  if test "x$path" != "x$new_path"; then
46629    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46631$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46632  fi
46633
46634    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46635
46636  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46637  has_colon=`$ECHO $path | $GREP ^.:`
46638  new_path="$path"
46639  if test "x$has_colon" = x; then
46640    # Not in mixed or Windows style, start by that.
46641    new_path=`cmd //c echo $path`
46642  fi
46643
46644
46645  input_path="$new_path"
46646  # Check if we need to convert this using DOS-style short mode. If the path
46647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46648  # take no chances and rewrite it.
46649  # Note: m4 eats our [], so we need to use [ and ] instead.
46650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46651  if test "x$has_forbidden_chars" != x; then
46652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46654  fi
46655
46656
46657  windows_path="$new_path"
46658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46659    unix_path=`$CYGPATH -u "$windows_path"`
46660    new_path="$unix_path"
46661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46663    new_path="$unix_path"
46664  fi
46665
46666  if test "x$path" != "x$new_path"; then
46667    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46669$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46670  fi
46671
46672  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46673  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46674
46675    else
46676      # We're on a unix platform. Hooray! :)
46677      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46678      has_space=`$ECHO "$path" | $GREP " "`
46679      if test "x$has_space" != x; then
46680        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46681$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46682        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46683      fi
46684
46685      # Use eval to expand a potential ~
46686      eval path="$path"
46687      if test ! -f "$path" && test ! -d "$path"; then
46688        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46689      fi
46690
46691      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46692    fi
46693  fi
46694
46695
46696  # Only process if variable expands to non-empty
46697
46698  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46700
46701  # Input might be given as Windows format, start by converting to
46702  # unix format.
46703  path="$POTENTIAL_FREETYPE_LIB_PATH"
46704  new_path=`$CYGPATH -u "$path"`
46705
46706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46709  # "foo.exe" is OK but "foo" is an error.
46710  #
46711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46712  # It is also a way to make sure we got the proper file name for the real test later on.
46713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46714  if test "x$test_shortpath" = x; then
46715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46717    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46718  fi
46719
46720  # Call helper function which possibly converts this using DOS-style short mode.
46721  # If so, the updated path is stored in $new_path.
46722
46723  input_path="$new_path"
46724  # Check if we need to convert this using DOS-style short mode. If the path
46725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46726  # take no chances and rewrite it.
46727  # Note: m4 eats our [], so we need to use [ and ] instead.
46728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46729  if test "x$has_forbidden_chars" != x; then
46730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46734      # Going to short mode and back again did indeed matter. Since short mode is
46735      # case insensitive, let's make it lowercase to improve readability.
46736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46737      # Now convert it back to Unix-style (cygpath)
46738      input_path=`$CYGPATH -u "$shortmode_path"`
46739      new_path="$input_path"
46740    fi
46741  fi
46742
46743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46744  if test "x$test_cygdrive_prefix" = x; then
46745    # As a simple fix, exclude /usr/bin since it's not a real path.
46746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46748      # a path prefixed by /cygdrive for fixpath to work.
46749      new_path="$CYGWIN_ROOT_PATH$input_path"
46750    fi
46751  fi
46752
46753
46754  if test "x$path" != "x$new_path"; then
46755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46758  fi
46759
46760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46761
46762  path="$POTENTIAL_FREETYPE_LIB_PATH"
46763  has_colon=`$ECHO $path | $GREP ^.:`
46764  new_path="$path"
46765  if test "x$has_colon" = x; then
46766    # Not in mixed or Windows style, start by that.
46767    new_path=`cmd //c echo $path`
46768  fi
46769
46770
46771  input_path="$new_path"
46772  # Check if we need to convert this using DOS-style short mode. If the path
46773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46774  # take no chances and rewrite it.
46775  # Note: m4 eats our [], so we need to use [ and ] instead.
46776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46777  if test "x$has_forbidden_chars" != x; then
46778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46780  fi
46781
46782
46783  windows_path="$new_path"
46784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46785    unix_path=`$CYGPATH -u "$windows_path"`
46786    new_path="$unix_path"
46787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46789    new_path="$unix_path"
46790  fi
46791
46792  if test "x$path" != "x$new_path"; then
46793    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46796  fi
46797
46798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46800
46801    else
46802      # We're on a unix platform. Hooray! :)
46803      path="$POTENTIAL_FREETYPE_LIB_PATH"
46804      has_space=`$ECHO "$path" | $GREP " "`
46805      if test "x$has_space" != x; then
46806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46809      fi
46810
46811      # Use eval to expand a potential ~
46812      eval path="$path"
46813      if test ! -f "$path" && test ! -d "$path"; then
46814        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46815      fi
46816
46817      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46818    fi
46819  fi
46820
46821
46822    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46824$as_echo_n "checking for freetype includes... " >&6; }
46825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46826$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46827    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46829$as_echo_n "checking for freetype libraries... " >&6; }
46830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46831$as_echo "$FREETYPE_LIB_PATH" >&6; }
46832  fi
46833
46834
46835          if test "x$FOUND_FREETYPE" != xyes; then
46836            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46837
46838  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46839  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46840  METHOD="well-known location"
46841
46842  # Let's start with an optimistic view of the world :-)
46843  FOUND_FREETYPE=yes
46844
46845  # First look for the canonical freetype main include file ft2build.h.
46846  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46847    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46848    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46849    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46850      # Fail.
46851      FOUND_FREETYPE=no
46852    fi
46853  fi
46854
46855  if test "x$FOUND_FREETYPE" = xyes; then
46856    # Include file found, let's continue the sanity check.
46857    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46858$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46859
46860    # Reset to default value
46861    FREETYPE_BASE_NAME=freetype
46862    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46863    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46864      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46865          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46866        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46867        # for the .6 version explicitly.
46868        FREETYPE_BASE_NAME=freetype.6
46869        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46870        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46871$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46872      else
46873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46874$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46875        FOUND_FREETYPE=no
46876      fi
46877    else
46878      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46879        # On Windows, we will need both .lib and .dll file.
46880        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46881          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46882$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46883          FOUND_FREETYPE=no
46884        fi
46885      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46886          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46887        # Found lib in isa dir, use that instead.
46888        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46889        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46890$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46891      fi
46892    fi
46893  fi
46894
46895  if test "x$FOUND_FREETYPE" = xyes; then
46896
46897  # Only process if variable expands to non-empty
46898
46899  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46901
46902  # Input might be given as Windows format, start by converting to
46903  # unix format.
46904  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46905  new_path=`$CYGPATH -u "$path"`
46906
46907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46910  # "foo.exe" is OK but "foo" is an error.
46911  #
46912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46913  # It is also a way to make sure we got the proper file name for the real test later on.
46914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46915  if test "x$test_shortpath" = x; then
46916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46917$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46918    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46919  fi
46920
46921  # Call helper function which possibly converts this using DOS-style short mode.
46922  # If so, the updated path is stored in $new_path.
46923
46924  input_path="$new_path"
46925  # Check if we need to convert this using DOS-style short mode. If the path
46926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46927  # take no chances and rewrite it.
46928  # Note: m4 eats our [], so we need to use [ and ] instead.
46929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46930  if test "x$has_forbidden_chars" != x; then
46931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46935      # Going to short mode and back again did indeed matter. Since short mode is
46936      # case insensitive, let's make it lowercase to improve readability.
46937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46938      # Now convert it back to Unix-style (cygpath)
46939      input_path=`$CYGPATH -u "$shortmode_path"`
46940      new_path="$input_path"
46941    fi
46942  fi
46943
46944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46945  if test "x$test_cygdrive_prefix" = x; then
46946    # As a simple fix, exclude /usr/bin since it's not a real path.
46947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46949      # a path prefixed by /cygdrive for fixpath to work.
46950      new_path="$CYGWIN_ROOT_PATH$input_path"
46951    fi
46952  fi
46953
46954
46955  if test "x$path" != "x$new_path"; then
46956    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46958$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46959  fi
46960
46961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46962
46963  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46964  has_colon=`$ECHO $path | $GREP ^.:`
46965  new_path="$path"
46966  if test "x$has_colon" = x; then
46967    # Not in mixed or Windows style, start by that.
46968    new_path=`cmd //c echo $path`
46969  fi
46970
46971
46972  input_path="$new_path"
46973  # Check if we need to convert this using DOS-style short mode. If the path
46974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46975  # take no chances and rewrite it.
46976  # Note: m4 eats our [], so we need to use [ and ] instead.
46977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46978  if test "x$has_forbidden_chars" != x; then
46979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46981  fi
46982
46983
46984  windows_path="$new_path"
46985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46986    unix_path=`$CYGPATH -u "$windows_path"`
46987    new_path="$unix_path"
46988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46990    new_path="$unix_path"
46991  fi
46992
46993  if test "x$path" != "x$new_path"; then
46994    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46996$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46997  fi
46998
46999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47001
47002    else
47003      # We're on a unix platform. Hooray! :)
47004      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47005      has_space=`$ECHO "$path" | $GREP " "`
47006      if test "x$has_space" != x; then
47007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47008$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47009        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47010      fi
47011
47012      # Use eval to expand a potential ~
47013      eval path="$path"
47014      if test ! -f "$path" && test ! -d "$path"; then
47015        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47016      fi
47017
47018      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47019    fi
47020  fi
47021
47022
47023  # Only process if variable expands to non-empty
47024
47025  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47027
47028  # Input might be given as Windows format, start by converting to
47029  # unix format.
47030  path="$POTENTIAL_FREETYPE_LIB_PATH"
47031  new_path=`$CYGPATH -u "$path"`
47032
47033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47036  # "foo.exe" is OK but "foo" is an error.
47037  #
47038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47039  # It is also a way to make sure we got the proper file name for the real test later on.
47040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47041  if test "x$test_shortpath" = x; then
47042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47043$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47044    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47045  fi
47046
47047  # Call helper function which possibly converts this using DOS-style short mode.
47048  # If so, the updated path is stored in $new_path.
47049
47050  input_path="$new_path"
47051  # Check if we need to convert this using DOS-style short mode. If the path
47052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47053  # take no chances and rewrite it.
47054  # Note: m4 eats our [], so we need to use [ and ] instead.
47055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47056  if test "x$has_forbidden_chars" != x; then
47057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47061      # Going to short mode and back again did indeed matter. Since short mode is
47062      # case insensitive, let's make it lowercase to improve readability.
47063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47064      # Now convert it back to Unix-style (cygpath)
47065      input_path=`$CYGPATH -u "$shortmode_path"`
47066      new_path="$input_path"
47067    fi
47068  fi
47069
47070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47071  if test "x$test_cygdrive_prefix" = x; then
47072    # As a simple fix, exclude /usr/bin since it's not a real path.
47073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47075      # a path prefixed by /cygdrive for fixpath to work.
47076      new_path="$CYGWIN_ROOT_PATH$input_path"
47077    fi
47078  fi
47079
47080
47081  if test "x$path" != "x$new_path"; then
47082    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47085  fi
47086
47087    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47088
47089  path="$POTENTIAL_FREETYPE_LIB_PATH"
47090  has_colon=`$ECHO $path | $GREP ^.:`
47091  new_path="$path"
47092  if test "x$has_colon" = x; then
47093    # Not in mixed or Windows style, start by that.
47094    new_path=`cmd //c echo $path`
47095  fi
47096
47097
47098  input_path="$new_path"
47099  # Check if we need to convert this using DOS-style short mode. If the path
47100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47101  # take no chances and rewrite it.
47102  # Note: m4 eats our [], so we need to use [ and ] instead.
47103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47104  if test "x$has_forbidden_chars" != x; then
47105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47107  fi
47108
47109
47110  windows_path="$new_path"
47111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47112    unix_path=`$CYGPATH -u "$windows_path"`
47113    new_path="$unix_path"
47114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47116    new_path="$unix_path"
47117  fi
47118
47119  if test "x$path" != "x$new_path"; then
47120    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47123  fi
47124
47125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47127
47128    else
47129      # We're on a unix platform. Hooray! :)
47130      path="$POTENTIAL_FREETYPE_LIB_PATH"
47131      has_space=`$ECHO "$path" | $GREP " "`
47132      if test "x$has_space" != x; then
47133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47134$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47135        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47136      fi
47137
47138      # Use eval to expand a potential ~
47139      eval path="$path"
47140      if test ! -f "$path" && test ! -d "$path"; then
47141        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47142      fi
47143
47144      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47145    fi
47146  fi
47147
47148
47149    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47151$as_echo_n "checking for freetype includes... " >&6; }
47152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47153$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47154    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47156$as_echo_n "checking for freetype libraries... " >&6; }
47157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47158$as_echo "$FREETYPE_LIB_PATH" >&6; }
47159  fi
47160
47161          fi
47162
47163          if test "x$FOUND_FREETYPE" != xyes; then
47164            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
47165
47166  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47167  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
47168  METHOD="well-known location"
47169
47170  # Let's start with an optimistic view of the world :-)
47171  FOUND_FREETYPE=yes
47172
47173  # First look for the canonical freetype main include file ft2build.h.
47174  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47175    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47176    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47177    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47178      # Fail.
47179      FOUND_FREETYPE=no
47180    fi
47181  fi
47182
47183  if test "x$FOUND_FREETYPE" = xyes; then
47184    # Include file found, let's continue the sanity check.
47185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47186$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47187
47188    # Reset to default value
47189    FREETYPE_BASE_NAME=freetype
47190    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47191    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47192      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47193          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47194        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47195        # for the .6 version explicitly.
47196        FREETYPE_BASE_NAME=freetype.6
47197        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47198        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47199$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47200      else
47201        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47202$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47203        FOUND_FREETYPE=no
47204      fi
47205    else
47206      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47207        # On Windows, we will need both .lib and .dll file.
47208        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47209          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47210$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47211          FOUND_FREETYPE=no
47212        fi
47213      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47214          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47215        # Found lib in isa dir, use that instead.
47216        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47217        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47218$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47219      fi
47220    fi
47221  fi
47222
47223  if test "x$FOUND_FREETYPE" = xyes; then
47224
47225  # Only process if variable expands to non-empty
47226
47227  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47229
47230  # Input might be given as Windows format, start by converting to
47231  # unix format.
47232  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47233  new_path=`$CYGPATH -u "$path"`
47234
47235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47238  # "foo.exe" is OK but "foo" is an error.
47239  #
47240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47241  # It is also a way to make sure we got the proper file name for the real test later on.
47242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47243  if test "x$test_shortpath" = x; then
47244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47245$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47246    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47247  fi
47248
47249  # Call helper function which possibly converts this using DOS-style short mode.
47250  # If so, the updated path is stored in $new_path.
47251
47252  input_path="$new_path"
47253  # Check if we need to convert this using DOS-style short mode. If the path
47254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47255  # take no chances and rewrite it.
47256  # Note: m4 eats our [], so we need to use [ and ] instead.
47257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47258  if test "x$has_forbidden_chars" != x; then
47259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47263      # Going to short mode and back again did indeed matter. Since short mode is
47264      # case insensitive, let's make it lowercase to improve readability.
47265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47266      # Now convert it back to Unix-style (cygpath)
47267      input_path=`$CYGPATH -u "$shortmode_path"`
47268      new_path="$input_path"
47269    fi
47270  fi
47271
47272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47273  if test "x$test_cygdrive_prefix" = x; then
47274    # As a simple fix, exclude /usr/bin since it's not a real path.
47275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47277      # a path prefixed by /cygdrive for fixpath to work.
47278      new_path="$CYGWIN_ROOT_PATH$input_path"
47279    fi
47280  fi
47281
47282
47283  if test "x$path" != "x$new_path"; then
47284    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47286$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47287  fi
47288
47289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47290
47291  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47292  has_colon=`$ECHO $path | $GREP ^.:`
47293  new_path="$path"
47294  if test "x$has_colon" = x; then
47295    # Not in mixed or Windows style, start by that.
47296    new_path=`cmd //c echo $path`
47297  fi
47298
47299
47300  input_path="$new_path"
47301  # Check if we need to convert this using DOS-style short mode. If the path
47302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47303  # take no chances and rewrite it.
47304  # Note: m4 eats our [], so we need to use [ and ] instead.
47305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47306  if test "x$has_forbidden_chars" != x; then
47307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47309  fi
47310
47311
47312  windows_path="$new_path"
47313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47314    unix_path=`$CYGPATH -u "$windows_path"`
47315    new_path="$unix_path"
47316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47318    new_path="$unix_path"
47319  fi
47320
47321  if test "x$path" != "x$new_path"; then
47322    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47324$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47325  fi
47326
47327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47329
47330    else
47331      # We're on a unix platform. Hooray! :)
47332      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47333      has_space=`$ECHO "$path" | $GREP " "`
47334      if test "x$has_space" != x; then
47335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47338      fi
47339
47340      # Use eval to expand a potential ~
47341      eval path="$path"
47342      if test ! -f "$path" && test ! -d "$path"; then
47343        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47344      fi
47345
47346      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47347    fi
47348  fi
47349
47350
47351  # Only process if variable expands to non-empty
47352
47353  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47355
47356  # Input might be given as Windows format, start by converting to
47357  # unix format.
47358  path="$POTENTIAL_FREETYPE_LIB_PATH"
47359  new_path=`$CYGPATH -u "$path"`
47360
47361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47364  # "foo.exe" is OK but "foo" is an error.
47365  #
47366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47367  # It is also a way to make sure we got the proper file name for the real test later on.
47368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47369  if test "x$test_shortpath" = x; then
47370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47372    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47373  fi
47374
47375  # Call helper function which possibly converts this using DOS-style short mode.
47376  # If so, the updated path is stored in $new_path.
47377
47378  input_path="$new_path"
47379  # Check if we need to convert this using DOS-style short mode. If the path
47380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47381  # take no chances and rewrite it.
47382  # Note: m4 eats our [], so we need to use [ and ] instead.
47383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47384  if test "x$has_forbidden_chars" != x; then
47385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47389      # Going to short mode and back again did indeed matter. Since short mode is
47390      # case insensitive, let's make it lowercase to improve readability.
47391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47392      # Now convert it back to Unix-style (cygpath)
47393      input_path=`$CYGPATH -u "$shortmode_path"`
47394      new_path="$input_path"
47395    fi
47396  fi
47397
47398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47399  if test "x$test_cygdrive_prefix" = x; then
47400    # As a simple fix, exclude /usr/bin since it's not a real path.
47401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47403      # a path prefixed by /cygdrive for fixpath to work.
47404      new_path="$CYGWIN_ROOT_PATH$input_path"
47405    fi
47406  fi
47407
47408
47409  if test "x$path" != "x$new_path"; then
47410    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47413  fi
47414
47415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47416
47417  path="$POTENTIAL_FREETYPE_LIB_PATH"
47418  has_colon=`$ECHO $path | $GREP ^.:`
47419  new_path="$path"
47420  if test "x$has_colon" = x; then
47421    # Not in mixed or Windows style, start by that.
47422    new_path=`cmd //c echo $path`
47423  fi
47424
47425
47426  input_path="$new_path"
47427  # Check if we need to convert this using DOS-style short mode. If the path
47428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47429  # take no chances and rewrite it.
47430  # Note: m4 eats our [], so we need to use [ and ] instead.
47431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47432  if test "x$has_forbidden_chars" != x; then
47433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47435  fi
47436
47437
47438  windows_path="$new_path"
47439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47440    unix_path=`$CYGPATH -u "$windows_path"`
47441    new_path="$unix_path"
47442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47444    new_path="$unix_path"
47445  fi
47446
47447  if test "x$path" != "x$new_path"; then
47448    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47450$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47451  fi
47452
47453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47455
47456    else
47457      # We're on a unix platform. Hooray! :)
47458      path="$POTENTIAL_FREETYPE_LIB_PATH"
47459      has_space=`$ECHO "$path" | $GREP " "`
47460      if test "x$has_space" != x; then
47461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47464      fi
47465
47466      # Use eval to expand a potential ~
47467      eval path="$path"
47468      if test ! -f "$path" && test ! -d "$path"; then
47469        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47470      fi
47471
47472      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47473    fi
47474  fi
47475
47476
47477    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47479$as_echo_n "checking for freetype includes... " >&6; }
47480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47481$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47482    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47484$as_echo_n "checking for freetype libraries... " >&6; }
47485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47486$as_echo "$FREETYPE_LIB_PATH" >&6; }
47487  fi
47488
47489          fi
47490
47491          if test "x$FOUND_FREETYPE" != xyes; then
47492            FREETYPE_BASE_DIR="$SYSROOT/usr"
47493            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47494
47495  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47496  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47497  METHOD="well-known location"
47498
47499  # Let's start with an optimistic view of the world :-)
47500  FOUND_FREETYPE=yes
47501
47502  # First look for the canonical freetype main include file ft2build.h.
47503  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47504    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47505    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47506    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47507      # Fail.
47508      FOUND_FREETYPE=no
47509    fi
47510  fi
47511
47512  if test "x$FOUND_FREETYPE" = xyes; then
47513    # Include file found, let's continue the sanity check.
47514    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47515$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47516
47517    # Reset to default value
47518    FREETYPE_BASE_NAME=freetype
47519    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47520    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47521      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47522          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47523        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47524        # for the .6 version explicitly.
47525        FREETYPE_BASE_NAME=freetype.6
47526        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47527        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47528$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47529      else
47530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47531$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47532        FOUND_FREETYPE=no
47533      fi
47534    else
47535      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47536        # On Windows, we will need both .lib and .dll file.
47537        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47538          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47539$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47540          FOUND_FREETYPE=no
47541        fi
47542      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47543          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47544        # Found lib in isa dir, use that instead.
47545        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47546        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47547$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47548      fi
47549    fi
47550  fi
47551
47552  if test "x$FOUND_FREETYPE" = xyes; then
47553
47554  # Only process if variable expands to non-empty
47555
47556  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47558
47559  # Input might be given as Windows format, start by converting to
47560  # unix format.
47561  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47562  new_path=`$CYGPATH -u "$path"`
47563
47564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47567  # "foo.exe" is OK but "foo" is an error.
47568  #
47569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47570  # It is also a way to make sure we got the proper file name for the real test later on.
47571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47572  if test "x$test_shortpath" = x; then
47573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47576  fi
47577
47578  # Call helper function which possibly converts this using DOS-style short mode.
47579  # If so, the updated path is stored in $new_path.
47580
47581  input_path="$new_path"
47582  # Check if we need to convert this using DOS-style short mode. If the path
47583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47584  # take no chances and rewrite it.
47585  # Note: m4 eats our [], so we need to use [ and ] instead.
47586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47587  if test "x$has_forbidden_chars" != x; then
47588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47592      # Going to short mode and back again did indeed matter. Since short mode is
47593      # case insensitive, let's make it lowercase to improve readability.
47594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47595      # Now convert it back to Unix-style (cygpath)
47596      input_path=`$CYGPATH -u "$shortmode_path"`
47597      new_path="$input_path"
47598    fi
47599  fi
47600
47601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47602  if test "x$test_cygdrive_prefix" = x; then
47603    # As a simple fix, exclude /usr/bin since it's not a real path.
47604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47606      # a path prefixed by /cygdrive for fixpath to work.
47607      new_path="$CYGWIN_ROOT_PATH$input_path"
47608    fi
47609  fi
47610
47611
47612  if test "x$path" != "x$new_path"; then
47613    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47616  fi
47617
47618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47619
47620  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47621  has_colon=`$ECHO $path | $GREP ^.:`
47622  new_path="$path"
47623  if test "x$has_colon" = x; then
47624    # Not in mixed or Windows style, start by that.
47625    new_path=`cmd //c echo $path`
47626  fi
47627
47628
47629  input_path="$new_path"
47630  # Check if we need to convert this using DOS-style short mode. If the path
47631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47632  # take no chances and rewrite it.
47633  # Note: m4 eats our [], so we need to use [ and ] instead.
47634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47635  if test "x$has_forbidden_chars" != x; then
47636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47638  fi
47639
47640
47641  windows_path="$new_path"
47642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47643    unix_path=`$CYGPATH -u "$windows_path"`
47644    new_path="$unix_path"
47645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47647    new_path="$unix_path"
47648  fi
47649
47650  if test "x$path" != "x$new_path"; then
47651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47654  fi
47655
47656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47658
47659    else
47660      # We're on a unix platform. Hooray! :)
47661      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47662      has_space=`$ECHO "$path" | $GREP " "`
47663      if test "x$has_space" != x; then
47664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47667      fi
47668
47669      # Use eval to expand a potential ~
47670      eval path="$path"
47671      if test ! -f "$path" && test ! -d "$path"; then
47672        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47673      fi
47674
47675      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47676    fi
47677  fi
47678
47679
47680  # Only process if variable expands to non-empty
47681
47682  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47684
47685  # Input might be given as Windows format, start by converting to
47686  # unix format.
47687  path="$POTENTIAL_FREETYPE_LIB_PATH"
47688  new_path=`$CYGPATH -u "$path"`
47689
47690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47693  # "foo.exe" is OK but "foo" is an error.
47694  #
47695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47696  # It is also a way to make sure we got the proper file name for the real test later on.
47697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47698  if test "x$test_shortpath" = x; then
47699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47700$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47701    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47702  fi
47703
47704  # Call helper function which possibly converts this using DOS-style short mode.
47705  # If so, the updated path is stored in $new_path.
47706
47707  input_path="$new_path"
47708  # Check if we need to convert this using DOS-style short mode. If the path
47709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47710  # take no chances and rewrite it.
47711  # Note: m4 eats our [], so we need to use [ and ] instead.
47712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47713  if test "x$has_forbidden_chars" != x; then
47714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47718      # Going to short mode and back again did indeed matter. Since short mode is
47719      # case insensitive, let's make it lowercase to improve readability.
47720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47721      # Now convert it back to Unix-style (cygpath)
47722      input_path=`$CYGPATH -u "$shortmode_path"`
47723      new_path="$input_path"
47724    fi
47725  fi
47726
47727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47728  if test "x$test_cygdrive_prefix" = x; then
47729    # As a simple fix, exclude /usr/bin since it's not a real path.
47730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47732      # a path prefixed by /cygdrive for fixpath to work.
47733      new_path="$CYGWIN_ROOT_PATH$input_path"
47734    fi
47735  fi
47736
47737
47738  if test "x$path" != "x$new_path"; then
47739    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47741$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47742  fi
47743
47744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47745
47746  path="$POTENTIAL_FREETYPE_LIB_PATH"
47747  has_colon=`$ECHO $path | $GREP ^.:`
47748  new_path="$path"
47749  if test "x$has_colon" = x; then
47750    # Not in mixed or Windows style, start by that.
47751    new_path=`cmd //c echo $path`
47752  fi
47753
47754
47755  input_path="$new_path"
47756  # Check if we need to convert this using DOS-style short mode. If the path
47757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47758  # take no chances and rewrite it.
47759  # Note: m4 eats our [], so we need to use [ and ] instead.
47760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47761  if test "x$has_forbidden_chars" != x; then
47762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47764  fi
47765
47766
47767  windows_path="$new_path"
47768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47769    unix_path=`$CYGPATH -u "$windows_path"`
47770    new_path="$unix_path"
47771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47773    new_path="$unix_path"
47774  fi
47775
47776  if test "x$path" != "x$new_path"; then
47777    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47780  fi
47781
47782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47784
47785    else
47786      # We're on a unix platform. Hooray! :)
47787      path="$POTENTIAL_FREETYPE_LIB_PATH"
47788      has_space=`$ECHO "$path" | $GREP " "`
47789      if test "x$has_space" != x; then
47790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47791$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47792        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47793      fi
47794
47795      # Use eval to expand a potential ~
47796      eval path="$path"
47797      if test ! -f "$path" && test ! -d "$path"; then
47798        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47799      fi
47800
47801      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47802    fi
47803  fi
47804
47805
47806    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47808$as_echo_n "checking for freetype includes... " >&6; }
47809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47810$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47811    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47813$as_echo_n "checking for freetype libraries... " >&6; }
47814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47815$as_echo "$FREETYPE_LIB_PATH" >&6; }
47816  fi
47817
47818            else
47819
47820  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47821  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47822  METHOD="well-known location"
47823
47824  # Let's start with an optimistic view of the world :-)
47825  FOUND_FREETYPE=yes
47826
47827  # First look for the canonical freetype main include file ft2build.h.
47828  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47829    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47830    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47831    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47832      # Fail.
47833      FOUND_FREETYPE=no
47834    fi
47835  fi
47836
47837  if test "x$FOUND_FREETYPE" = xyes; then
47838    # Include file found, let's continue the sanity check.
47839    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47840$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47841
47842    # Reset to default value
47843    FREETYPE_BASE_NAME=freetype
47844    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47845    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47846      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47847          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47848        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47849        # for the .6 version explicitly.
47850        FREETYPE_BASE_NAME=freetype.6
47851        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47852        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47853$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47854      else
47855        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47856$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47857        FOUND_FREETYPE=no
47858      fi
47859    else
47860      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47861        # On Windows, we will need both .lib and .dll file.
47862        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47863          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47864$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47865          FOUND_FREETYPE=no
47866        fi
47867      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47868          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47869        # Found lib in isa dir, use that instead.
47870        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47871        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47872$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47873      fi
47874    fi
47875  fi
47876
47877  if test "x$FOUND_FREETYPE" = xyes; then
47878
47879  # Only process if variable expands to non-empty
47880
47881  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47883
47884  # Input might be given as Windows format, start by converting to
47885  # unix format.
47886  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47887  new_path=`$CYGPATH -u "$path"`
47888
47889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47892  # "foo.exe" is OK but "foo" is an error.
47893  #
47894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47895  # It is also a way to make sure we got the proper file name for the real test later on.
47896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47897  if test "x$test_shortpath" = x; then
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47900    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47901  fi
47902
47903  # Call helper function which possibly converts this using DOS-style short mode.
47904  # If so, the updated path is stored in $new_path.
47905
47906  input_path="$new_path"
47907  # Check if we need to convert this using DOS-style short mode. If the path
47908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47909  # take no chances and rewrite it.
47910  # Note: m4 eats our [], so we need to use [ and ] instead.
47911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47912  if test "x$has_forbidden_chars" != x; then
47913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47917      # Going to short mode and back again did indeed matter. Since short mode is
47918      # case insensitive, let's make it lowercase to improve readability.
47919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47920      # Now convert it back to Unix-style (cygpath)
47921      input_path=`$CYGPATH -u "$shortmode_path"`
47922      new_path="$input_path"
47923    fi
47924  fi
47925
47926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47927  if test "x$test_cygdrive_prefix" = x; then
47928    # As a simple fix, exclude /usr/bin since it's not a real path.
47929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47931      # a path prefixed by /cygdrive for fixpath to work.
47932      new_path="$CYGWIN_ROOT_PATH$input_path"
47933    fi
47934  fi
47935
47936
47937  if test "x$path" != "x$new_path"; then
47938    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47941  fi
47942
47943    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47944
47945  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47946  has_colon=`$ECHO $path | $GREP ^.:`
47947  new_path="$path"
47948  if test "x$has_colon" = x; then
47949    # Not in mixed or Windows style, start by that.
47950    new_path=`cmd //c echo $path`
47951  fi
47952
47953
47954  input_path="$new_path"
47955  # Check if we need to convert this using DOS-style short mode. If the path
47956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47957  # take no chances and rewrite it.
47958  # Note: m4 eats our [], so we need to use [ and ] instead.
47959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47960  if test "x$has_forbidden_chars" != x; then
47961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47963  fi
47964
47965
47966  windows_path="$new_path"
47967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47968    unix_path=`$CYGPATH -u "$windows_path"`
47969    new_path="$unix_path"
47970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47972    new_path="$unix_path"
47973  fi
47974
47975  if test "x$path" != "x$new_path"; then
47976    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47978$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47979  fi
47980
47981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47983
47984    else
47985      # We're on a unix platform. Hooray! :)
47986      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47987      has_space=`$ECHO "$path" | $GREP " "`
47988      if test "x$has_space" != x; then
47989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47990$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47991        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47992      fi
47993
47994      # Use eval to expand a potential ~
47995      eval path="$path"
47996      if test ! -f "$path" && test ! -d "$path"; then
47997        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47998      fi
47999
48000      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48001    fi
48002  fi
48003
48004
48005  # Only process if variable expands to non-empty
48006
48007  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48009
48010  # Input might be given as Windows format, start by converting to
48011  # unix format.
48012  path="$POTENTIAL_FREETYPE_LIB_PATH"
48013  new_path=`$CYGPATH -u "$path"`
48014
48015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48018  # "foo.exe" is OK but "foo" is an error.
48019  #
48020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48021  # It is also a way to make sure we got the proper file name for the real test later on.
48022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48023  if test "x$test_shortpath" = x; then
48024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48026    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48027  fi
48028
48029  # Call helper function which possibly converts this using DOS-style short mode.
48030  # If so, the updated path is stored in $new_path.
48031
48032  input_path="$new_path"
48033  # Check if we need to convert this using DOS-style short mode. If the path
48034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48035  # take no chances and rewrite it.
48036  # Note: m4 eats our [], so we need to use [ and ] instead.
48037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48038  if test "x$has_forbidden_chars" != x; then
48039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48043      # Going to short mode and back again did indeed matter. Since short mode is
48044      # case insensitive, let's make it lowercase to improve readability.
48045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48046      # Now convert it back to Unix-style (cygpath)
48047      input_path=`$CYGPATH -u "$shortmode_path"`
48048      new_path="$input_path"
48049    fi
48050  fi
48051
48052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48053  if test "x$test_cygdrive_prefix" = x; then
48054    # As a simple fix, exclude /usr/bin since it's not a real path.
48055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48057      # a path prefixed by /cygdrive for fixpath to work.
48058      new_path="$CYGWIN_ROOT_PATH$input_path"
48059    fi
48060  fi
48061
48062
48063  if test "x$path" != "x$new_path"; then
48064    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48066$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48067  fi
48068
48069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48070
48071  path="$POTENTIAL_FREETYPE_LIB_PATH"
48072  has_colon=`$ECHO $path | $GREP ^.:`
48073  new_path="$path"
48074  if test "x$has_colon" = x; then
48075    # Not in mixed or Windows style, start by that.
48076    new_path=`cmd //c echo $path`
48077  fi
48078
48079
48080  input_path="$new_path"
48081  # Check if we need to convert this using DOS-style short mode. If the path
48082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48083  # take no chances and rewrite it.
48084  # Note: m4 eats our [], so we need to use [ and ] instead.
48085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48086  if test "x$has_forbidden_chars" != x; then
48087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48089  fi
48090
48091
48092  windows_path="$new_path"
48093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48094    unix_path=`$CYGPATH -u "$windows_path"`
48095    new_path="$unix_path"
48096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48098    new_path="$unix_path"
48099  fi
48100
48101  if test "x$path" != "x$new_path"; then
48102    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48105  fi
48106
48107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48109
48110    else
48111      # We're on a unix platform. Hooray! :)
48112      path="$POTENTIAL_FREETYPE_LIB_PATH"
48113      has_space=`$ECHO "$path" | $GREP " "`
48114      if test "x$has_space" != x; then
48115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48116$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48118      fi
48119
48120      # Use eval to expand a potential ~
48121      eval path="$path"
48122      if test ! -f "$path" && test ! -d "$path"; then
48123        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48124      fi
48125
48126      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48127    fi
48128  fi
48129
48130
48131    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48133$as_echo_n "checking for freetype includes... " >&6; }
48134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48135$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48136    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48138$as_echo_n "checking for freetype libraries... " >&6; }
48139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48140$as_echo "$FREETYPE_LIB_PATH" >&6; }
48141  fi
48142
48143              if test "x$FOUND_FREETYPE" != xyes; then
48144
48145  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48146  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
48147  METHOD="well-known location"
48148
48149  # Let's start with an optimistic view of the world :-)
48150  FOUND_FREETYPE=yes
48151
48152  # First look for the canonical freetype main include file ft2build.h.
48153  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48154    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48155    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48156    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48157      # Fail.
48158      FOUND_FREETYPE=no
48159    fi
48160  fi
48161
48162  if test "x$FOUND_FREETYPE" = xyes; then
48163    # Include file found, let's continue the sanity check.
48164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48165$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48166
48167    # Reset to default value
48168    FREETYPE_BASE_NAME=freetype
48169    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48170    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48171      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48172          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48173        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48174        # for the .6 version explicitly.
48175        FREETYPE_BASE_NAME=freetype.6
48176        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48177        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48178$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48179      else
48180        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48181$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48182        FOUND_FREETYPE=no
48183      fi
48184    else
48185      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48186        # On Windows, we will need both .lib and .dll file.
48187        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48188          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48189$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48190          FOUND_FREETYPE=no
48191        fi
48192      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48193          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48194        # Found lib in isa dir, use that instead.
48195        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48196        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48197$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48198      fi
48199    fi
48200  fi
48201
48202  if test "x$FOUND_FREETYPE" = xyes; then
48203
48204  # Only process if variable expands to non-empty
48205
48206  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48208
48209  # Input might be given as Windows format, start by converting to
48210  # unix format.
48211  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48212  new_path=`$CYGPATH -u "$path"`
48213
48214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48217  # "foo.exe" is OK but "foo" is an error.
48218  #
48219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48220  # It is also a way to make sure we got the proper file name for the real test later on.
48221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48222  if test "x$test_shortpath" = x; then
48223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48225    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48226  fi
48227
48228  # Call helper function which possibly converts this using DOS-style short mode.
48229  # If so, the updated path is stored in $new_path.
48230
48231  input_path="$new_path"
48232  # Check if we need to convert this using DOS-style short mode. If the path
48233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48234  # take no chances and rewrite it.
48235  # Note: m4 eats our [], so we need to use [ and ] instead.
48236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48237  if test "x$has_forbidden_chars" != x; then
48238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48242      # Going to short mode and back again did indeed matter. Since short mode is
48243      # case insensitive, let's make it lowercase to improve readability.
48244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48245      # Now convert it back to Unix-style (cygpath)
48246      input_path=`$CYGPATH -u "$shortmode_path"`
48247      new_path="$input_path"
48248    fi
48249  fi
48250
48251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48252  if test "x$test_cygdrive_prefix" = x; then
48253    # As a simple fix, exclude /usr/bin since it's not a real path.
48254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48256      # a path prefixed by /cygdrive for fixpath to work.
48257      new_path="$CYGWIN_ROOT_PATH$input_path"
48258    fi
48259  fi
48260
48261
48262  if test "x$path" != "x$new_path"; then
48263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48266  fi
48267
48268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48269
48270  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48271  has_colon=`$ECHO $path | $GREP ^.:`
48272  new_path="$path"
48273  if test "x$has_colon" = x; then
48274    # Not in mixed or Windows style, start by that.
48275    new_path=`cmd //c echo $path`
48276  fi
48277
48278
48279  input_path="$new_path"
48280  # Check if we need to convert this using DOS-style short mode. If the path
48281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48282  # take no chances and rewrite it.
48283  # Note: m4 eats our [], so we need to use [ and ] instead.
48284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48285  if test "x$has_forbidden_chars" != x; then
48286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48288  fi
48289
48290
48291  windows_path="$new_path"
48292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48293    unix_path=`$CYGPATH -u "$windows_path"`
48294    new_path="$unix_path"
48295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48297    new_path="$unix_path"
48298  fi
48299
48300  if test "x$path" != "x$new_path"; then
48301    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48304  fi
48305
48306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48308
48309    else
48310      # We're on a unix platform. Hooray! :)
48311      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48312      has_space=`$ECHO "$path" | $GREP " "`
48313      if test "x$has_space" != x; then
48314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48317      fi
48318
48319      # Use eval to expand a potential ~
48320      eval path="$path"
48321      if test ! -f "$path" && test ! -d "$path"; then
48322        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48323      fi
48324
48325      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48326    fi
48327  fi
48328
48329
48330  # Only process if variable expands to non-empty
48331
48332  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48334
48335  # Input might be given as Windows format, start by converting to
48336  # unix format.
48337  path="$POTENTIAL_FREETYPE_LIB_PATH"
48338  new_path=`$CYGPATH -u "$path"`
48339
48340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48343  # "foo.exe" is OK but "foo" is an error.
48344  #
48345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48346  # It is also a way to make sure we got the proper file name for the real test later on.
48347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48348  if test "x$test_shortpath" = x; then
48349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48351    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48352  fi
48353
48354  # Call helper function which possibly converts this using DOS-style short mode.
48355  # If so, the updated path is stored in $new_path.
48356
48357  input_path="$new_path"
48358  # Check if we need to convert this using DOS-style short mode. If the path
48359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48360  # take no chances and rewrite it.
48361  # Note: m4 eats our [], so we need to use [ and ] instead.
48362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48363  if test "x$has_forbidden_chars" != x; then
48364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48368      # Going to short mode and back again did indeed matter. Since short mode is
48369      # case insensitive, let's make it lowercase to improve readability.
48370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48371      # Now convert it back to Unix-style (cygpath)
48372      input_path=`$CYGPATH -u "$shortmode_path"`
48373      new_path="$input_path"
48374    fi
48375  fi
48376
48377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48378  if test "x$test_cygdrive_prefix" = x; then
48379    # As a simple fix, exclude /usr/bin since it's not a real path.
48380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48382      # a path prefixed by /cygdrive for fixpath to work.
48383      new_path="$CYGWIN_ROOT_PATH$input_path"
48384    fi
48385  fi
48386
48387
48388  if test "x$path" != "x$new_path"; then
48389    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48392  fi
48393
48394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48395
48396  path="$POTENTIAL_FREETYPE_LIB_PATH"
48397  has_colon=`$ECHO $path | $GREP ^.:`
48398  new_path="$path"
48399  if test "x$has_colon" = x; then
48400    # Not in mixed or Windows style, start by that.
48401    new_path=`cmd //c echo $path`
48402  fi
48403
48404
48405  input_path="$new_path"
48406  # Check if we need to convert this using DOS-style short mode. If the path
48407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48408  # take no chances and rewrite it.
48409  # Note: m4 eats our [], so we need to use [ and ] instead.
48410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48411  if test "x$has_forbidden_chars" != x; then
48412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48414  fi
48415
48416
48417  windows_path="$new_path"
48418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48419    unix_path=`$CYGPATH -u "$windows_path"`
48420    new_path="$unix_path"
48421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48423    new_path="$unix_path"
48424  fi
48425
48426  if test "x$path" != "x$new_path"; then
48427    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48430  fi
48431
48432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48434
48435    else
48436      # We're on a unix platform. Hooray! :)
48437      path="$POTENTIAL_FREETYPE_LIB_PATH"
48438      has_space=`$ECHO "$path" | $GREP " "`
48439      if test "x$has_space" != x; then
48440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48441$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48442        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48443      fi
48444
48445      # Use eval to expand a potential ~
48446      eval path="$path"
48447      if test ! -f "$path" && test ! -d "$path"; then
48448        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48449      fi
48450
48451      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48452    fi
48453  fi
48454
48455
48456    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48458$as_echo_n "checking for freetype includes... " >&6; }
48459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48460$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48461    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48463$as_echo_n "checking for freetype libraries... " >&6; }
48464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48465$as_echo "$FREETYPE_LIB_PATH" >&6; }
48466  fi
48467
48468              fi
48469            fi
48470          fi
48471        fi
48472      fi # end check in well-known locations
48473
48474      if test "x$FOUND_FREETYPE" != xyes; then
48475
48476  # Print a helpful message on how to acquire the necessary build dependency.
48477  # freetype is the help tag: freetype, cups, pulse, alsa etc
48478  MISSING_DEPENDENCY=freetype
48479
48480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48481    cygwin_help $MISSING_DEPENDENCY
48482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48483    msys_help $MISSING_DEPENDENCY
48484  else
48485    PKGHANDLER_COMMAND=
48486
48487    case $PKGHANDLER in
48488      apt-get)
48489        apt_help     $MISSING_DEPENDENCY ;;
48490      yum)
48491        yum_help     $MISSING_DEPENDENCY ;;
48492      port)
48493        port_help    $MISSING_DEPENDENCY ;;
48494      pkgutil)
48495        pkgutil_help $MISSING_DEPENDENCY ;;
48496      pkgadd)
48497        pkgadd_help  $MISSING_DEPENDENCY ;;
48498    esac
48499
48500    if test "x$PKGHANDLER_COMMAND" != x; then
48501      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48502    fi
48503  fi
48504
48505        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48506      fi
48507    fi # end user specified settings
48508
48509    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48510    if test "x$FREETYPE_CFLAGS" = x; then
48511
48512  # Only process if variable expands to non-empty
48513
48514  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48516
48517  # Input might be given as Windows format, start by converting to
48518  # unix format.
48519  path="$FREETYPE_INCLUDE_PATH"
48520  new_path=`$CYGPATH -u "$path"`
48521
48522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48525  # "foo.exe" is OK but "foo" is an error.
48526  #
48527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48528  # It is also a way to make sure we got the proper file name for the real test later on.
48529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48530  if test "x$test_shortpath" = x; then
48531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48532$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48533    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48534  fi
48535
48536  # Call helper function which possibly converts this using DOS-style short mode.
48537  # If so, the updated path is stored in $new_path.
48538
48539  input_path="$new_path"
48540  # Check if we need to convert this using DOS-style short mode. If the path
48541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48542  # take no chances and rewrite it.
48543  # Note: m4 eats our [], so we need to use [ and ] instead.
48544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48545  if test "x$has_forbidden_chars" != x; then
48546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48550      # Going to short mode and back again did indeed matter. Since short mode is
48551      # case insensitive, let's make it lowercase to improve readability.
48552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48553      # Now convert it back to Unix-style (cygpath)
48554      input_path=`$CYGPATH -u "$shortmode_path"`
48555      new_path="$input_path"
48556    fi
48557  fi
48558
48559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48560  if test "x$test_cygdrive_prefix" = x; then
48561    # As a simple fix, exclude /usr/bin since it's not a real path.
48562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48564      # a path prefixed by /cygdrive for fixpath to work.
48565      new_path="$CYGWIN_ROOT_PATH$input_path"
48566    fi
48567  fi
48568
48569
48570  if test "x$path" != "x$new_path"; then
48571    FREETYPE_INCLUDE_PATH="$new_path"
48572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48573$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48574  fi
48575
48576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48577
48578  path="$FREETYPE_INCLUDE_PATH"
48579  has_colon=`$ECHO $path | $GREP ^.:`
48580  new_path="$path"
48581  if test "x$has_colon" = x; then
48582    # Not in mixed or Windows style, start by that.
48583    new_path=`cmd //c echo $path`
48584  fi
48585
48586
48587  input_path="$new_path"
48588  # Check if we need to convert this using DOS-style short mode. If the path
48589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48590  # take no chances and rewrite it.
48591  # Note: m4 eats our [], so we need to use [ and ] instead.
48592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48593  if test "x$has_forbidden_chars" != x; then
48594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48596  fi
48597
48598
48599  windows_path="$new_path"
48600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48601    unix_path=`$CYGPATH -u "$windows_path"`
48602    new_path="$unix_path"
48603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48605    new_path="$unix_path"
48606  fi
48607
48608  if test "x$path" != "x$new_path"; then
48609    FREETYPE_INCLUDE_PATH="$new_path"
48610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48611$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48612  fi
48613
48614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48616
48617    else
48618      # We're on a unix platform. Hooray! :)
48619      path="$FREETYPE_INCLUDE_PATH"
48620      has_space=`$ECHO "$path" | $GREP " "`
48621      if test "x$has_space" != x; then
48622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48623$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48625      fi
48626
48627      # Use eval to expand a potential ~
48628      eval path="$path"
48629      if test ! -f "$path" && test ! -d "$path"; then
48630        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48631      fi
48632
48633      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48634    fi
48635  fi
48636
48637      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48638        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48639      else
48640        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48641      fi
48642    fi
48643
48644    if test "x$FREETYPE_LIBS" = x; then
48645
48646  # Only process if variable expands to non-empty
48647
48648  if test "x$FREETYPE_LIB_PATH" != x; then
48649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48650
48651  # Input might be given as Windows format, start by converting to
48652  # unix format.
48653  path="$FREETYPE_LIB_PATH"
48654  new_path=`$CYGPATH -u "$path"`
48655
48656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48659  # "foo.exe" is OK but "foo" is an error.
48660  #
48661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48662  # It is also a way to make sure we got the proper file name for the real test later on.
48663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48664  if test "x$test_shortpath" = x; then
48665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48666$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48667    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48668  fi
48669
48670  # Call helper function which possibly converts this using DOS-style short mode.
48671  # If so, the updated path is stored in $new_path.
48672
48673  input_path="$new_path"
48674  # Check if we need to convert this using DOS-style short mode. If the path
48675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48676  # take no chances and rewrite it.
48677  # Note: m4 eats our [], so we need to use [ and ] instead.
48678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48679  if test "x$has_forbidden_chars" != x; then
48680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48684      # Going to short mode and back again did indeed matter. Since short mode is
48685      # case insensitive, let's make it lowercase to improve readability.
48686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48687      # Now convert it back to Unix-style (cygpath)
48688      input_path=`$CYGPATH -u "$shortmode_path"`
48689      new_path="$input_path"
48690    fi
48691  fi
48692
48693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48694  if test "x$test_cygdrive_prefix" = x; then
48695    # As a simple fix, exclude /usr/bin since it's not a real path.
48696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48698      # a path prefixed by /cygdrive for fixpath to work.
48699      new_path="$CYGWIN_ROOT_PATH$input_path"
48700    fi
48701  fi
48702
48703
48704  if test "x$path" != "x$new_path"; then
48705    FREETYPE_LIB_PATH="$new_path"
48706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48707$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48708  fi
48709
48710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48711
48712  path="$FREETYPE_LIB_PATH"
48713  has_colon=`$ECHO $path | $GREP ^.:`
48714  new_path="$path"
48715  if test "x$has_colon" = x; then
48716    # Not in mixed or Windows style, start by that.
48717    new_path=`cmd //c echo $path`
48718  fi
48719
48720
48721  input_path="$new_path"
48722  # Check if we need to convert this using DOS-style short mode. If the path
48723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48724  # take no chances and rewrite it.
48725  # Note: m4 eats our [], so we need to use [ and ] instead.
48726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48727  if test "x$has_forbidden_chars" != x; then
48728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48730  fi
48731
48732
48733  windows_path="$new_path"
48734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48735    unix_path=`$CYGPATH -u "$windows_path"`
48736    new_path="$unix_path"
48737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48739    new_path="$unix_path"
48740  fi
48741
48742  if test "x$path" != "x$new_path"; then
48743    FREETYPE_LIB_PATH="$new_path"
48744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48745$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48746  fi
48747
48748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48750
48751    else
48752      # We're on a unix platform. Hooray! :)
48753      path="$FREETYPE_LIB_PATH"
48754      has_space=`$ECHO "$path" | $GREP " "`
48755      if test "x$has_space" != x; then
48756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48757$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48759      fi
48760
48761      # Use eval to expand a potential ~
48762      eval path="$path"
48763      if test ! -f "$path" && test ! -d "$path"; then
48764        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48765      fi
48766
48767      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48768    fi
48769  fi
48770
48771      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48772        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48773      else
48774        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48775      fi
48776    fi
48777
48778    # Try to compile it
48779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48780$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48781    ac_ext=cpp
48782ac_cpp='$CXXCPP $CPPFLAGS'
48783ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48784ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48785ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48786
48787    PREV_CXXCFLAGS="$CXXFLAGS"
48788    PREV_LIBS="$LIBS"
48789    PREV_CXX="$CXX"
48790    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48791    LIBS="$LIBS $FREETYPE_LIBS"
48792    CXX="$FIXPATH $CXX"
48793    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48794/* end confdefs.h.  */
48795
48796          #include<ft2build.h>
48797          #include FT_FREETYPE_H
48798          int main () {
48799            FT_Init_FreeType(NULL);
48800            return 0;
48801          }
48802
48803_ACEOF
48804if ac_fn_cxx_try_link "$LINENO"; then :
48805
48806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48807$as_echo "yes" >&6; }
48808
48809else
48810
48811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48812$as_echo "no" >&6; }
48813          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48814$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48815          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48816$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48817
48818
48819  # Print a helpful message on how to acquire the necessary build dependency.
48820  # freetype is the help tag: freetype, cups, pulse, alsa etc
48821  MISSING_DEPENDENCY=freetype
48822
48823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48824    cygwin_help $MISSING_DEPENDENCY
48825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48826    msys_help $MISSING_DEPENDENCY
48827  else
48828    PKGHANDLER_COMMAND=
48829
48830    case $PKGHANDLER in
48831      apt-get)
48832        apt_help     $MISSING_DEPENDENCY ;;
48833      yum)
48834        yum_help     $MISSING_DEPENDENCY ;;
48835      port)
48836        port_help    $MISSING_DEPENDENCY ;;
48837      pkgutil)
48838        pkgutil_help $MISSING_DEPENDENCY ;;
48839      pkgadd)
48840        pkgadd_help  $MISSING_DEPENDENCY ;;
48841    esac
48842
48843    if test "x$PKGHANDLER_COMMAND" != x; then
48844      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48845    fi
48846  fi
48847
48848
48849          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48850
48851
48852fi
48853rm -f core conftest.err conftest.$ac_objext \
48854    conftest$ac_exeext conftest.$ac_ext
48855    CXXCFLAGS="$PREV_CXXFLAGS"
48856    LIBS="$PREV_LIBS"
48857    CXX="$PREV_CXX"
48858    ac_ext=cpp
48859ac_cpp='$CXXCPP $CPPFLAGS'
48860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48863
48864
48865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48866$as_echo_n "checking if we should bundle freetype... " >&6; }
48867    if test "x$BUNDLE_FREETYPE" = xyes; then
48868      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48869    fi
48870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48871$as_echo "$BUNDLE_FREETYPE" >&6; }
48872
48873  fi # end freetype needed
48874
48875
48876
48877
48878
48879
48880
48881  ###############################################################################
48882  #
48883  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48884  #
48885
48886# Check whether --with-alsa was given.
48887if test "${with_alsa+set}" = set; then :
48888  withval=$with_alsa;
48889fi
48890
48891
48892# Check whether --with-alsa-include was given.
48893if test "${with_alsa_include+set}" = set; then :
48894  withval=$with_alsa_include;
48895fi
48896
48897
48898# Check whether --with-alsa-lib was given.
48899if test "${with_alsa_lib+set}" = set; then :
48900  withval=$with_alsa_lib;
48901fi
48902
48903
48904  if test "x$ALSA_NOT_NEEDED" = xyes; then
48905    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48906      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48907$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48908    fi
48909    ALSA_CFLAGS=
48910    ALSA_LIBS=
48911  else
48912    ALSA_FOUND=no
48913
48914    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48915      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48916    fi
48917
48918    if test "x${with_alsa}" != x; then
48919      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48920      ALSA_CFLAGS="-I${with_alsa}/include"
48921      ALSA_FOUND=yes
48922    fi
48923    if test "x${with_alsa_include}" != x; then
48924      ALSA_CFLAGS="-I${with_alsa_include}"
48925      ALSA_FOUND=yes
48926    fi
48927    if test "x${with_alsa_lib}" != x; then
48928      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48929      ALSA_FOUND=yes
48930    fi
48931    if test "x$ALSA_FOUND" = xno; then
48932
48933
48934  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48935    # Source the builddeps file again, to make sure it uses the latest variables!
48936    . $builddepsfile
48937    # Look for a target and build machine specific resource!
48938    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48939    if test "x$resource" = x; then
48940      # Ok, lets instead look for a target specific resource
48941      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48942    fi
48943    if test "x$resource" = x; then
48944      # Ok, lets instead look for a build specific resource
48945      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48946    fi
48947    if test "x$resource" = x; then
48948      # Ok, lets instead look for a generic resource
48949      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48950      resource=${builddep_alsa}
48951    fi
48952    if test "x$resource" != x; then
48953      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48954$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48955      # If the resource in the builddeps.conf file is an existing directory,
48956      # for example /java/linux/cups
48957      if test -d ${resource}; then
48958        depdir=${resource}
48959      else
48960
48961  # alsa is for example mymodule
48962  # $resource is for example libs/general/libmymod_1_2_3.zip
48963  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48964  # $with_builddeps_dir is for example /localhome/builddeps
48965  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48966  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48967  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48968  filename=`basename $resource`
48969  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48970  filebase=${filename%%.*}
48971  extension=${filename#*.}
48972  installdir=$with_builddeps_dir/$filebase
48973  if test ! -f $installdir/$filename.unpacked; then
48974    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48975$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48976    if test ! -d $installdir; then
48977      mkdir -p $installdir
48978    fi
48979    if test ! -d $installdir; then
48980      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48981    fi
48982    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48983    touch $tmpfile
48984    if test ! -f $tmpfile; then
48985      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48986    fi
48987
48988  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48989  # $tmpfile is the local file name for the downloaded file.
48990  VALID_TOOL=no
48991  if test "x$BDEPS_FTP" = xwget; then
48992    VALID_TOOL=yes
48993    wget -O $tmpfile $with_builddeps_server/$resource
48994  fi
48995  if test "x$BDEPS_FTP" = xlftp; then
48996    VALID_TOOL=yes
48997    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48998  fi
48999  if test "x$BDEPS_FTP" = xftp; then
49000    VALID_TOOL=yes
49001    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
49002    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
49003    FTPUSERPWD=${FTPSERVER%%@*}
49004    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
49005      FTPUSER=${userpwd%%:*}
49006      FTPPWD=${userpwd#*@}
49007      FTPSERVER=${FTPSERVER#*@}
49008    else
49009      FTPUSER=ftp
49010      FTPPWD=ftp
49011    fi
49012    # the "pass" command does not work on some
49013    # ftp clients (read ftp.exe) but if it works,
49014    # passive mode is better!
49015    ( \
49016        echo "user $FTPUSER $FTPPWD"        ; \
49017        echo "pass"                         ; \
49018        echo "bin"                          ; \
49019        echo "get $FTPPATH $tmpfile"              ; \
49020    ) | ftp -in $FTPSERVER
49021  fi
49022  if test "x$VALID_TOOL" != xyes; then
49023    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
49024  fi
49025
49026    mv $tmpfile $installdir/$filename
49027    if test ! -s $installdir/$filename; then
49028      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
49029    fi
49030    case "$extension" in
49031      zip)  echo "Unzipping $installdir/$filename..."
49032        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
49033        ;;
49034      tar.gz) echo "Untaring $installdir/$filename..."
49035        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49036        ;;
49037      tgz) echo "Untaring $installdir/$filename..."
49038        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49039        ;;
49040      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
49041        ;;
49042    esac
49043  fi
49044  if test -f $installdir/$filename.unpacked; then
49045    depdir=$installdir
49046  fi
49047
49048      fi
49049      # Source the builddeps file again, because in the previous command, the depdir
49050      # was updated to point at the current build dependency install directory.
49051      . $builddepsfile
49052      # Now extract variables from the builddeps.conf files.
49053      theroot=${builddep_alsa_ROOT}
49054      thecflags=${builddep_alsa_CFLAGS}
49055      thelibs=${builddep_alsa_LIBS}
49056      if test "x$depdir" = x; then
49057        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
49058      fi
49059      ALSA=$depdir
49060      if test "x$theroot" != x; then
49061        ALSA="$theroot"
49062      fi
49063      if test "x$thecflags" != x; then
49064        ALSA_CFLAGS="$thecflags"
49065      fi
49066      if test "x$thelibs" != x; then
49067        ALSA_LIBS="$thelibs"
49068      fi
49069      ALSA_FOUND=yes
49070      else ALSA_FOUND=no
49071
49072    fi
49073    else ALSA_FOUND=no
49074
49075  fi
49076
49077    fi
49078    # Do not try pkg-config if we have a sysroot set.
49079    if test "x$SYSROOT" = x; then
49080      if test "x$ALSA_FOUND" = xno; then
49081
49082pkg_failed=no
49083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
49084$as_echo_n "checking for ALSA... " >&6; }
49085
49086if test -n "$ALSA_CFLAGS"; then
49087    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
49088 elif test -n "$PKG_CONFIG"; then
49089    if test -n "$PKG_CONFIG" && \
49090    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49091  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49092  ac_status=$?
49093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49094  test $ac_status = 0; }; then
49095  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
49096else
49097  pkg_failed=yes
49098fi
49099 else
49100    pkg_failed=untried
49101fi
49102if test -n "$ALSA_LIBS"; then
49103    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
49104 elif test -n "$PKG_CONFIG"; then
49105    if test -n "$PKG_CONFIG" && \
49106    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49107  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49108  ac_status=$?
49109  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49110  test $ac_status = 0; }; then
49111  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
49112else
49113  pkg_failed=yes
49114fi
49115 else
49116    pkg_failed=untried
49117fi
49118
49119
49120
49121if test $pkg_failed = yes; then
49122
49123if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49124        _pkg_short_errors_supported=yes
49125else
49126        _pkg_short_errors_supported=no
49127fi
49128        if test $_pkg_short_errors_supported = yes; then
49129	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
49130        else
49131	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
49132        fi
49133	# Put the nasty error message in config.log where it belongs
49134	echo "$ALSA_PKG_ERRORS" >&5
49135
49136	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49137$as_echo "no" >&6; }
49138                ALSA_FOUND=no
49139elif test $pkg_failed = untried; then
49140	ALSA_FOUND=no
49141else
49142	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
49143	ALSA_LIBS=$pkg_cv_ALSA_LIBS
49144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49145$as_echo "yes" >&6; }
49146	ALSA_FOUND=yes
49147fi
49148      fi
49149    fi
49150    if test "x$ALSA_FOUND" = xno; then
49151      for ac_header in alsa/asoundlib.h
49152do :
49153  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
49154if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
49155  cat >>confdefs.h <<_ACEOF
49156#define HAVE_ALSA_ASOUNDLIB_H 1
49157_ACEOF
49158
49159            ALSA_FOUND=yes
49160            ALSA_CFLAGS=-Iignoreme
49161            ALSA_LIBS=-lasound
49162            DEFAULT_ALSA=yes
49163
49164else
49165  ALSA_FOUND=no
49166fi
49167
49168done
49169
49170    fi
49171    if test "x$ALSA_FOUND" = xno; then
49172
49173  # Print a helpful message on how to acquire the necessary build dependency.
49174  # alsa is the help tag: freetype, cups, pulse, alsa etc
49175  MISSING_DEPENDENCY=alsa
49176
49177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49178    cygwin_help $MISSING_DEPENDENCY
49179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49180    msys_help $MISSING_DEPENDENCY
49181  else
49182    PKGHANDLER_COMMAND=
49183
49184    case $PKGHANDLER in
49185      apt-get)
49186        apt_help     $MISSING_DEPENDENCY ;;
49187      yum)
49188        yum_help     $MISSING_DEPENDENCY ;;
49189      port)
49190        port_help    $MISSING_DEPENDENCY ;;
49191      pkgutil)
49192        pkgutil_help $MISSING_DEPENDENCY ;;
49193      pkgadd)
49194        pkgadd_help  $MISSING_DEPENDENCY ;;
49195    esac
49196
49197    if test "x$PKGHANDLER_COMMAND" != x; then
49198      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49199    fi
49200  fi
49201
49202      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49203    fi
49204  fi
49205
49206
49207
49208
49209
49210
49211  ###############################################################################
49212  #
49213  # Check for the jpeg library
49214  #
49215
49216
49217# Check whether --with-libjpeg was given.
49218if test "${with_libjpeg+set}" = set; then :
49219  withval=$with_libjpeg;
49220fi
49221
49222
49223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49224$as_echo_n "checking for which libjpeg to use... " >&6; }
49225
49226  # default is bundled
49227  DEFAULT_LIBJPEG=bundled
49228
49229  #
49230  # if user didn't specify, use DEFAULT_LIBJPEG
49231  #
49232  if test "x${with_libjpeg}" = "x"; then
49233    with_libjpeg=${DEFAULT_LIBJPEG}
49234  fi
49235
49236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49237$as_echo "${with_libjpeg}" >&6; }
49238
49239  if test "x${with_libjpeg}" = "xbundled"; then
49240    USE_EXTERNAL_LIBJPEG=false
49241  elif test "x${with_libjpeg}" = "xsystem"; then
49242    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49243if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49244
49245else
49246   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49247fi
49248
49249
49250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49251$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49252if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49253  $as_echo_n "(cached) " >&6
49254else
49255  ac_check_lib_save_LIBS=$LIBS
49256LIBS="-ljpeg  $LIBS"
49257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49258/* end confdefs.h.  */
49259
49260/* Override any GCC internal prototype to avoid an error.
49261   Use char because int might match the return type of a GCC
49262   builtin and then its argument prototype would still apply.  */
49263#ifdef __cplusplus
49264extern "C"
49265#endif
49266char jpeg_CreateDecompress ();
49267int
49268main ()
49269{
49270return jpeg_CreateDecompress ();
49271  ;
49272  return 0;
49273}
49274_ACEOF
49275if ac_fn_cxx_try_link "$LINENO"; then :
49276  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49277else
49278  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49279fi
49280rm -f core conftest.err conftest.$ac_objext \
49281    conftest$ac_exeext conftest.$ac_ext
49282LIBS=$ac_check_lib_save_LIBS
49283fi
49284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49285$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49286if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49287  cat >>confdefs.h <<_ACEOF
49288#define HAVE_LIBJPEG 1
49289_ACEOF
49290
49291  LIBS="-ljpeg $LIBS"
49292
49293else
49294   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49295fi
49296
49297
49298    USE_EXTERNAL_LIBJPEG=true
49299  else
49300    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49301  fi
49302
49303
49304
49305  ###############################################################################
49306  #
49307  # Check for the gif library
49308  #
49309
49310
49311# Check whether --with-giflib was given.
49312if test "${with_giflib+set}" = set; then :
49313  withval=$with_giflib;
49314fi
49315
49316
49317
49318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49319$as_echo_n "checking for which giflib to use... " >&6; }
49320
49321  # default is bundled
49322  DEFAULT_GIFLIB=bundled
49323
49324  #
49325  # if user didn't specify, use DEFAULT_GIFLIB
49326  #
49327  if test "x${with_giflib}" = "x"; then
49328    with_giflib=${DEFAULT_GIFLIB}
49329  fi
49330
49331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49332$as_echo "${with_giflib}" >&6; }
49333
49334  if test "x${with_giflib}" = "xbundled"; then
49335    USE_EXTERNAL_LIBGIF=false
49336  elif test "x${with_giflib}" = "xsystem"; then
49337    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49338if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49339
49340else
49341   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49342fi
49343
49344
49345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49346$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49347if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49348  $as_echo_n "(cached) " >&6
49349else
49350  ac_check_lib_save_LIBS=$LIBS
49351LIBS="-lgif  $LIBS"
49352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49353/* end confdefs.h.  */
49354
49355/* Override any GCC internal prototype to avoid an error.
49356   Use char because int might match the return type of a GCC
49357   builtin and then its argument prototype would still apply.  */
49358#ifdef __cplusplus
49359extern "C"
49360#endif
49361char DGifGetCode ();
49362int
49363main ()
49364{
49365return DGifGetCode ();
49366  ;
49367  return 0;
49368}
49369_ACEOF
49370if ac_fn_cxx_try_link "$LINENO"; then :
49371  ac_cv_lib_gif_DGifGetCode=yes
49372else
49373  ac_cv_lib_gif_DGifGetCode=no
49374fi
49375rm -f core conftest.err conftest.$ac_objext \
49376    conftest$ac_exeext conftest.$ac_ext
49377LIBS=$ac_check_lib_save_LIBS
49378fi
49379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49380$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49381if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49382  cat >>confdefs.h <<_ACEOF
49383#define HAVE_LIBGIF 1
49384_ACEOF
49385
49386  LIBS="-lgif $LIBS"
49387
49388else
49389   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49390fi
49391
49392
49393    USE_EXTERNAL_LIBGIF=true
49394  else
49395    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49396  fi
49397
49398
49399  ###############################################################################
49400  #
49401  # Check for the lcms2 library
49402  #
49403
49404
49405# Check whether --with-lcms was given.
49406if test "${with_lcms+set}" = set; then :
49407  withval=$with_lcms;
49408fi
49409
49410
49411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49412$as_echo_n "checking for which lcms to use... " >&6; }
49413
49414  DEFAULT_LCMS=bundled
49415
49416  #
49417  # If user didn't specify, use DEFAULT_LCMS
49418  #
49419  if test "x${with_lcms}" = "x"; then
49420      with_lcms=${DEFAULT_LCMS}
49421  fi
49422
49423  if test "x${with_lcms}" = "xbundled"; then
49424    USE_EXTERNAL_LCMS=false
49425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49426$as_echo "bundled" >&6; }
49427  elif test "x${with_lcms}" = "xsystem"; then
49428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49429$as_echo "system" >&6; }
49430
49431pkg_failed=no
49432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49433$as_echo_n "checking for LCMS... " >&6; }
49434
49435if test -n "$LCMS_CFLAGS"; then
49436    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49437 elif test -n "$PKG_CONFIG"; then
49438    if test -n "$PKG_CONFIG" && \
49439    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49440  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49441  ac_status=$?
49442  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49443  test $ac_status = 0; }; then
49444  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49445else
49446  pkg_failed=yes
49447fi
49448 else
49449    pkg_failed=untried
49450fi
49451if test -n "$LCMS_LIBS"; then
49452    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49453 elif test -n "$PKG_CONFIG"; then
49454    if test -n "$PKG_CONFIG" && \
49455    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49456  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49457  ac_status=$?
49458  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49459  test $ac_status = 0; }; then
49460  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49461else
49462  pkg_failed=yes
49463fi
49464 else
49465    pkg_failed=untried
49466fi
49467
49468
49469
49470if test $pkg_failed = yes; then
49471
49472if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49473        _pkg_short_errors_supported=yes
49474else
49475        _pkg_short_errors_supported=no
49476fi
49477        if test $_pkg_short_errors_supported = yes; then
49478	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49479        else
49480	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49481        fi
49482	# Put the nasty error message in config.log where it belongs
49483	echo "$LCMS_PKG_ERRORS" >&5
49484
49485	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49486$as_echo "no" >&6; }
49487                LCMS_FOUND=no
49488elif test $pkg_failed = untried; then
49489	LCMS_FOUND=no
49490else
49491	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49492	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49494$as_echo "yes" >&6; }
49495	LCMS_FOUND=yes
49496fi
49497    if test "x${LCMS_FOUND}" = "xyes"; then
49498      USE_EXTERNAL_LCMS=true
49499    else
49500      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49501    fi
49502  else
49503    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49504  fi
49505
49506
49507
49508  ###############################################################################
49509  #
49510  # Check for the png library
49511  #
49512
49513
49514# Check whether --with-libpng was given.
49515if test "${with_libpng+set}" = set; then :
49516  withval=$with_libpng;
49517fi
49518
49519
49520
49521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49522$as_echo_n "checking for which libpng to use... " >&6; }
49523
49524  # default is bundled
49525  DEFAULT_LIBPNG=bundled
49526
49527  #
49528  # if user didn't specify, use DEFAULT_LIBPNG
49529  #
49530  if test "x${with_libpng}" = "x"; then
49531      with_libpng=${DEFAULT_LIBPNG}
49532  fi
49533
49534  if test "x${with_libpng}" = "xbundled"; then
49535      USE_EXTERNAL_LIBPNG=false
49536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49537$as_echo "bundled" >&6; }
49538  elif test "x${with_libpng}" = "xsystem"; then
49539
49540pkg_failed=no
49541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49542$as_echo_n "checking for PNG... " >&6; }
49543
49544if test -n "$PNG_CFLAGS"; then
49545    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49546 elif test -n "$PKG_CONFIG"; then
49547    if test -n "$PKG_CONFIG" && \
49548    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49549  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49550  ac_status=$?
49551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49552  test $ac_status = 0; }; then
49553  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49554else
49555  pkg_failed=yes
49556fi
49557 else
49558    pkg_failed=untried
49559fi
49560if test -n "$PNG_LIBS"; then
49561    pkg_cv_PNG_LIBS="$PNG_LIBS"
49562 elif test -n "$PKG_CONFIG"; then
49563    if test -n "$PKG_CONFIG" && \
49564    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49565  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49566  ac_status=$?
49567  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49568  test $ac_status = 0; }; then
49569  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49570else
49571  pkg_failed=yes
49572fi
49573 else
49574    pkg_failed=untried
49575fi
49576
49577
49578
49579if test $pkg_failed = yes; then
49580
49581if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49582        _pkg_short_errors_supported=yes
49583else
49584        _pkg_short_errors_supported=no
49585fi
49586        if test $_pkg_short_errors_supported = yes; then
49587	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49588        else
49589	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49590        fi
49591	# Put the nasty error message in config.log where it belongs
49592	echo "$PNG_PKG_ERRORS" >&5
49593
49594	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49595$as_echo "no" >&6; }
49596                 LIBPNG_FOUND=no
49597elif test $pkg_failed = untried; then
49598	 LIBPNG_FOUND=no
49599else
49600	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49601	PNG_LIBS=$pkg_cv_PNG_LIBS
49602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49603$as_echo "yes" >&6; }
49604	 LIBPNG_FOUND=yes
49605fi
49606      if test "x${LIBPNG_FOUND}" = "xyes"; then
49607          USE_EXTERNAL_LIBPNG=true
49608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49609$as_echo "system" >&6; }
49610      else
49611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49612$as_echo "system not found" >&6; }
49613          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49614      fi
49615  else
49616      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49617  fi
49618
49619
49620  ###############################################################################
49621  #
49622  # Check for the zlib library
49623  #
49624
49625
49626# Check whether --with-zlib was given.
49627if test "${with_zlib+set}" = set; then :
49628  withval=$with_zlib;
49629fi
49630
49631
49632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49633$as_echo_n "checking for compress in -lz... " >&6; }
49634if ${ac_cv_lib_z_compress+:} false; then :
49635  $as_echo_n "(cached) " >&6
49636else
49637  ac_check_lib_save_LIBS=$LIBS
49638LIBS="-lz  $LIBS"
49639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49640/* end confdefs.h.  */
49641
49642/* Override any GCC internal prototype to avoid an error.
49643   Use char because int might match the return type of a GCC
49644   builtin and then its argument prototype would still apply.  */
49645#ifdef __cplusplus
49646extern "C"
49647#endif
49648char compress ();
49649int
49650main ()
49651{
49652return compress ();
49653  ;
49654  return 0;
49655}
49656_ACEOF
49657if ac_fn_cxx_try_link "$LINENO"; then :
49658  ac_cv_lib_z_compress=yes
49659else
49660  ac_cv_lib_z_compress=no
49661fi
49662rm -f core conftest.err conftest.$ac_objext \
49663    conftest$ac_exeext conftest.$ac_ext
49664LIBS=$ac_check_lib_save_LIBS
49665fi
49666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49667$as_echo "$ac_cv_lib_z_compress" >&6; }
49668if test "x$ac_cv_lib_z_compress" = xyes; then :
49669   ZLIB_FOUND=yes
49670else
49671   ZLIB_FOUND=no
49672fi
49673
49674
49675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49676$as_echo_n "checking for which zlib to use... " >&6; }
49677
49678  DEFAULT_ZLIB=bundled
49679  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49680    #
49681    # On macosx default is system...on others default is
49682    #
49683    DEFAULT_ZLIB=system
49684  fi
49685
49686  if test "x${ZLIB_FOUND}" != "xyes"; then
49687    #
49688    # If we don't find any system...set default to bundled
49689    #
49690    DEFAULT_ZLIB=bundled
49691  fi
49692
49693  #
49694  # If user didn't specify, use DEFAULT_ZLIB
49695  #
49696  if test "x${with_zlib}" = "x"; then
49697    with_zlib=${DEFAULT_ZLIB}
49698  fi
49699
49700  if test "x${with_zlib}" = "xbundled"; then
49701    USE_EXTERNAL_LIBZ=false
49702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49703$as_echo "bundled" >&6; }
49704  elif test "x${with_zlib}" = "xsystem"; then
49705    if test "x${ZLIB_FOUND}" = "xyes"; then
49706      USE_EXTERNAL_LIBZ=true
49707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49708$as_echo "system" >&6; }
49709    else
49710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49711$as_echo "system not found" >&6; }
49712      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49713    fi
49714  else
49715    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49716  fi
49717
49718
49719
49720  ###############################################################################
49721  LIBZIP_CAN_USE_MMAP=true
49722
49723
49724
49725  ###############################################################################
49726  #
49727  # Check if altzone exists in time.h
49728  #
49729
49730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49731/* end confdefs.h.  */
49732#include <time.h>
49733int
49734main ()
49735{
49736return (int)altzone;
49737  ;
49738  return 0;
49739}
49740_ACEOF
49741if ac_fn_cxx_try_link "$LINENO"; then :
49742  has_altzone=yes
49743else
49744  has_altzone=no
49745fi
49746rm -f core conftest.err conftest.$ac_objext \
49747    conftest$ac_exeext conftest.$ac_ext
49748  if test "x$has_altzone" = xyes; then
49749
49750$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49751
49752  fi
49753
49754  ###############################################################################
49755  #
49756  # Check the maths library
49757  #
49758
49759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49760$as_echo_n "checking for cos in -lm... " >&6; }
49761if ${ac_cv_lib_m_cos+:} false; then :
49762  $as_echo_n "(cached) " >&6
49763else
49764  ac_check_lib_save_LIBS=$LIBS
49765LIBS="-lm  $LIBS"
49766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49767/* end confdefs.h.  */
49768
49769/* Override any GCC internal prototype to avoid an error.
49770   Use char because int might match the return type of a GCC
49771   builtin and then its argument prototype would still apply.  */
49772#ifdef __cplusplus
49773extern "C"
49774#endif
49775char cos ();
49776int
49777main ()
49778{
49779return cos ();
49780  ;
49781  return 0;
49782}
49783_ACEOF
49784if ac_fn_cxx_try_link "$LINENO"; then :
49785  ac_cv_lib_m_cos=yes
49786else
49787  ac_cv_lib_m_cos=no
49788fi
49789rm -f core conftest.err conftest.$ac_objext \
49790    conftest$ac_exeext conftest.$ac_ext
49791LIBS=$ac_check_lib_save_LIBS
49792fi
49793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49794$as_echo "$ac_cv_lib_m_cos" >&6; }
49795if test "x$ac_cv_lib_m_cos" = xyes; then :
49796  cat >>confdefs.h <<_ACEOF
49797#define HAVE_LIBM 1
49798_ACEOF
49799
49800  LIBS="-lm $LIBS"
49801
49802else
49803
49804        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49805$as_echo "$as_me: Maths library was not found" >&6;}
49806
49807
49808fi
49809
49810
49811
49812  ###############################################################################
49813  #
49814  # Check for libdl.so
49815
49816  save_LIBS="$LIBS"
49817  LIBS=""
49818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49819$as_echo_n "checking for dlopen in -ldl... " >&6; }
49820if ${ac_cv_lib_dl_dlopen+:} false; then :
49821  $as_echo_n "(cached) " >&6
49822else
49823  ac_check_lib_save_LIBS=$LIBS
49824LIBS="-ldl  $LIBS"
49825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49826/* end confdefs.h.  */
49827
49828/* Override any GCC internal prototype to avoid an error.
49829   Use char because int might match the return type of a GCC
49830   builtin and then its argument prototype would still apply.  */
49831#ifdef __cplusplus
49832extern "C"
49833#endif
49834char dlopen ();
49835int
49836main ()
49837{
49838return dlopen ();
49839  ;
49840  return 0;
49841}
49842_ACEOF
49843if ac_fn_cxx_try_link "$LINENO"; then :
49844  ac_cv_lib_dl_dlopen=yes
49845else
49846  ac_cv_lib_dl_dlopen=no
49847fi
49848rm -f core conftest.err conftest.$ac_objext \
49849    conftest$ac_exeext conftest.$ac_ext
49850LIBS=$ac_check_lib_save_LIBS
49851fi
49852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49853$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49854if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49855  cat >>confdefs.h <<_ACEOF
49856#define HAVE_LIBDL 1
49857_ACEOF
49858
49859  LIBS="-ldl $LIBS"
49860
49861fi
49862
49863  LIBDL="$LIBS"
49864
49865  LIBS="$save_LIBS"
49866
49867
49868  ###############################################################################
49869  #
49870  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49871  # dynamic build is configured on command line.
49872  #
49873
49874# Check whether --with-stdc++lib was given.
49875if test "${with_stdc__lib+set}" = set; then :
49876  withval=$with_stdc__lib;
49877        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49878                && test "x$with_stdc__lib" != xdefault; then
49879          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49880        fi
49881
49882else
49883  with_stdc__lib=default
49884
49885fi
49886
49887
49888  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49889    # Test if -lstdc++ works.
49890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49891$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49892    ac_ext=cpp
49893ac_cpp='$CXXCPP $CPPFLAGS'
49894ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49895ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49896ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49897
49898    OLD_CXXFLAGS="$CXXFLAGS"
49899    CXXFLAGS="$CXXFLAGS -lstdc++"
49900    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49901/* end confdefs.h.  */
49902
49903int
49904main ()
49905{
49906return 0;
49907  ;
49908  return 0;
49909}
49910_ACEOF
49911if ac_fn_cxx_try_link "$LINENO"; then :
49912  has_dynamic_libstdcxx=yes
49913else
49914  has_dynamic_libstdcxx=no
49915fi
49916rm -f core conftest.err conftest.$ac_objext \
49917    conftest$ac_exeext conftest.$ac_ext
49918    CXXFLAGS="$OLD_CXXFLAGS"
49919    ac_ext=cpp
49920ac_cpp='$CXXCPP $CPPFLAGS'
49921ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49922ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49923ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49924
49925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49926$as_echo "$has_dynamic_libstdcxx" >&6; }
49927
49928    # Test if stdc++ can be linked statically.
49929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49930$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49931    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49932    ac_ext=cpp
49933ac_cpp='$CXXCPP $CPPFLAGS'
49934ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49935ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49936ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49937
49938    OLD_LIBS="$LIBS"
49939    OLD_CXX="$CXX"
49940    LIBS="$STATIC_STDCXX_FLAGS"
49941    CXX="$CC"
49942    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49943/* end confdefs.h.  */
49944
49945int
49946main ()
49947{
49948return 0;
49949  ;
49950  return 0;
49951}
49952_ACEOF
49953if ac_fn_cxx_try_link "$LINENO"; then :
49954  has_static_libstdcxx=yes
49955else
49956  has_static_libstdcxx=no
49957fi
49958rm -f core conftest.err conftest.$ac_objext \
49959    conftest$ac_exeext conftest.$ac_ext
49960    LIBS="$OLD_LIBS"
49961    CXX="$OLD_CXX"
49962    ac_ext=cpp
49963ac_cpp='$CXXCPP $CPPFLAGS'
49964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49967
49968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49969$as_echo "$has_static_libstdcxx" >&6; }
49970
49971    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49972      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49973    fi
49974
49975    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49976      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49977    fi
49978
49979    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49980      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49981    fi
49982
49983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49984$as_echo_n "checking how to link with libstdc++... " >&6; }
49985    # If dynamic was requested, it's available since it would fail above otherwise.
49986    # If dynamic wasn't requested, go with static unless it isn't available.
49987    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49988      LIBCXX="$LIBCXX -lstdc++"
49989      LDCXX="$CXX"
49990      STATIC_CXX_SETTING="STATIC_CXX=false"
49991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49992$as_echo "dynamic" >&6; }
49993    else
49994      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49995      LDCXX="$CC"
49996      STATIC_CXX_SETTING="STATIC_CXX=true"
49997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49998$as_echo "static" >&6; }
49999    fi
50000  fi
50001
50002
50003  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50004    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
50005
50006pkg_failed=no
50007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
50008$as_echo_n "checking for LIBFFI... " >&6; }
50009
50010if test -n "$LIBFFI_CFLAGS"; then
50011    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
50012 elif test -n "$PKG_CONFIG"; then
50013    if test -n "$PKG_CONFIG" && \
50014    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50015  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50016  ac_status=$?
50017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50018  test $ac_status = 0; }; then
50019  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
50020else
50021  pkg_failed=yes
50022fi
50023 else
50024    pkg_failed=untried
50025fi
50026if test -n "$LIBFFI_LIBS"; then
50027    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
50028 elif test -n "$PKG_CONFIG"; then
50029    if test -n "$PKG_CONFIG" && \
50030    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50031  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50032  ac_status=$?
50033  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50034  test $ac_status = 0; }; then
50035  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
50036else
50037  pkg_failed=yes
50038fi
50039 else
50040    pkg_failed=untried
50041fi
50042
50043
50044
50045if test $pkg_failed = yes; then
50046
50047if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50048        _pkg_short_errors_supported=yes
50049else
50050        _pkg_short_errors_supported=no
50051fi
50052        if test $_pkg_short_errors_supported = yes; then
50053	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
50054        else
50055	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
50056        fi
50057	# Put the nasty error message in config.log where it belongs
50058	echo "$LIBFFI_PKG_ERRORS" >&5
50059
50060	as_fn_error $? "Package requirements (libffi) were not met:
50061
50062$LIBFFI_PKG_ERRORS
50063
50064Consider adjusting the PKG_CONFIG_PATH environment variable if you
50065installed software in a non-standard prefix.
50066
50067Alternatively, you may set the environment variables LIBFFI_CFLAGS
50068and LIBFFI_LIBS to avoid the need to call pkg-config.
50069See the pkg-config man page for more details.
50070" "$LINENO" 5
50071elif test $pkg_failed = untried; then
50072	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50074as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
50075is in your PATH or set the PKG_CONFIG environment variable to the full
50076path to pkg-config.
50077
50078Alternatively, you may set the environment variables LIBFFI_CFLAGS
50079and LIBFFI_LIBS to avoid the need to call pkg-config.
50080See the pkg-config man page for more details.
50081
50082To get pkg-config, see <http://pkg-config.freedesktop.org/>.
50083See \`config.log' for more details" "$LINENO" 5; }
50084else
50085	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
50086	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
50087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50088$as_echo "yes" >&6; }
50089	:
50090fi
50091
50092  fi
50093
50094  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50095    # Extract the first word of "llvm-config", so it can be a program name with args.
50096set dummy llvm-config; ac_word=$2
50097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50098$as_echo_n "checking for $ac_word... " >&6; }
50099if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
50100  $as_echo_n "(cached) " >&6
50101else
50102  if test -n "$LLVM_CONFIG"; then
50103  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
50104else
50105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50106for as_dir in $PATH
50107do
50108  IFS=$as_save_IFS
50109  test -z "$as_dir" && as_dir=.
50110    for ac_exec_ext in '' $ac_executable_extensions; do
50111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50112    ac_cv_prog_LLVM_CONFIG="llvm-config"
50113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50114    break 2
50115  fi
50116done
50117  done
50118IFS=$as_save_IFS
50119
50120fi
50121fi
50122LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
50123if test -n "$LLVM_CONFIG"; then
50124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
50125$as_echo "$LLVM_CONFIG" >&6; }
50126else
50127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50128$as_echo "no" >&6; }
50129fi
50130
50131
50132
50133    if test "x$LLVM_CONFIG" != xllvm-config; then
50134      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
50135    fi
50136
50137    llvm_components="jit mcjit engine nativecodegen native"
50138    unset LLVM_CFLAGS
50139    for flag in $("$LLVM_CONFIG" --cxxflags); do
50140      if echo "${flag}" | grep -q '^-[ID]'; then
50141        if test "${flag}" != "-D_DEBUG" ; then
50142          if test "${LLVM_CFLAGS}" != "" ; then
50143            LLVM_CFLAGS="${LLVM_CFLAGS} "
50144          fi
50145          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
50146        fi
50147      fi
50148    done
50149    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
50150    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
50151
50152    unset LLVM_LDFLAGS
50153    for flag in $("${LLVM_CONFIG}" --ldflags); do
50154      if echo "${flag}" | grep -q '^-L'; then
50155        if test "${LLVM_LDFLAGS}" != ""; then
50156          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
50157        fi
50158        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
50159      fi
50160    done
50161
50162    unset LLVM_LIBS
50163    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
50164      if echo "${flag}" | grep -q '^-l'; then
50165        if test "${LLVM_LIBS}" != ""; then
50166          LLVM_LIBS="${LLVM_LIBS} "
50167        fi
50168        LLVM_LIBS="${LLVM_LIBS}${flag}"
50169      fi
50170    done
50171
50172
50173
50174
50175  fi
50176
50177  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
50178  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
50179    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
50180  fi
50181
50182  # TODO better (platform agnostic) test
50183  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
50184    LIBCXX="-lstdc++"
50185  fi
50186
50187
50188
50189
50190  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50191
50192
50193# Check whether --with-msvcr-dll was given.
50194if test "${with_msvcr_dll+set}" = set; then :
50195  withval=$with_msvcr_dll;
50196fi
50197
50198
50199  if test "x$with_msvcr_dll" != x; then
50200    # If given explicitely by user, do not probe. If not present, fail directly.
50201
50202  DLL_NAME="$MSVCR_NAME"
50203  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50204  METHOD="--with-msvcr-dll"
50205  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50207$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50208
50209    # Need to check if the found msvcr is correct architecture
50210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50211$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50212    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50214      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50215      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50216      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50217        CORRECT_MSVCR_ARCH="PE32 executable"
50218      else
50219        CORRECT_MSVCR_ARCH="PE32+ executable"
50220      fi
50221    else
50222      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50223        CORRECT_MSVCR_ARCH=386
50224      else
50225        CORRECT_MSVCR_ARCH=x86-64
50226      fi
50227    fi
50228    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50230$as_echo "ok" >&6; }
50231      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50232
50233  # Only process if variable expands to non-empty
50234
50235  if test "x$MSVC_DLL" != x; then
50236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50237
50238  # Input might be given as Windows format, start by converting to
50239  # unix format.
50240  path="$MSVC_DLL"
50241  new_path=`$CYGPATH -u "$path"`
50242
50243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50246  # "foo.exe" is OK but "foo" is an error.
50247  #
50248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50249  # It is also a way to make sure we got the proper file name for the real test later on.
50250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50251  if test "x$test_shortpath" = x; then
50252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50253$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50254    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50255  fi
50256
50257  # Call helper function which possibly converts this using DOS-style short mode.
50258  # If so, the updated path is stored in $new_path.
50259
50260  input_path="$new_path"
50261  # Check if we need to convert this using DOS-style short mode. If the path
50262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50263  # take no chances and rewrite it.
50264  # Note: m4 eats our [], so we need to use [ and ] instead.
50265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50266  if test "x$has_forbidden_chars" != x; then
50267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50271      # Going to short mode and back again did indeed matter. Since short mode is
50272      # case insensitive, let's make it lowercase to improve readability.
50273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50274      # Now convert it back to Unix-style (cygpath)
50275      input_path=`$CYGPATH -u "$shortmode_path"`
50276      new_path="$input_path"
50277    fi
50278  fi
50279
50280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50281  if test "x$test_cygdrive_prefix" = x; then
50282    # As a simple fix, exclude /usr/bin since it's not a real path.
50283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50285      # a path prefixed by /cygdrive for fixpath to work.
50286      new_path="$CYGWIN_ROOT_PATH$input_path"
50287    fi
50288  fi
50289
50290
50291  if test "x$path" != "x$new_path"; then
50292    MSVC_DLL="$new_path"
50293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50294$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50295  fi
50296
50297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50298
50299  path="$MSVC_DLL"
50300  has_colon=`$ECHO $path | $GREP ^.:`
50301  new_path="$path"
50302  if test "x$has_colon" = x; then
50303    # Not in mixed or Windows style, start by that.
50304    new_path=`cmd //c echo $path`
50305  fi
50306
50307
50308  input_path="$new_path"
50309  # Check if we need to convert this using DOS-style short mode. If the path
50310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50311  # take no chances and rewrite it.
50312  # Note: m4 eats our [], so we need to use [ and ] instead.
50313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50314  if test "x$has_forbidden_chars" != x; then
50315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50317  fi
50318
50319
50320  windows_path="$new_path"
50321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50322    unix_path=`$CYGPATH -u "$windows_path"`
50323    new_path="$unix_path"
50324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50326    new_path="$unix_path"
50327  fi
50328
50329  if test "x$path" != "x$new_path"; then
50330    MSVC_DLL="$new_path"
50331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50332$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50333  fi
50334
50335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50337
50338    else
50339      # We're on a unix platform. Hooray! :)
50340      path="$MSVC_DLL"
50341      has_space=`$ECHO "$path" | $GREP " "`
50342      if test "x$has_space" != x; then
50343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50344$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50346      fi
50347
50348      # Use eval to expand a potential ~
50349      eval path="$path"
50350      if test ! -f "$path" && test ! -d "$path"; then
50351        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50352      fi
50353
50354      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50355    fi
50356  fi
50357
50358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50359$as_echo_n "checking for $DLL_NAME... " >&6; }
50360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50361$as_echo "$MSVC_DLL" >&6; }
50362    else
50363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50364$as_echo "incorrect, ignoring" >&6; }
50365      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50366$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50367    fi
50368  fi
50369
50370    if test "x$MSVC_DLL" = x; then
50371      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50372    fi
50373    MSVCR_DLL="$MSVC_DLL"
50374  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50375
50376  DLL_NAME="$MSVCR_NAME"
50377  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50378  METHOD="devkit"
50379  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50380    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50381$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50382
50383    # Need to check if the found msvcr is correct architecture
50384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50385$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50386    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50388      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50389      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50390      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50391        CORRECT_MSVCR_ARCH="PE32 executable"
50392      else
50393        CORRECT_MSVCR_ARCH="PE32+ executable"
50394      fi
50395    else
50396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50397        CORRECT_MSVCR_ARCH=386
50398      else
50399        CORRECT_MSVCR_ARCH=x86-64
50400      fi
50401    fi
50402    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50404$as_echo "ok" >&6; }
50405      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50406
50407  # Only process if variable expands to non-empty
50408
50409  if test "x$MSVC_DLL" != x; then
50410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50411
50412  # Input might be given as Windows format, start by converting to
50413  # unix format.
50414  path="$MSVC_DLL"
50415  new_path=`$CYGPATH -u "$path"`
50416
50417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50420  # "foo.exe" is OK but "foo" is an error.
50421  #
50422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50423  # It is also a way to make sure we got the proper file name for the real test later on.
50424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50425  if test "x$test_shortpath" = x; then
50426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50427$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50428    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50429  fi
50430
50431  # Call helper function which possibly converts this using DOS-style short mode.
50432  # If so, the updated path is stored in $new_path.
50433
50434  input_path="$new_path"
50435  # Check if we need to convert this using DOS-style short mode. If the path
50436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50437  # take no chances and rewrite it.
50438  # Note: m4 eats our [], so we need to use [ and ] instead.
50439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50440  if test "x$has_forbidden_chars" != x; then
50441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50445      # Going to short mode and back again did indeed matter. Since short mode is
50446      # case insensitive, let's make it lowercase to improve readability.
50447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50448      # Now convert it back to Unix-style (cygpath)
50449      input_path=`$CYGPATH -u "$shortmode_path"`
50450      new_path="$input_path"
50451    fi
50452  fi
50453
50454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50455  if test "x$test_cygdrive_prefix" = x; then
50456    # As a simple fix, exclude /usr/bin since it's not a real path.
50457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50459      # a path prefixed by /cygdrive for fixpath to work.
50460      new_path="$CYGWIN_ROOT_PATH$input_path"
50461    fi
50462  fi
50463
50464
50465  if test "x$path" != "x$new_path"; then
50466    MSVC_DLL="$new_path"
50467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50469  fi
50470
50471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50472
50473  path="$MSVC_DLL"
50474  has_colon=`$ECHO $path | $GREP ^.:`
50475  new_path="$path"
50476  if test "x$has_colon" = x; then
50477    # Not in mixed or Windows style, start by that.
50478    new_path=`cmd //c echo $path`
50479  fi
50480
50481
50482  input_path="$new_path"
50483  # Check if we need to convert this using DOS-style short mode. If the path
50484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50485  # take no chances and rewrite it.
50486  # Note: m4 eats our [], so we need to use [ and ] instead.
50487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50488  if test "x$has_forbidden_chars" != x; then
50489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50491  fi
50492
50493
50494  windows_path="$new_path"
50495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50496    unix_path=`$CYGPATH -u "$windows_path"`
50497    new_path="$unix_path"
50498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50500    new_path="$unix_path"
50501  fi
50502
50503  if test "x$path" != "x$new_path"; then
50504    MSVC_DLL="$new_path"
50505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50506$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50507  fi
50508
50509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50511
50512    else
50513      # We're on a unix platform. Hooray! :)
50514      path="$MSVC_DLL"
50515      has_space=`$ECHO "$path" | $GREP " "`
50516      if test "x$has_space" != x; then
50517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50518$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50520      fi
50521
50522      # Use eval to expand a potential ~
50523      eval path="$path"
50524      if test ! -f "$path" && test ! -d "$path"; then
50525        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50526      fi
50527
50528      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50529    fi
50530  fi
50531
50532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50533$as_echo_n "checking for $DLL_NAME... " >&6; }
50534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50535$as_echo "$MSVC_DLL" >&6; }
50536    else
50537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50538$as_echo "incorrect, ignoring" >&6; }
50539      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50540$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50541    fi
50542  fi
50543
50544    if test "x$MSVC_DLL" = x; then
50545      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50546    fi
50547    MSVCR_DLL="$MSVC_DLL"
50548  else
50549
50550  DLL_NAME="${MSVCR_NAME}"
50551  MSVC_DLL=
50552
50553  if test "x$MSVC_DLL" = x; then
50554    # Probe: Using well-known location from Visual Studio 10.0
50555    if test "x$VCINSTALLDIR" != x; then
50556      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50557
50558  windows_path="$CYGWIN_VC_INSTALL_DIR"
50559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50560    unix_path=`$CYGPATH -u "$windows_path"`
50561    CYGWIN_VC_INSTALL_DIR="$unix_path"
50562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50564    CYGWIN_VC_INSTALL_DIR="$unix_path"
50565  fi
50566
50567      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50568        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50569      else
50570        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50571      fi
50572      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50573
50574  DLL_NAME="$DLL_NAME"
50575  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50576  METHOD="well-known location in VCINSTALLDIR"
50577  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50579$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50580
50581    # Need to check if the found msvcr is correct architecture
50582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50583$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50584    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50586      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50587      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50588      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50589        CORRECT_MSVCR_ARCH="PE32 executable"
50590      else
50591        CORRECT_MSVCR_ARCH="PE32+ executable"
50592      fi
50593    else
50594      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50595        CORRECT_MSVCR_ARCH=386
50596      else
50597        CORRECT_MSVCR_ARCH=x86-64
50598      fi
50599    fi
50600    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50602$as_echo "ok" >&6; }
50603      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50604
50605  # Only process if variable expands to non-empty
50606
50607  if test "x$MSVC_DLL" != x; then
50608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50609
50610  # Input might be given as Windows format, start by converting to
50611  # unix format.
50612  path="$MSVC_DLL"
50613  new_path=`$CYGPATH -u "$path"`
50614
50615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50618  # "foo.exe" is OK but "foo" is an error.
50619  #
50620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50621  # It is also a way to make sure we got the proper file name for the real test later on.
50622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50623  if test "x$test_shortpath" = x; then
50624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50625$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50626    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50627  fi
50628
50629  # Call helper function which possibly converts this using DOS-style short mode.
50630  # If so, the updated path is stored in $new_path.
50631
50632  input_path="$new_path"
50633  # Check if we need to convert this using DOS-style short mode. If the path
50634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50635  # take no chances and rewrite it.
50636  # Note: m4 eats our [], so we need to use [ and ] instead.
50637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50638  if test "x$has_forbidden_chars" != x; then
50639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50643      # Going to short mode and back again did indeed matter. Since short mode is
50644      # case insensitive, let's make it lowercase to improve readability.
50645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50646      # Now convert it back to Unix-style (cygpath)
50647      input_path=`$CYGPATH -u "$shortmode_path"`
50648      new_path="$input_path"
50649    fi
50650  fi
50651
50652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50653  if test "x$test_cygdrive_prefix" = x; then
50654    # As a simple fix, exclude /usr/bin since it's not a real path.
50655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50657      # a path prefixed by /cygdrive for fixpath to work.
50658      new_path="$CYGWIN_ROOT_PATH$input_path"
50659    fi
50660  fi
50661
50662
50663  if test "x$path" != "x$new_path"; then
50664    MSVC_DLL="$new_path"
50665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50666$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50667  fi
50668
50669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50670
50671  path="$MSVC_DLL"
50672  has_colon=`$ECHO $path | $GREP ^.:`
50673  new_path="$path"
50674  if test "x$has_colon" = x; then
50675    # Not in mixed or Windows style, start by that.
50676    new_path=`cmd //c echo $path`
50677  fi
50678
50679
50680  input_path="$new_path"
50681  # Check if we need to convert this using DOS-style short mode. If the path
50682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50683  # take no chances and rewrite it.
50684  # Note: m4 eats our [], so we need to use [ and ] instead.
50685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50686  if test "x$has_forbidden_chars" != x; then
50687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50689  fi
50690
50691
50692  windows_path="$new_path"
50693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50694    unix_path=`$CYGPATH -u "$windows_path"`
50695    new_path="$unix_path"
50696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50698    new_path="$unix_path"
50699  fi
50700
50701  if test "x$path" != "x$new_path"; then
50702    MSVC_DLL="$new_path"
50703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50704$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50705  fi
50706
50707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50709
50710    else
50711      # We're on a unix platform. Hooray! :)
50712      path="$MSVC_DLL"
50713      has_space=`$ECHO "$path" | $GREP " "`
50714      if test "x$has_space" != x; then
50715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50716$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50718      fi
50719
50720      # Use eval to expand a potential ~
50721      eval path="$path"
50722      if test ! -f "$path" && test ! -d "$path"; then
50723        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50724      fi
50725
50726      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50727    fi
50728  fi
50729
50730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50731$as_echo_n "checking for $DLL_NAME... " >&6; }
50732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50733$as_echo "$MSVC_DLL" >&6; }
50734    else
50735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50736$as_echo "incorrect, ignoring" >&6; }
50737      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50738$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50739    fi
50740  fi
50741
50742    fi
50743  fi
50744
50745  if test "x$MSVC_DLL" = x; then
50746    # Probe: Check in the Boot JDK directory.
50747    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50748
50749  DLL_NAME="$DLL_NAME"
50750  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50751  METHOD="well-known location in Boot JDK"
50752  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50753    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50754$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50755
50756    # Need to check if the found msvcr is correct architecture
50757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50758$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50759    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50761      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50762      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50763      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50764        CORRECT_MSVCR_ARCH="PE32 executable"
50765      else
50766        CORRECT_MSVCR_ARCH="PE32+ executable"
50767      fi
50768    else
50769      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50770        CORRECT_MSVCR_ARCH=386
50771      else
50772        CORRECT_MSVCR_ARCH=x86-64
50773      fi
50774    fi
50775    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50777$as_echo "ok" >&6; }
50778      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50779
50780  # Only process if variable expands to non-empty
50781
50782  if test "x$MSVC_DLL" != x; then
50783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50784
50785  # Input might be given as Windows format, start by converting to
50786  # unix format.
50787  path="$MSVC_DLL"
50788  new_path=`$CYGPATH -u "$path"`
50789
50790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50793  # "foo.exe" is OK but "foo" is an error.
50794  #
50795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50796  # It is also a way to make sure we got the proper file name for the real test later on.
50797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50798  if test "x$test_shortpath" = x; then
50799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50800$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50801    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50802  fi
50803
50804  # Call helper function which possibly converts this using DOS-style short mode.
50805  # If so, the updated path is stored in $new_path.
50806
50807  input_path="$new_path"
50808  # Check if we need to convert this using DOS-style short mode. If the path
50809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50810  # take no chances and rewrite it.
50811  # Note: m4 eats our [], so we need to use [ and ] instead.
50812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50813  if test "x$has_forbidden_chars" != x; then
50814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50818      # Going to short mode and back again did indeed matter. Since short mode is
50819      # case insensitive, let's make it lowercase to improve readability.
50820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50821      # Now convert it back to Unix-style (cygpath)
50822      input_path=`$CYGPATH -u "$shortmode_path"`
50823      new_path="$input_path"
50824    fi
50825  fi
50826
50827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50828  if test "x$test_cygdrive_prefix" = x; then
50829    # As a simple fix, exclude /usr/bin since it's not a real path.
50830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50832      # a path prefixed by /cygdrive for fixpath to work.
50833      new_path="$CYGWIN_ROOT_PATH$input_path"
50834    fi
50835  fi
50836
50837
50838  if test "x$path" != "x$new_path"; then
50839    MSVC_DLL="$new_path"
50840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50841$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50842  fi
50843
50844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50845
50846  path="$MSVC_DLL"
50847  has_colon=`$ECHO $path | $GREP ^.:`
50848  new_path="$path"
50849  if test "x$has_colon" = x; then
50850    # Not in mixed or Windows style, start by that.
50851    new_path=`cmd //c echo $path`
50852  fi
50853
50854
50855  input_path="$new_path"
50856  # Check if we need to convert this using DOS-style short mode. If the path
50857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50858  # take no chances and rewrite it.
50859  # Note: m4 eats our [], so we need to use [ and ] instead.
50860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50861  if test "x$has_forbidden_chars" != x; then
50862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50864  fi
50865
50866
50867  windows_path="$new_path"
50868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50869    unix_path=`$CYGPATH -u "$windows_path"`
50870    new_path="$unix_path"
50871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50873    new_path="$unix_path"
50874  fi
50875
50876  if test "x$path" != "x$new_path"; then
50877    MSVC_DLL="$new_path"
50878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50879$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50880  fi
50881
50882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50884
50885    else
50886      # We're on a unix platform. Hooray! :)
50887      path="$MSVC_DLL"
50888      has_space=`$ECHO "$path" | $GREP " "`
50889      if test "x$has_space" != x; then
50890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50891$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50892        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50893      fi
50894
50895      # Use eval to expand a potential ~
50896      eval path="$path"
50897      if test ! -f "$path" && test ! -d "$path"; then
50898        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50899      fi
50900
50901      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50902    fi
50903  fi
50904
50905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50906$as_echo_n "checking for $DLL_NAME... " >&6; }
50907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50908$as_echo "$MSVC_DLL" >&6; }
50909    else
50910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50911$as_echo "incorrect, ignoring" >&6; }
50912      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50913$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50914    fi
50915  fi
50916
50917  fi
50918
50919  if test "x$MSVC_DLL" = x; then
50920    # Probe: Look in the Windows system32 directory
50921    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50922
50923  windows_path="$CYGWIN_SYSTEMROOT"
50924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50925    unix_path=`$CYGPATH -u "$windows_path"`
50926    CYGWIN_SYSTEMROOT="$unix_path"
50927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50929    CYGWIN_SYSTEMROOT="$unix_path"
50930  fi
50931
50932    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50933
50934  DLL_NAME="$DLL_NAME"
50935  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50936  METHOD="well-known location in SYSTEMROOT"
50937  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50938    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50939$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50940
50941    # Need to check if the found msvcr is correct architecture
50942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50943$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50944    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50946      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50947      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50948      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50949        CORRECT_MSVCR_ARCH="PE32 executable"
50950      else
50951        CORRECT_MSVCR_ARCH="PE32+ executable"
50952      fi
50953    else
50954      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50955        CORRECT_MSVCR_ARCH=386
50956      else
50957        CORRECT_MSVCR_ARCH=x86-64
50958      fi
50959    fi
50960    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50962$as_echo "ok" >&6; }
50963      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50964
50965  # Only process if variable expands to non-empty
50966
50967  if test "x$MSVC_DLL" != x; then
50968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50969
50970  # Input might be given as Windows format, start by converting to
50971  # unix format.
50972  path="$MSVC_DLL"
50973  new_path=`$CYGPATH -u "$path"`
50974
50975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50978  # "foo.exe" is OK but "foo" is an error.
50979  #
50980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50981  # It is also a way to make sure we got the proper file name for the real test later on.
50982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50983  if test "x$test_shortpath" = x; then
50984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50985$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50986    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50987  fi
50988
50989  # Call helper function which possibly converts this using DOS-style short mode.
50990  # If so, the updated path is stored in $new_path.
50991
50992  input_path="$new_path"
50993  # Check if we need to convert this using DOS-style short mode. If the path
50994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50995  # take no chances and rewrite it.
50996  # Note: m4 eats our [], so we need to use [ and ] instead.
50997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50998  if test "x$has_forbidden_chars" != x; then
50999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51003      # Going to short mode and back again did indeed matter. Since short mode is
51004      # case insensitive, let's make it lowercase to improve readability.
51005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51006      # Now convert it back to Unix-style (cygpath)
51007      input_path=`$CYGPATH -u "$shortmode_path"`
51008      new_path="$input_path"
51009    fi
51010  fi
51011
51012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51013  if test "x$test_cygdrive_prefix" = x; then
51014    # As a simple fix, exclude /usr/bin since it's not a real path.
51015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51017      # a path prefixed by /cygdrive for fixpath to work.
51018      new_path="$CYGWIN_ROOT_PATH$input_path"
51019    fi
51020  fi
51021
51022
51023  if test "x$path" != "x$new_path"; then
51024    MSVC_DLL="$new_path"
51025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51026$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51027  fi
51028
51029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51030
51031  path="$MSVC_DLL"
51032  has_colon=`$ECHO $path | $GREP ^.:`
51033  new_path="$path"
51034  if test "x$has_colon" = x; then
51035    # Not in mixed or Windows style, start by that.
51036    new_path=`cmd //c echo $path`
51037  fi
51038
51039
51040  input_path="$new_path"
51041  # Check if we need to convert this using DOS-style short mode. If the path
51042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51043  # take no chances and rewrite it.
51044  # Note: m4 eats our [], so we need to use [ and ] instead.
51045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51046  if test "x$has_forbidden_chars" != x; then
51047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51049  fi
51050
51051
51052  windows_path="$new_path"
51053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51054    unix_path=`$CYGPATH -u "$windows_path"`
51055    new_path="$unix_path"
51056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51058    new_path="$unix_path"
51059  fi
51060
51061  if test "x$path" != "x$new_path"; then
51062    MSVC_DLL="$new_path"
51063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51064$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51065  fi
51066
51067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51069
51070    else
51071      # We're on a unix platform. Hooray! :)
51072      path="$MSVC_DLL"
51073      has_space=`$ECHO "$path" | $GREP " "`
51074      if test "x$has_space" != x; then
51075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51076$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51078      fi
51079
51080      # Use eval to expand a potential ~
51081      eval path="$path"
51082      if test ! -f "$path" && test ! -d "$path"; then
51083        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51084      fi
51085
51086      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51087    fi
51088  fi
51089
51090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51091$as_echo_n "checking for $DLL_NAME... " >&6; }
51092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51093$as_echo "$MSVC_DLL" >&6; }
51094    else
51095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51096$as_echo "incorrect, ignoring" >&6; }
51097      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51098$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51099    fi
51100  fi
51101
51102  fi
51103
51104  if test "x$MSVC_DLL" = x; then
51105    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51106    if test "x$VS100COMNTOOLS" != x; then
51107      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51108
51109  windows_path="$CYGWIN_VS_TOOLS_DIR"
51110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51111    unix_path=`$CYGPATH -u "$windows_path"`
51112    CYGWIN_VS_TOOLS_DIR="$unix_path"
51113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51115    CYGWIN_VS_TOOLS_DIR="$unix_path"
51116  fi
51117
51118      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51119        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51120	    | $GREP -i /x64/ | $HEAD --lines 1`
51121      else
51122        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51123	    | $GREP -i /x86/ | $HEAD --lines 1`
51124      fi
51125
51126  DLL_NAME="$DLL_NAME"
51127  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51128  METHOD="search of VS100COMNTOOLS"
51129  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51130    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51131$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51132
51133    # Need to check if the found msvcr is correct architecture
51134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51135$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51136    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51138      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51139      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51140      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51141        CORRECT_MSVCR_ARCH="PE32 executable"
51142      else
51143        CORRECT_MSVCR_ARCH="PE32+ executable"
51144      fi
51145    else
51146      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51147        CORRECT_MSVCR_ARCH=386
51148      else
51149        CORRECT_MSVCR_ARCH=x86-64
51150      fi
51151    fi
51152    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51154$as_echo "ok" >&6; }
51155      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51156
51157  # Only process if variable expands to non-empty
51158
51159  if test "x$MSVC_DLL" != x; then
51160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51161
51162  # Input might be given as Windows format, start by converting to
51163  # unix format.
51164  path="$MSVC_DLL"
51165  new_path=`$CYGPATH -u "$path"`
51166
51167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51170  # "foo.exe" is OK but "foo" is an error.
51171  #
51172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51173  # It is also a way to make sure we got the proper file name for the real test later on.
51174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51175  if test "x$test_shortpath" = x; then
51176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51177$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51178    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51179  fi
51180
51181  # Call helper function which possibly converts this using DOS-style short mode.
51182  # If so, the updated path is stored in $new_path.
51183
51184  input_path="$new_path"
51185  # Check if we need to convert this using DOS-style short mode. If the path
51186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51187  # take no chances and rewrite it.
51188  # Note: m4 eats our [], so we need to use [ and ] instead.
51189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51190  if test "x$has_forbidden_chars" != x; then
51191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51195      # Going to short mode and back again did indeed matter. Since short mode is
51196      # case insensitive, let's make it lowercase to improve readability.
51197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51198      # Now convert it back to Unix-style (cygpath)
51199      input_path=`$CYGPATH -u "$shortmode_path"`
51200      new_path="$input_path"
51201    fi
51202  fi
51203
51204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51205  if test "x$test_cygdrive_prefix" = x; then
51206    # As a simple fix, exclude /usr/bin since it's not a real path.
51207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51209      # a path prefixed by /cygdrive for fixpath to work.
51210      new_path="$CYGWIN_ROOT_PATH$input_path"
51211    fi
51212  fi
51213
51214
51215  if test "x$path" != "x$new_path"; then
51216    MSVC_DLL="$new_path"
51217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51218$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51219  fi
51220
51221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51222
51223  path="$MSVC_DLL"
51224  has_colon=`$ECHO $path | $GREP ^.:`
51225  new_path="$path"
51226  if test "x$has_colon" = x; then
51227    # Not in mixed or Windows style, start by that.
51228    new_path=`cmd //c echo $path`
51229  fi
51230
51231
51232  input_path="$new_path"
51233  # Check if we need to convert this using DOS-style short mode. If the path
51234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51235  # take no chances and rewrite it.
51236  # Note: m4 eats our [], so we need to use [ and ] instead.
51237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51238  if test "x$has_forbidden_chars" != x; then
51239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51241  fi
51242
51243
51244  windows_path="$new_path"
51245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51246    unix_path=`$CYGPATH -u "$windows_path"`
51247    new_path="$unix_path"
51248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51250    new_path="$unix_path"
51251  fi
51252
51253  if test "x$path" != "x$new_path"; then
51254    MSVC_DLL="$new_path"
51255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51256$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51257  fi
51258
51259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51261
51262    else
51263      # We're on a unix platform. Hooray! :)
51264      path="$MSVC_DLL"
51265      has_space=`$ECHO "$path" | $GREP " "`
51266      if test "x$has_space" != x; then
51267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51268$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51270      fi
51271
51272      # Use eval to expand a potential ~
51273      eval path="$path"
51274      if test ! -f "$path" && test ! -d "$path"; then
51275        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51276      fi
51277
51278      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51279    fi
51280  fi
51281
51282      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51283$as_echo_n "checking for $DLL_NAME... " >&6; }
51284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51285$as_echo "$MSVC_DLL" >&6; }
51286    else
51287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51288$as_echo "incorrect, ignoring" >&6; }
51289      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51290$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51291    fi
51292  fi
51293
51294    fi
51295  fi
51296
51297  if test "x$MSVC_DLL" = x; then
51298    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51299    # (This was the original behaviour; kept since it might turn something up)
51300    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51301      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51302        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51303	    | $GREP x64 | $HEAD --lines 1`
51304      else
51305        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51306	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51307        if test "x$POSSIBLE_MSVC_DLL" = x; then
51308          # We're grasping at straws now...
51309          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51310	      | $HEAD --lines 1`
51311        fi
51312      fi
51313
51314
51315  DLL_NAME="$DLL_NAME"
51316  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51317  METHOD="search of VCINSTALLDIR"
51318  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51319    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51320$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51321
51322    # Need to check if the found msvcr is correct architecture
51323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51324$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51325    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51327      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51328      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51329      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51330        CORRECT_MSVCR_ARCH="PE32 executable"
51331      else
51332        CORRECT_MSVCR_ARCH="PE32+ executable"
51333      fi
51334    else
51335      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51336        CORRECT_MSVCR_ARCH=386
51337      else
51338        CORRECT_MSVCR_ARCH=x86-64
51339      fi
51340    fi
51341    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51343$as_echo "ok" >&6; }
51344      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51345
51346  # Only process if variable expands to non-empty
51347
51348  if test "x$MSVC_DLL" != x; then
51349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51350
51351  # Input might be given as Windows format, start by converting to
51352  # unix format.
51353  path="$MSVC_DLL"
51354  new_path=`$CYGPATH -u "$path"`
51355
51356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51359  # "foo.exe" is OK but "foo" is an error.
51360  #
51361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51362  # It is also a way to make sure we got the proper file name for the real test later on.
51363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51364  if test "x$test_shortpath" = x; then
51365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51366$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51367    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51368  fi
51369
51370  # Call helper function which possibly converts this using DOS-style short mode.
51371  # If so, the updated path is stored in $new_path.
51372
51373  input_path="$new_path"
51374  # Check if we need to convert this using DOS-style short mode. If the path
51375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51376  # take no chances and rewrite it.
51377  # Note: m4 eats our [], so we need to use [ and ] instead.
51378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51379  if test "x$has_forbidden_chars" != x; then
51380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51384      # Going to short mode and back again did indeed matter. Since short mode is
51385      # case insensitive, let's make it lowercase to improve readability.
51386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51387      # Now convert it back to Unix-style (cygpath)
51388      input_path=`$CYGPATH -u "$shortmode_path"`
51389      new_path="$input_path"
51390    fi
51391  fi
51392
51393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51394  if test "x$test_cygdrive_prefix" = x; then
51395    # As a simple fix, exclude /usr/bin since it's not a real path.
51396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51398      # a path prefixed by /cygdrive for fixpath to work.
51399      new_path="$CYGWIN_ROOT_PATH$input_path"
51400    fi
51401  fi
51402
51403
51404  if test "x$path" != "x$new_path"; then
51405    MSVC_DLL="$new_path"
51406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51407$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51408  fi
51409
51410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51411
51412  path="$MSVC_DLL"
51413  has_colon=`$ECHO $path | $GREP ^.:`
51414  new_path="$path"
51415  if test "x$has_colon" = x; then
51416    # Not in mixed or Windows style, start by that.
51417    new_path=`cmd //c echo $path`
51418  fi
51419
51420
51421  input_path="$new_path"
51422  # Check if we need to convert this using DOS-style short mode. If the path
51423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51424  # take no chances and rewrite it.
51425  # Note: m4 eats our [], so we need to use [ and ] instead.
51426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51427  if test "x$has_forbidden_chars" != x; then
51428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51430  fi
51431
51432
51433  windows_path="$new_path"
51434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51435    unix_path=`$CYGPATH -u "$windows_path"`
51436    new_path="$unix_path"
51437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51439    new_path="$unix_path"
51440  fi
51441
51442  if test "x$path" != "x$new_path"; then
51443    MSVC_DLL="$new_path"
51444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51445$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51446  fi
51447
51448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51450
51451    else
51452      # We're on a unix platform. Hooray! :)
51453      path="$MSVC_DLL"
51454      has_space=`$ECHO "$path" | $GREP " "`
51455      if test "x$has_space" != x; then
51456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51457$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51459      fi
51460
51461      # Use eval to expand a potential ~
51462      eval path="$path"
51463      if test ! -f "$path" && test ! -d "$path"; then
51464        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51465      fi
51466
51467      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51468    fi
51469  fi
51470
51471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51472$as_echo_n "checking for $DLL_NAME... " >&6; }
51473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51474$as_echo "$MSVC_DLL" >&6; }
51475    else
51476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51477$as_echo "incorrect, ignoring" >&6; }
51478      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51479$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51480    fi
51481  fi
51482
51483    fi
51484  fi
51485
51486  if test "x$MSVC_DLL" = x; then
51487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51488$as_echo_n "checking for $DLL_NAME... " >&6; }
51489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51490$as_echo "no" >&6; }
51491    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51492  fi
51493
51494    MSVCR_DLL="$MSVC_DLL"
51495  fi
51496
51497
51498
51499# Check whether --with-msvcp-dll was given.
51500if test "${with_msvcp_dll+set}" = set; then :
51501  withval=$with_msvcp_dll;
51502fi
51503
51504
51505  if test "x$MSVCP_NAME" != "x"; then
51506    if test "x$with_msvcp_dll" != x; then
51507      # If given explicitely by user, do not probe. If not present, fail directly.
51508
51509  DLL_NAME="$MSVCP_NAME"
51510  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51511  METHOD="--with-msvcp-dll"
51512  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51513    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51514$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51515
51516    # Need to check if the found msvcr is correct architecture
51517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51518$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51519    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51521      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51522      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51524        CORRECT_MSVCR_ARCH="PE32 executable"
51525      else
51526        CORRECT_MSVCR_ARCH="PE32+ executable"
51527      fi
51528    else
51529      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51530        CORRECT_MSVCR_ARCH=386
51531      else
51532        CORRECT_MSVCR_ARCH=x86-64
51533      fi
51534    fi
51535    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51537$as_echo "ok" >&6; }
51538      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51539
51540  # Only process if variable expands to non-empty
51541
51542  if test "x$MSVC_DLL" != x; then
51543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51544
51545  # Input might be given as Windows format, start by converting to
51546  # unix format.
51547  path="$MSVC_DLL"
51548  new_path=`$CYGPATH -u "$path"`
51549
51550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51553  # "foo.exe" is OK but "foo" is an error.
51554  #
51555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51556  # It is also a way to make sure we got the proper file name for the real test later on.
51557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51558  if test "x$test_shortpath" = x; then
51559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51560$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51561    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51562  fi
51563
51564  # Call helper function which possibly converts this using DOS-style short mode.
51565  # If so, the updated path is stored in $new_path.
51566
51567  input_path="$new_path"
51568  # Check if we need to convert this using DOS-style short mode. If the path
51569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51570  # take no chances and rewrite it.
51571  # Note: m4 eats our [], so we need to use [ and ] instead.
51572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51573  if test "x$has_forbidden_chars" != x; then
51574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51578      # Going to short mode and back again did indeed matter. Since short mode is
51579      # case insensitive, let's make it lowercase to improve readability.
51580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51581      # Now convert it back to Unix-style (cygpath)
51582      input_path=`$CYGPATH -u "$shortmode_path"`
51583      new_path="$input_path"
51584    fi
51585  fi
51586
51587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51588  if test "x$test_cygdrive_prefix" = x; then
51589    # As a simple fix, exclude /usr/bin since it's not a real path.
51590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51592      # a path prefixed by /cygdrive for fixpath to work.
51593      new_path="$CYGWIN_ROOT_PATH$input_path"
51594    fi
51595  fi
51596
51597
51598  if test "x$path" != "x$new_path"; then
51599    MSVC_DLL="$new_path"
51600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51602  fi
51603
51604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51605
51606  path="$MSVC_DLL"
51607  has_colon=`$ECHO $path | $GREP ^.:`
51608  new_path="$path"
51609  if test "x$has_colon" = x; then
51610    # Not in mixed or Windows style, start by that.
51611    new_path=`cmd //c echo $path`
51612  fi
51613
51614
51615  input_path="$new_path"
51616  # Check if we need to convert this using DOS-style short mode. If the path
51617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51618  # take no chances and rewrite it.
51619  # Note: m4 eats our [], so we need to use [ and ] instead.
51620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51621  if test "x$has_forbidden_chars" != x; then
51622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51624  fi
51625
51626
51627  windows_path="$new_path"
51628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51629    unix_path=`$CYGPATH -u "$windows_path"`
51630    new_path="$unix_path"
51631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51633    new_path="$unix_path"
51634  fi
51635
51636  if test "x$path" != "x$new_path"; then
51637    MSVC_DLL="$new_path"
51638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51639$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51640  fi
51641
51642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51644
51645    else
51646      # We're on a unix platform. Hooray! :)
51647      path="$MSVC_DLL"
51648      has_space=`$ECHO "$path" | $GREP " "`
51649      if test "x$has_space" != x; then
51650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51651$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51653      fi
51654
51655      # Use eval to expand a potential ~
51656      eval path="$path"
51657      if test ! -f "$path" && test ! -d "$path"; then
51658        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51659      fi
51660
51661      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51662    fi
51663  fi
51664
51665      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51666$as_echo_n "checking for $DLL_NAME... " >&6; }
51667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51668$as_echo "$MSVC_DLL" >&6; }
51669    else
51670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51671$as_echo "incorrect, ignoring" >&6; }
51672      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51673$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51674    fi
51675  fi
51676
51677      if test "x$MSVC_DLL" = x; then
51678        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51679      fi
51680      MSVCP_DLL="$MSVC_DLL"
51681    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51682
51683  DLL_NAME="$MSVCP_NAME"
51684  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51685  METHOD="devkit"
51686  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51687    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51688$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51689
51690    # Need to check if the found msvcr is correct architecture
51691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51692$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51693    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51695      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51696      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51697      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51698        CORRECT_MSVCR_ARCH="PE32 executable"
51699      else
51700        CORRECT_MSVCR_ARCH="PE32+ executable"
51701      fi
51702    else
51703      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51704        CORRECT_MSVCR_ARCH=386
51705      else
51706        CORRECT_MSVCR_ARCH=x86-64
51707      fi
51708    fi
51709    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51711$as_echo "ok" >&6; }
51712      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51713
51714  # Only process if variable expands to non-empty
51715
51716  if test "x$MSVC_DLL" != x; then
51717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51718
51719  # Input might be given as Windows format, start by converting to
51720  # unix format.
51721  path="$MSVC_DLL"
51722  new_path=`$CYGPATH -u "$path"`
51723
51724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51727  # "foo.exe" is OK but "foo" is an error.
51728  #
51729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51730  # It is also a way to make sure we got the proper file name for the real test later on.
51731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51732  if test "x$test_shortpath" = x; then
51733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51734$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51735    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51736  fi
51737
51738  # Call helper function which possibly converts this using DOS-style short mode.
51739  # If so, the updated path is stored in $new_path.
51740
51741  input_path="$new_path"
51742  # Check if we need to convert this using DOS-style short mode. If the path
51743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51744  # take no chances and rewrite it.
51745  # Note: m4 eats our [], so we need to use [ and ] instead.
51746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51747  if test "x$has_forbidden_chars" != x; then
51748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51752      # Going to short mode and back again did indeed matter. Since short mode is
51753      # case insensitive, let's make it lowercase to improve readability.
51754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51755      # Now convert it back to Unix-style (cygpath)
51756      input_path=`$CYGPATH -u "$shortmode_path"`
51757      new_path="$input_path"
51758    fi
51759  fi
51760
51761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51762  if test "x$test_cygdrive_prefix" = x; then
51763    # As a simple fix, exclude /usr/bin since it's not a real path.
51764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51766      # a path prefixed by /cygdrive for fixpath to work.
51767      new_path="$CYGWIN_ROOT_PATH$input_path"
51768    fi
51769  fi
51770
51771
51772  if test "x$path" != "x$new_path"; then
51773    MSVC_DLL="$new_path"
51774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51775$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51776  fi
51777
51778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51779
51780  path="$MSVC_DLL"
51781  has_colon=`$ECHO $path | $GREP ^.:`
51782  new_path="$path"
51783  if test "x$has_colon" = x; then
51784    # Not in mixed or Windows style, start by that.
51785    new_path=`cmd //c echo $path`
51786  fi
51787
51788
51789  input_path="$new_path"
51790  # Check if we need to convert this using DOS-style short mode. If the path
51791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51792  # take no chances and rewrite it.
51793  # Note: m4 eats our [], so we need to use [ and ] instead.
51794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51795  if test "x$has_forbidden_chars" != x; then
51796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51798  fi
51799
51800
51801  windows_path="$new_path"
51802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51803    unix_path=`$CYGPATH -u "$windows_path"`
51804    new_path="$unix_path"
51805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51807    new_path="$unix_path"
51808  fi
51809
51810  if test "x$path" != "x$new_path"; then
51811    MSVC_DLL="$new_path"
51812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51813$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51814  fi
51815
51816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51818
51819    else
51820      # We're on a unix platform. Hooray! :)
51821      path="$MSVC_DLL"
51822      has_space=`$ECHO "$path" | $GREP " "`
51823      if test "x$has_space" != x; then
51824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51825$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51827      fi
51828
51829      # Use eval to expand a potential ~
51830      eval path="$path"
51831      if test ! -f "$path" && test ! -d "$path"; then
51832        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51833      fi
51834
51835      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51836    fi
51837  fi
51838
51839      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51840$as_echo_n "checking for $DLL_NAME... " >&6; }
51841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51842$as_echo "$MSVC_DLL" >&6; }
51843    else
51844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51845$as_echo "incorrect, ignoring" >&6; }
51846      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51847$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51848    fi
51849  fi
51850
51851      if test "x$MSVC_DLL" = x; then
51852        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51853      fi
51854      MSVCP_DLL="$MSVC_DLL"
51855    else
51856
51857  DLL_NAME="${MSVCP_NAME}"
51858  MSVC_DLL=
51859
51860  if test "x$MSVC_DLL" = x; then
51861    # Probe: Using well-known location from Visual Studio 10.0
51862    if test "x$VCINSTALLDIR" != x; then
51863      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51864
51865  windows_path="$CYGWIN_VC_INSTALL_DIR"
51866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51867    unix_path=`$CYGPATH -u "$windows_path"`
51868    CYGWIN_VC_INSTALL_DIR="$unix_path"
51869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51871    CYGWIN_VC_INSTALL_DIR="$unix_path"
51872  fi
51873
51874      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51875        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51876      else
51877        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51878      fi
51879      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51880
51881  DLL_NAME="$DLL_NAME"
51882  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51883  METHOD="well-known location in VCINSTALLDIR"
51884  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51886$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51887
51888    # Need to check if the found msvcr is correct architecture
51889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51890$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51891    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51893      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51894      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51896        CORRECT_MSVCR_ARCH="PE32 executable"
51897      else
51898        CORRECT_MSVCR_ARCH="PE32+ executable"
51899      fi
51900    else
51901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51902        CORRECT_MSVCR_ARCH=386
51903      else
51904        CORRECT_MSVCR_ARCH=x86-64
51905      fi
51906    fi
51907    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51909$as_echo "ok" >&6; }
51910      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51911
51912  # Only process if variable expands to non-empty
51913
51914  if test "x$MSVC_DLL" != x; then
51915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51916
51917  # Input might be given as Windows format, start by converting to
51918  # unix format.
51919  path="$MSVC_DLL"
51920  new_path=`$CYGPATH -u "$path"`
51921
51922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51925  # "foo.exe" is OK but "foo" is an error.
51926  #
51927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51928  # It is also a way to make sure we got the proper file name for the real test later on.
51929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51930  if test "x$test_shortpath" = x; then
51931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51933    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51934  fi
51935
51936  # Call helper function which possibly converts this using DOS-style short mode.
51937  # If so, the updated path is stored in $new_path.
51938
51939  input_path="$new_path"
51940  # Check if we need to convert this using DOS-style short mode. If the path
51941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51942  # take no chances and rewrite it.
51943  # Note: m4 eats our [], so we need to use [ and ] instead.
51944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51945  if test "x$has_forbidden_chars" != x; then
51946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51950      # Going to short mode and back again did indeed matter. Since short mode is
51951      # case insensitive, let's make it lowercase to improve readability.
51952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51953      # Now convert it back to Unix-style (cygpath)
51954      input_path=`$CYGPATH -u "$shortmode_path"`
51955      new_path="$input_path"
51956    fi
51957  fi
51958
51959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51960  if test "x$test_cygdrive_prefix" = x; then
51961    # As a simple fix, exclude /usr/bin since it's not a real path.
51962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51964      # a path prefixed by /cygdrive for fixpath to work.
51965      new_path="$CYGWIN_ROOT_PATH$input_path"
51966    fi
51967  fi
51968
51969
51970  if test "x$path" != "x$new_path"; then
51971    MSVC_DLL="$new_path"
51972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51973$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51974  fi
51975
51976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51977
51978  path="$MSVC_DLL"
51979  has_colon=`$ECHO $path | $GREP ^.:`
51980  new_path="$path"
51981  if test "x$has_colon" = x; then
51982    # Not in mixed or Windows style, start by that.
51983    new_path=`cmd //c echo $path`
51984  fi
51985
51986
51987  input_path="$new_path"
51988  # Check if we need to convert this using DOS-style short mode. If the path
51989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51990  # take no chances and rewrite it.
51991  # Note: m4 eats our [], so we need to use [ and ] instead.
51992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51993  if test "x$has_forbidden_chars" != x; then
51994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51996  fi
51997
51998
51999  windows_path="$new_path"
52000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52001    unix_path=`$CYGPATH -u "$windows_path"`
52002    new_path="$unix_path"
52003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52005    new_path="$unix_path"
52006  fi
52007
52008  if test "x$path" != "x$new_path"; then
52009    MSVC_DLL="$new_path"
52010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52011$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52012  fi
52013
52014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52016
52017    else
52018      # We're on a unix platform. Hooray! :)
52019      path="$MSVC_DLL"
52020      has_space=`$ECHO "$path" | $GREP " "`
52021      if test "x$has_space" != x; then
52022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52023$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52025      fi
52026
52027      # Use eval to expand a potential ~
52028      eval path="$path"
52029      if test ! -f "$path" && test ! -d "$path"; then
52030        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52031      fi
52032
52033      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52034    fi
52035  fi
52036
52037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52038$as_echo_n "checking for $DLL_NAME... " >&6; }
52039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52040$as_echo "$MSVC_DLL" >&6; }
52041    else
52042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52043$as_echo "incorrect, ignoring" >&6; }
52044      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52045$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52046    fi
52047  fi
52048
52049    fi
52050  fi
52051
52052  if test "x$MSVC_DLL" = x; then
52053    # Probe: Check in the Boot JDK directory.
52054    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
52055
52056  DLL_NAME="$DLL_NAME"
52057  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52058  METHOD="well-known location in Boot JDK"
52059  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52060    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52061$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52062
52063    # Need to check if the found msvcr is correct architecture
52064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52065$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52066    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52068      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52069      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52070      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52071        CORRECT_MSVCR_ARCH="PE32 executable"
52072      else
52073        CORRECT_MSVCR_ARCH="PE32+ executable"
52074      fi
52075    else
52076      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52077        CORRECT_MSVCR_ARCH=386
52078      else
52079        CORRECT_MSVCR_ARCH=x86-64
52080      fi
52081    fi
52082    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52084$as_echo "ok" >&6; }
52085      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52086
52087  # Only process if variable expands to non-empty
52088
52089  if test "x$MSVC_DLL" != x; then
52090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52091
52092  # Input might be given as Windows format, start by converting to
52093  # unix format.
52094  path="$MSVC_DLL"
52095  new_path=`$CYGPATH -u "$path"`
52096
52097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52100  # "foo.exe" is OK but "foo" is an error.
52101  #
52102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52103  # It is also a way to make sure we got the proper file name for the real test later on.
52104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52105  if test "x$test_shortpath" = x; then
52106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52107$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52108    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52109  fi
52110
52111  # Call helper function which possibly converts this using DOS-style short mode.
52112  # If so, the updated path is stored in $new_path.
52113
52114  input_path="$new_path"
52115  # Check if we need to convert this using DOS-style short mode. If the path
52116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52117  # take no chances and rewrite it.
52118  # Note: m4 eats our [], so we need to use [ and ] instead.
52119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52120  if test "x$has_forbidden_chars" != x; then
52121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52125      # Going to short mode and back again did indeed matter. Since short mode is
52126      # case insensitive, let's make it lowercase to improve readability.
52127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52128      # Now convert it back to Unix-style (cygpath)
52129      input_path=`$CYGPATH -u "$shortmode_path"`
52130      new_path="$input_path"
52131    fi
52132  fi
52133
52134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52135  if test "x$test_cygdrive_prefix" = x; then
52136    # As a simple fix, exclude /usr/bin since it's not a real path.
52137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52139      # a path prefixed by /cygdrive for fixpath to work.
52140      new_path="$CYGWIN_ROOT_PATH$input_path"
52141    fi
52142  fi
52143
52144
52145  if test "x$path" != "x$new_path"; then
52146    MSVC_DLL="$new_path"
52147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52148$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52149  fi
52150
52151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52152
52153  path="$MSVC_DLL"
52154  has_colon=`$ECHO $path | $GREP ^.:`
52155  new_path="$path"
52156  if test "x$has_colon" = x; then
52157    # Not in mixed or Windows style, start by that.
52158    new_path=`cmd //c echo $path`
52159  fi
52160
52161
52162  input_path="$new_path"
52163  # Check if we need to convert this using DOS-style short mode. If the path
52164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52165  # take no chances and rewrite it.
52166  # Note: m4 eats our [], so we need to use [ and ] instead.
52167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52168  if test "x$has_forbidden_chars" != x; then
52169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52171  fi
52172
52173
52174  windows_path="$new_path"
52175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52176    unix_path=`$CYGPATH -u "$windows_path"`
52177    new_path="$unix_path"
52178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52180    new_path="$unix_path"
52181  fi
52182
52183  if test "x$path" != "x$new_path"; then
52184    MSVC_DLL="$new_path"
52185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52186$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52187  fi
52188
52189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52191
52192    else
52193      # We're on a unix platform. Hooray! :)
52194      path="$MSVC_DLL"
52195      has_space=`$ECHO "$path" | $GREP " "`
52196      if test "x$has_space" != x; then
52197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52198$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52200      fi
52201
52202      # Use eval to expand a potential ~
52203      eval path="$path"
52204      if test ! -f "$path" && test ! -d "$path"; then
52205        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52206      fi
52207
52208      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52209    fi
52210  fi
52211
52212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52213$as_echo_n "checking for $DLL_NAME... " >&6; }
52214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52215$as_echo "$MSVC_DLL" >&6; }
52216    else
52217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52218$as_echo "incorrect, ignoring" >&6; }
52219      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52220$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52221    fi
52222  fi
52223
52224  fi
52225
52226  if test "x$MSVC_DLL" = x; then
52227    # Probe: Look in the Windows system32 directory
52228    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
52229
52230  windows_path="$CYGWIN_SYSTEMROOT"
52231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52232    unix_path=`$CYGPATH -u "$windows_path"`
52233    CYGWIN_SYSTEMROOT="$unix_path"
52234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52236    CYGWIN_SYSTEMROOT="$unix_path"
52237  fi
52238
52239    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
52240
52241  DLL_NAME="$DLL_NAME"
52242  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52243  METHOD="well-known location in SYSTEMROOT"
52244  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52246$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52247
52248    # Need to check if the found msvcr is correct architecture
52249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52250$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52251    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52253      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52254      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52256        CORRECT_MSVCR_ARCH="PE32 executable"
52257      else
52258        CORRECT_MSVCR_ARCH="PE32+ executable"
52259      fi
52260    else
52261      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52262        CORRECT_MSVCR_ARCH=386
52263      else
52264        CORRECT_MSVCR_ARCH=x86-64
52265      fi
52266    fi
52267    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52269$as_echo "ok" >&6; }
52270      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52271
52272  # Only process if variable expands to non-empty
52273
52274  if test "x$MSVC_DLL" != x; then
52275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52276
52277  # Input might be given as Windows format, start by converting to
52278  # unix format.
52279  path="$MSVC_DLL"
52280  new_path=`$CYGPATH -u "$path"`
52281
52282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52285  # "foo.exe" is OK but "foo" is an error.
52286  #
52287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52288  # It is also a way to make sure we got the proper file name for the real test later on.
52289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52290  if test "x$test_shortpath" = x; then
52291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52292$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52293    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52294  fi
52295
52296  # Call helper function which possibly converts this using DOS-style short mode.
52297  # If so, the updated path is stored in $new_path.
52298
52299  input_path="$new_path"
52300  # Check if we need to convert this using DOS-style short mode. If the path
52301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52302  # take no chances and rewrite it.
52303  # Note: m4 eats our [], so we need to use [ and ] instead.
52304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52305  if test "x$has_forbidden_chars" != x; then
52306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52310      # Going to short mode and back again did indeed matter. Since short mode is
52311      # case insensitive, let's make it lowercase to improve readability.
52312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52313      # Now convert it back to Unix-style (cygpath)
52314      input_path=`$CYGPATH -u "$shortmode_path"`
52315      new_path="$input_path"
52316    fi
52317  fi
52318
52319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52320  if test "x$test_cygdrive_prefix" = x; then
52321    # As a simple fix, exclude /usr/bin since it's not a real path.
52322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52324      # a path prefixed by /cygdrive for fixpath to work.
52325      new_path="$CYGWIN_ROOT_PATH$input_path"
52326    fi
52327  fi
52328
52329
52330  if test "x$path" != "x$new_path"; then
52331    MSVC_DLL="$new_path"
52332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52333$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52334  fi
52335
52336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52337
52338  path="$MSVC_DLL"
52339  has_colon=`$ECHO $path | $GREP ^.:`
52340  new_path="$path"
52341  if test "x$has_colon" = x; then
52342    # Not in mixed or Windows style, start by that.
52343    new_path=`cmd //c echo $path`
52344  fi
52345
52346
52347  input_path="$new_path"
52348  # Check if we need to convert this using DOS-style short mode. If the path
52349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52350  # take no chances and rewrite it.
52351  # Note: m4 eats our [], so we need to use [ and ] instead.
52352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52353  if test "x$has_forbidden_chars" != x; then
52354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52356  fi
52357
52358
52359  windows_path="$new_path"
52360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52361    unix_path=`$CYGPATH -u "$windows_path"`
52362    new_path="$unix_path"
52363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52365    new_path="$unix_path"
52366  fi
52367
52368  if test "x$path" != "x$new_path"; then
52369    MSVC_DLL="$new_path"
52370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52371$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52372  fi
52373
52374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52376
52377    else
52378      # We're on a unix platform. Hooray! :)
52379      path="$MSVC_DLL"
52380      has_space=`$ECHO "$path" | $GREP " "`
52381      if test "x$has_space" != x; then
52382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52383$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52385      fi
52386
52387      # Use eval to expand a potential ~
52388      eval path="$path"
52389      if test ! -f "$path" && test ! -d "$path"; then
52390        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52391      fi
52392
52393      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52394    fi
52395  fi
52396
52397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52398$as_echo_n "checking for $DLL_NAME... " >&6; }
52399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52400$as_echo "$MSVC_DLL" >&6; }
52401    else
52402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52403$as_echo "incorrect, ignoring" >&6; }
52404      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52405$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52406    fi
52407  fi
52408
52409  fi
52410
52411  if test "x$MSVC_DLL" = x; then
52412    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52413    if test "x$VS100COMNTOOLS" != x; then
52414      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52415
52416  windows_path="$CYGWIN_VS_TOOLS_DIR"
52417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52418    unix_path=`$CYGPATH -u "$windows_path"`
52419    CYGWIN_VS_TOOLS_DIR="$unix_path"
52420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52422    CYGWIN_VS_TOOLS_DIR="$unix_path"
52423  fi
52424
52425      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52426        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52427	    | $GREP -i /x64/ | $HEAD --lines 1`
52428      else
52429        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52430	    | $GREP -i /x86/ | $HEAD --lines 1`
52431      fi
52432
52433  DLL_NAME="$DLL_NAME"
52434  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52435  METHOD="search of VS100COMNTOOLS"
52436  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52437    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52438$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52439
52440    # Need to check if the found msvcr is correct architecture
52441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52442$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52443    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52445      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52446      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52448        CORRECT_MSVCR_ARCH="PE32 executable"
52449      else
52450        CORRECT_MSVCR_ARCH="PE32+ executable"
52451      fi
52452    else
52453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52454        CORRECT_MSVCR_ARCH=386
52455      else
52456        CORRECT_MSVCR_ARCH=x86-64
52457      fi
52458    fi
52459    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52461$as_echo "ok" >&6; }
52462      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52463
52464  # Only process if variable expands to non-empty
52465
52466  if test "x$MSVC_DLL" != x; then
52467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52468
52469  # Input might be given as Windows format, start by converting to
52470  # unix format.
52471  path="$MSVC_DLL"
52472  new_path=`$CYGPATH -u "$path"`
52473
52474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52477  # "foo.exe" is OK but "foo" is an error.
52478  #
52479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52480  # It is also a way to make sure we got the proper file name for the real test later on.
52481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52482  if test "x$test_shortpath" = x; then
52483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52484$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52485    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52486  fi
52487
52488  # Call helper function which possibly converts this using DOS-style short mode.
52489  # If so, the updated path is stored in $new_path.
52490
52491  input_path="$new_path"
52492  # Check if we need to convert this using DOS-style short mode. If the path
52493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52494  # take no chances and rewrite it.
52495  # Note: m4 eats our [], so we need to use [ and ] instead.
52496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52497  if test "x$has_forbidden_chars" != x; then
52498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52502      # Going to short mode and back again did indeed matter. Since short mode is
52503      # case insensitive, let's make it lowercase to improve readability.
52504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52505      # Now convert it back to Unix-style (cygpath)
52506      input_path=`$CYGPATH -u "$shortmode_path"`
52507      new_path="$input_path"
52508    fi
52509  fi
52510
52511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52512  if test "x$test_cygdrive_prefix" = x; then
52513    # As a simple fix, exclude /usr/bin since it's not a real path.
52514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52516      # a path prefixed by /cygdrive for fixpath to work.
52517      new_path="$CYGWIN_ROOT_PATH$input_path"
52518    fi
52519  fi
52520
52521
52522  if test "x$path" != "x$new_path"; then
52523    MSVC_DLL="$new_path"
52524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52526  fi
52527
52528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52529
52530  path="$MSVC_DLL"
52531  has_colon=`$ECHO $path | $GREP ^.:`
52532  new_path="$path"
52533  if test "x$has_colon" = x; then
52534    # Not in mixed or Windows style, start by that.
52535    new_path=`cmd //c echo $path`
52536  fi
52537
52538
52539  input_path="$new_path"
52540  # Check if we need to convert this using DOS-style short mode. If the path
52541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52542  # take no chances and rewrite it.
52543  # Note: m4 eats our [], so we need to use [ and ] instead.
52544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52545  if test "x$has_forbidden_chars" != x; then
52546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52548  fi
52549
52550
52551  windows_path="$new_path"
52552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52553    unix_path=`$CYGPATH -u "$windows_path"`
52554    new_path="$unix_path"
52555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52557    new_path="$unix_path"
52558  fi
52559
52560  if test "x$path" != "x$new_path"; then
52561    MSVC_DLL="$new_path"
52562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52564  fi
52565
52566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52568
52569    else
52570      # We're on a unix platform. Hooray! :)
52571      path="$MSVC_DLL"
52572      has_space=`$ECHO "$path" | $GREP " "`
52573      if test "x$has_space" != x; then
52574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52577      fi
52578
52579      # Use eval to expand a potential ~
52580      eval path="$path"
52581      if test ! -f "$path" && test ! -d "$path"; then
52582        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52583      fi
52584
52585      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52586    fi
52587  fi
52588
52589      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52590$as_echo_n "checking for $DLL_NAME... " >&6; }
52591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52592$as_echo "$MSVC_DLL" >&6; }
52593    else
52594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52595$as_echo "incorrect, ignoring" >&6; }
52596      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52597$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52598    fi
52599  fi
52600
52601    fi
52602  fi
52603
52604  if test "x$MSVC_DLL" = x; then
52605    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52606    # (This was the original behaviour; kept since it might turn something up)
52607    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52608      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52609        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52610	    | $GREP x64 | $HEAD --lines 1`
52611      else
52612        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52613	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52614        if test "x$POSSIBLE_MSVC_DLL" = x; then
52615          # We're grasping at straws now...
52616          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52617	      | $HEAD --lines 1`
52618        fi
52619      fi
52620
52621
52622  DLL_NAME="$DLL_NAME"
52623  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52624  METHOD="search of VCINSTALLDIR"
52625  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52626    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52627$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52628
52629    # Need to check if the found msvcr is correct architecture
52630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52631$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52632    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52634      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52635      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52636      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52637        CORRECT_MSVCR_ARCH="PE32 executable"
52638      else
52639        CORRECT_MSVCR_ARCH="PE32+ executable"
52640      fi
52641    else
52642      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52643        CORRECT_MSVCR_ARCH=386
52644      else
52645        CORRECT_MSVCR_ARCH=x86-64
52646      fi
52647    fi
52648    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52650$as_echo "ok" >&6; }
52651      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52652
52653  # Only process if variable expands to non-empty
52654
52655  if test "x$MSVC_DLL" != x; then
52656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52657
52658  # Input might be given as Windows format, start by converting to
52659  # unix format.
52660  path="$MSVC_DLL"
52661  new_path=`$CYGPATH -u "$path"`
52662
52663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52666  # "foo.exe" is OK but "foo" is an error.
52667  #
52668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52669  # It is also a way to make sure we got the proper file name for the real test later on.
52670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52671  if test "x$test_shortpath" = x; then
52672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52674    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52675  fi
52676
52677  # Call helper function which possibly converts this using DOS-style short mode.
52678  # If so, the updated path is stored in $new_path.
52679
52680  input_path="$new_path"
52681  # Check if we need to convert this using DOS-style short mode. If the path
52682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52683  # take no chances and rewrite it.
52684  # Note: m4 eats our [], so we need to use [ and ] instead.
52685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52686  if test "x$has_forbidden_chars" != x; then
52687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52691      # Going to short mode and back again did indeed matter. Since short mode is
52692      # case insensitive, let's make it lowercase to improve readability.
52693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52694      # Now convert it back to Unix-style (cygpath)
52695      input_path=`$CYGPATH -u "$shortmode_path"`
52696      new_path="$input_path"
52697    fi
52698  fi
52699
52700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52701  if test "x$test_cygdrive_prefix" = x; then
52702    # As a simple fix, exclude /usr/bin since it's not a real path.
52703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52705      # a path prefixed by /cygdrive for fixpath to work.
52706      new_path="$CYGWIN_ROOT_PATH$input_path"
52707    fi
52708  fi
52709
52710
52711  if test "x$path" != "x$new_path"; then
52712    MSVC_DLL="$new_path"
52713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52714$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52715  fi
52716
52717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52718
52719  path="$MSVC_DLL"
52720  has_colon=`$ECHO $path | $GREP ^.:`
52721  new_path="$path"
52722  if test "x$has_colon" = x; then
52723    # Not in mixed or Windows style, start by that.
52724    new_path=`cmd //c echo $path`
52725  fi
52726
52727
52728  input_path="$new_path"
52729  # Check if we need to convert this using DOS-style short mode. If the path
52730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52731  # take no chances and rewrite it.
52732  # Note: m4 eats our [], so we need to use [ and ] instead.
52733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52734  if test "x$has_forbidden_chars" != x; then
52735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52737  fi
52738
52739
52740  windows_path="$new_path"
52741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52742    unix_path=`$CYGPATH -u "$windows_path"`
52743    new_path="$unix_path"
52744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52746    new_path="$unix_path"
52747  fi
52748
52749  if test "x$path" != "x$new_path"; then
52750    MSVC_DLL="$new_path"
52751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52752$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52753  fi
52754
52755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52757
52758    else
52759      # We're on a unix platform. Hooray! :)
52760      path="$MSVC_DLL"
52761      has_space=`$ECHO "$path" | $GREP " "`
52762      if test "x$has_space" != x; then
52763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52764$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52766      fi
52767
52768      # Use eval to expand a potential ~
52769      eval path="$path"
52770      if test ! -f "$path" && test ! -d "$path"; then
52771        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52772      fi
52773
52774      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52775    fi
52776  fi
52777
52778      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52779$as_echo_n "checking for $DLL_NAME... " >&6; }
52780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52781$as_echo "$MSVC_DLL" >&6; }
52782    else
52783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52784$as_echo "incorrect, ignoring" >&6; }
52785      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52786$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52787    fi
52788  fi
52789
52790    fi
52791  fi
52792
52793  if test "x$MSVC_DLL" = x; then
52794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52795$as_echo_n "checking for $DLL_NAME... " >&6; }
52796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52797$as_echo "no" >&6; }
52798    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52799  fi
52800
52801      MSVCP_DLL="$MSVC_DLL"
52802    fi
52803
52804  fi
52805
52806
52807
52808# Check whether --with-dxsdk was given.
52809if test "${with_dxsdk+set}" = set; then :
52810  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52811$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52812fi
52813
52814
52815
52816
52817# Check whether --with-dxsdk-lib was given.
52818if test "${with_dxsdk_lib+set}" = set; then :
52819  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52820$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52821fi
52822
52823
52824
52825
52826# Check whether --with-dxsdk-include was given.
52827if test "${with_dxsdk_include+set}" = set; then :
52828  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52829$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52830fi
52831
52832
52833  fi
52834
52835
52836###############################################################################
52837#
52838# We need to do some final tweaking, when everything else is done.
52839#
52840###############################################################################
52841
52842
52843  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52844
52845
52846  # The name of the Service Agent jar.
52847  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52848  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52849    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52850  fi
52851
52852
52853
52854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52855$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52856
52857  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52858    ENABLE_INTREE_EC=yes
52859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52860$as_echo "yes" >&6; }
52861  else
52862    ENABLE_INTREE_EC=no
52863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52864$as_echo "no" >&6; }
52865  fi
52866
52867
52868
52869
52870###############################################################################
52871#
52872# Configure parts of the build that only affect the build performance,
52873# not the result.
52874#
52875###############################################################################
52876
52877
52878  # How many cores do we have on this build system?
52879
52880# Check whether --with-num-cores was given.
52881if test "${with_num_cores+set}" = set; then :
52882  withval=$with_num_cores;
52883fi
52884
52885  if test "x$with_num_cores" = x; then
52886    # The number of cores were not specified, try to probe them.
52887
52888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52889$as_echo_n "checking for number of cores... " >&6; }
52890  NUM_CORES=1
52891  FOUND_CORES=no
52892
52893  if test -f /proc/cpuinfo; then
52894    # Looks like a Linux (or cygwin) system
52895    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52896    FOUND_CORES=yes
52897  elif test -x /usr/sbin/psrinfo; then
52898    # Looks like a Solaris system
52899    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52900    FOUND_CORES=yes
52901  elif test -x /usr/sbin/system_profiler; then
52902    # Looks like a MacOSX system
52903    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52904    FOUND_CORES=yes
52905  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52906    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52907    FOUND_CORES=yes
52908  elif test -n "$NUMBER_OF_PROCESSORS"; then
52909    # On windows, look in the env
52910    NUM_CORES=$NUMBER_OF_PROCESSORS
52911    FOUND_CORES=yes
52912  fi
52913
52914  if test "x$FOUND_CORES" = xyes; then
52915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52916$as_echo "$NUM_CORES" >&6; }
52917  else
52918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52919$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52920    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52921$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52922  fi
52923
52924  else
52925    NUM_CORES=$with_num_cores
52926  fi
52927
52928
52929
52930  # How much memory do we have on this build system?
52931
52932# Check whether --with-memory-size was given.
52933if test "${with_memory_size+set}" = set; then :
52934  withval=$with_memory_size;
52935fi
52936
52937  if test "x$with_memory_size" = x; then
52938    # The memory size was not specified, try to probe it.
52939
52940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52941$as_echo_n "checking for memory size... " >&6; }
52942  # Default to 1024 MB
52943  MEMORY_SIZE=1024
52944  FOUND_MEM=no
52945
52946  if test -f /proc/meminfo; then
52947    # Looks like a Linux (or cygwin) system
52948    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52949    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52950    FOUND_MEM=yes
52951  elif test -x /usr/sbin/prtconf; then
52952    # Looks like a Solaris or AIX system
52953    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52954    FOUND_MEM=yes
52955  elif test -x /usr/sbin/system_profiler; then
52956    # Looks like a MacOSX system
52957    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52958    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52959    FOUND_MEM=yes
52960  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52961    # Windows, but without cygwin
52962    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52963    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52964    FOUND_MEM=yes
52965  fi
52966
52967  if test "x$FOUND_MEM" = xyes; then
52968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52969$as_echo "$MEMORY_SIZE MB" >&6; }
52970  else
52971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52972$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52973    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52974$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52975  fi
52976
52977  else
52978    MEMORY_SIZE=$with_memory_size
52979  fi
52980
52981
52982
52983  # Provide a decent default number of parallel jobs for make depending on
52984  # number of cores, amount of memory and machine architecture.
52985
52986# Check whether --with-jobs was given.
52987if test "${with_jobs+set}" = set; then :
52988  withval=$with_jobs;
52989fi
52990
52991  if test "x$with_jobs" = x; then
52992    # Number of jobs was not specified, calculate.
52993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52994$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52995    # Approximate memory in GB.
52996    memory_gb=`expr $MEMORY_SIZE / 1024`
52997    # Pick the lowest of memory in gb and number of cores.
52998    if test "$memory_gb" -lt "$NUM_CORES"; then
52999      JOBS="$memory_gb"
53000    else
53001      JOBS="$NUM_CORES"
53002      # On bigger machines, leave some room for other processes to run
53003      if test "$JOBS" -gt "4"; then
53004        JOBS=`expr $JOBS '*' 90 / 100`
53005      fi
53006    fi
53007    # Cap number of jobs to 16
53008    if test "$JOBS" -gt "16"; then
53009      JOBS=16
53010    fi
53011    if test "$JOBS" -eq "0"; then
53012      JOBS=1
53013    fi
53014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
53015$as_echo "$JOBS" >&6; }
53016  else
53017    JOBS=$with_jobs
53018  fi
53019
53020
53021
53022# Setup arguments for the boot jdk (after cores and memory have been setup)
53023
53024  ##############################################################################
53025  #
53026  # Specify jvm options for anything that is run with the Boot JDK.
53027  # Not all JVM:s accept the same arguments on the command line.
53028  #
53029
53030# Check whether --with-boot-jdk-jvmargs was given.
53031if test "${with_boot_jdk_jvmargs+set}" = set; then :
53032  withval=$with_boot_jdk_jvmargs;
53033fi
53034
53035
53036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
53037$as_echo_n "checking flags for boot jdk java command ... " >&6; }
53038
53039  # Disable special log output when a debug build is used as Boot JDK...
53040
53041  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
53042  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
53043  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
53044  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53045  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53046  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53047    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
53048    JVM_ARG_OK=true
53049  else
53050    $ECHO "Arg failed:" >&5
53051    $ECHO "$OUTPUT" >&5
53052    JVM_ARG_OK=false
53053  fi
53054
53055
53056  # Apply user provided options.
53057
53058  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
53059  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
53060  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
53061  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53062  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53063  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53064    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
53065    JVM_ARG_OK=true
53066  else
53067    $ECHO "Arg failed:" >&5
53068    $ECHO "$OUTPUT" >&5
53069    JVM_ARG_OK=false
53070  fi
53071
53072
53073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
53074$as_echo "$boot_jdk_jvmargs" >&6; }
53075
53076  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
53077  JAVA_FLAGS=$boot_jdk_jvmargs
53078
53079
53080
53081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
53082$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
53083
53084  # Starting amount of heap memory.
53085
53086  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
53087  $ECHO "Command: $JAVA -Xms64M -version" >&5
53088  OUTPUT=`$JAVA -Xms64M -version 2>&1`
53089  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53090  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53091  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53092    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
53093    JVM_ARG_OK=true
53094  else
53095    $ECHO "Arg failed:" >&5
53096    $ECHO "$OUTPUT" >&5
53097    JVM_ARG_OK=false
53098  fi
53099
53100
53101  # Maximum amount of heap memory.
53102  # Maximum stack size.
53103  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
53104  if test "x$BUILD_NUM_BITS" = x32; then
53105    if test "$JVM_MAX_HEAP" -gt "1100"; then
53106      JVM_MAX_HEAP=1100
53107    elif test "$JVM_MAX_HEAP" -lt "512"; then
53108      JVM_MAX_HEAP=512
53109    fi
53110    STACK_SIZE=768
53111  else
53112    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
53113    # pointers are used. Apparently, we need to increase the heap and stack
53114    # space for the jvm. More specifically, when running javac to build huge
53115    # jdk batch
53116    if test "$JVM_MAX_HEAP" -gt "1600"; then
53117      JVM_MAX_HEAP=1600
53118    elif test "$JVM_MAX_HEAP" -lt "512"; then
53119      JVM_MAX_HEAP=512
53120    fi
53121    STACK_SIZE=1536
53122  fi
53123
53124  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
53125  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
53126  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
53127  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53128  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53129  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53130    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
53131    JVM_ARG_OK=true
53132  else
53133    $ECHO "Arg failed:" >&5
53134    $ECHO "$OUTPUT" >&5
53135    JVM_ARG_OK=false
53136  fi
53137
53138
53139  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
53140  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
53141  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
53142  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53143  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53144  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53145    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
53146    JVM_ARG_OK=true
53147  else
53148    $ECHO "Arg failed:" >&5
53149    $ECHO "$OUTPUT" >&5
53150    JVM_ARG_OK=false
53151  fi
53152
53153
53154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
53155$as_echo "$boot_jdk_jvmargs_big" >&6; }
53156
53157  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53158
53159
53160
53161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53162$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53163
53164  # Use serial gc for small short lived tools if possible
53165
53166  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53167  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53168  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53169  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53170  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53171  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53172    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53173    JVM_ARG_OK=true
53174  else
53175    $ECHO "Arg failed:" >&5
53176    $ECHO "$OUTPUT" >&5
53177    JVM_ARG_OK=false
53178  fi
53179
53180
53181  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53182  $ECHO "Command: $JAVA -Xms32M -version" >&5
53183  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53184  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53185  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53186  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53187    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53188    JVM_ARG_OK=true
53189  else
53190    $ECHO "Arg failed:" >&5
53191    $ECHO "$OUTPUT" >&5
53192    JVM_ARG_OK=false
53193  fi
53194
53195
53196  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53197  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53198  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53199  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53200  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53201  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53202    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53203    JVM_ARG_OK=true
53204  else
53205    $ECHO "Arg failed:" >&5
53206    $ECHO "$OUTPUT" >&5
53207    JVM_ARG_OK=false
53208  fi
53209
53210
53211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53212$as_echo "$boot_jdk_jvmargs_small" >&6; }
53213
53214  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53215
53216
53217  JAVA_TOOL_FLAGS_SMALL=""
53218  for f in $JAVA_FLAGS_SMALL; do
53219    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53220  done
53221
53222
53223
53224# Setup smart javac (after cores and memory have been setup)
53225
53226
53227# Check whether --with-sjavac-server-java was given.
53228if test "${with_sjavac_server_java+set}" = set; then :
53229  withval=$with_sjavac_server_java;
53230fi
53231
53232
53233  if test "x$with_sjavac_server_java" != x; then
53234    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53235    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53236    if test "x$FOUND_VERSION" = x; then
53237      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53238    fi
53239  else
53240    SJAVAC_SERVER_JAVA="$JAVA"
53241  fi
53242
53243
53244  if test "$MEMORY_SIZE" -gt "3000"; then
53245
53246  $ECHO "Check if jvm arg is ok: -d64" >&5
53247  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53248  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53249  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53250  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53251  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53252    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53253    JVM_ARG_OK=true
53254  else
53255    $ECHO "Arg failed:" >&5
53256    $ECHO "$OUTPUT" >&5
53257    JVM_ARG_OK=false
53258  fi
53259
53260    if test "$JVM_ARG_OK" = true; then
53261      JVM_64BIT=true
53262      JVM_ARG_OK=false
53263    fi
53264  fi
53265
53266  MX_VALUE=`expr $MEMORY_SIZE / 2`
53267  if test "$JVM_64BIT" = true; then
53268    # Set ms lower than mx since more than one instance of the server might
53269    # get launched at the same time before they figure out which instance won.
53270    MS_VALUE=512
53271    if test "$MX_VALUE" -gt "2048"; then
53272      MX_VALUE=2048
53273    fi
53274  else
53275    MS_VALUE=256
53276    if test "$MX_VALUE" -gt "1500"; then
53277      MX_VALUE=1500
53278    fi
53279  fi
53280  if test "$MX_VALUE" -lt "512"; then
53281    MX_VALUE=512
53282  fi
53283
53284  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53285  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53286  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53287  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53288  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53289  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53290    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53291    JVM_ARG_OK=true
53292  else
53293    $ECHO "Arg failed:" >&5
53294    $ECHO "$OUTPUT" >&5
53295    JVM_ARG_OK=false
53296  fi
53297
53298
53299
53300  # Check whether --enable-sjavac was given.
53301if test "${enable_sjavac+set}" = set; then :
53302  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53303else
53304  ENABLE_SJAVAC='no'
53305fi
53306
53307  if test "x$JVM_ARG_OK" = "xfalse"; then
53308    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53309$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53310    ENABLE_SJAVAC=no;
53311  fi
53312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53313$as_echo_n "checking whether to use sjavac... " >&6; }
53314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53315$as_echo "$ENABLE_SJAVAC" >&6; }
53316
53317
53318
53319# Can the C/C++ compiler use precompiled headers?
53320
53321
53322  ###############################################################################
53323  #
53324  # Can the C/C++ compiler use precompiled headers?
53325  #
53326  # Check whether --enable-precompiled-headers was given.
53327if test "${enable_precompiled_headers+set}" = set; then :
53328  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53329else
53330  ENABLE_PRECOMPH=yes
53331fi
53332
53333
53334  USE_PRECOMPILED_HEADER=1
53335  if test "x$ENABLE_PRECOMPH" = xno; then
53336    USE_PRECOMPILED_HEADER=0
53337  fi
53338
53339  if test "x$ENABLE_PRECOMPH" = xyes; then
53340    # Check that the compiler actually supports precomp headers.
53341    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53342      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53343$as_echo_n "checking that precompiled headers work... " >&6; }
53344      echo "int alfa();" > conftest.h
53345      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53346      if test ! -f conftest.hpp.gch; then
53347        USE_PRECOMPILED_HEADER=0
53348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53349$as_echo "no" >&6; }
53350      else
53351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53352$as_echo "yes" >&6; }
53353      fi
53354      rm -f conftest.h conftest.hpp.gch
53355    fi
53356  fi
53357
53358
53359
53360
53361# Setup use of ccache, if available
53362
53363  # Check whether --enable-ccache was given.
53364if test "${enable_ccache+set}" = set; then :
53365  enableval=$enable_ccache;
53366fi
53367
53368
53369  CCACHE=
53370  CCACHE_STATUS=
53371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53372$as_echo_n "checking is ccache enabled... " >&6; }
53373  if test "x$enable_ccache" = xyes; then
53374    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53376$as_echo "yes" >&6; }
53377      OLD_PATH="$PATH"
53378      if test "x$TOOLCHAIN_PATH" != x; then
53379        PATH=$TOOLCHAIN_PATH:$PATH
53380      fi
53381
53382
53383
53384  # Publish this variable in the help.
53385
53386
53387  if test "x$CCACHE" = x; then
53388    # The variable is not set by user, try to locate tool using the code snippet
53389    for ac_prog in ccache
53390do
53391  # Extract the first word of "$ac_prog", so it can be a program name with args.
53392set dummy $ac_prog; ac_word=$2
53393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53394$as_echo_n "checking for $ac_word... " >&6; }
53395if ${ac_cv_path_CCACHE+:} false; then :
53396  $as_echo_n "(cached) " >&6
53397else
53398  case $CCACHE in
53399  [\\/]* | ?:[\\/]*)
53400  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53401  ;;
53402  *)
53403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53404for as_dir in $PATH
53405do
53406  IFS=$as_save_IFS
53407  test -z "$as_dir" && as_dir=.
53408    for ac_exec_ext in '' $ac_executable_extensions; do
53409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53410    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53412    break 2
53413  fi
53414done
53415  done
53416IFS=$as_save_IFS
53417
53418  ;;
53419esac
53420fi
53421CCACHE=$ac_cv_path_CCACHE
53422if test -n "$CCACHE"; then
53423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53424$as_echo "$CCACHE" >&6; }
53425else
53426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53427$as_echo "no" >&6; }
53428fi
53429
53430
53431  test -n "$CCACHE" && break
53432done
53433
53434  else
53435    # The variable is set, but is it from the command line or the environment?
53436
53437    # Try to remove the string !CCACHE! from our list.
53438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53440      # If it failed, the variable was not from the command line. Ignore it,
53441      # but warn the user (except for BASH, which is always set by the calling BASH).
53442      if test "xCCACHE" != xBASH; then
53443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53444$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53445      fi
53446      # Try to locate tool using the code snippet
53447      for ac_prog in ccache
53448do
53449  # Extract the first word of "$ac_prog", so it can be a program name with args.
53450set dummy $ac_prog; ac_word=$2
53451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53452$as_echo_n "checking for $ac_word... " >&6; }
53453if ${ac_cv_path_CCACHE+:} false; then :
53454  $as_echo_n "(cached) " >&6
53455else
53456  case $CCACHE in
53457  [\\/]* | ?:[\\/]*)
53458  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53459  ;;
53460  *)
53461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53462for as_dir in $PATH
53463do
53464  IFS=$as_save_IFS
53465  test -z "$as_dir" && as_dir=.
53466    for ac_exec_ext in '' $ac_executable_extensions; do
53467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53468    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53470    break 2
53471  fi
53472done
53473  done
53474IFS=$as_save_IFS
53475
53476  ;;
53477esac
53478fi
53479CCACHE=$ac_cv_path_CCACHE
53480if test -n "$CCACHE"; then
53481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53482$as_echo "$CCACHE" >&6; }
53483else
53484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53485$as_echo "no" >&6; }
53486fi
53487
53488
53489  test -n "$CCACHE" && break
53490done
53491
53492    else
53493      # If it succeeded, then it was overridden by the user. We will use it
53494      # for the tool.
53495
53496      # First remove it from the list of overridden variables, so we can test
53497      # for unknown variables in the end.
53498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53499
53500      # Check if the provided tool contains a complete path.
53501      tool_specified="$CCACHE"
53502      tool_basename="${tool_specified##*/}"
53503      if test "x$tool_basename" = "x$tool_specified"; then
53504        # A command without a complete path is provided, search $PATH.
53505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53506$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53507        # Extract the first word of "$tool_basename", so it can be a program name with args.
53508set dummy $tool_basename; ac_word=$2
53509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53510$as_echo_n "checking for $ac_word... " >&6; }
53511if ${ac_cv_path_CCACHE+:} false; then :
53512  $as_echo_n "(cached) " >&6
53513else
53514  case $CCACHE in
53515  [\\/]* | ?:[\\/]*)
53516  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53517  ;;
53518  *)
53519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53520for as_dir in $PATH
53521do
53522  IFS=$as_save_IFS
53523  test -z "$as_dir" && as_dir=.
53524    for ac_exec_ext in '' $ac_executable_extensions; do
53525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53526    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53528    break 2
53529  fi
53530done
53531  done
53532IFS=$as_save_IFS
53533
53534  ;;
53535esac
53536fi
53537CCACHE=$ac_cv_path_CCACHE
53538if test -n "$CCACHE"; then
53539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53540$as_echo "$CCACHE" >&6; }
53541else
53542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53543$as_echo "no" >&6; }
53544fi
53545
53546
53547        if test "x$CCACHE" = x; then
53548          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53549        fi
53550      else
53551        # Otherwise we believe it is a complete path. Use it as it is.
53552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53553$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53555$as_echo_n "checking for CCACHE... " >&6; }
53556        if test ! -x "$tool_specified"; then
53557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53558$as_echo "not found" >&6; }
53559          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53560        fi
53561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53562$as_echo "$tool_specified" >&6; }
53563      fi
53564    fi
53565  fi
53566
53567
53568
53569  if test "x$CCACHE" = x; then
53570    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53571  fi
53572
53573
53574      PATH="$OLD_PATH"
53575      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53576      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53577    else
53578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53579$as_echo "no" >&6; }
53580      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53581$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53582    fi
53583  elif test "x$enable_ccache" = xno; then
53584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53585$as_echo "no, explicitly disabled" >&6; }
53586    CCACHE_STATUS="Disabled"
53587  elif test "x$enable_ccache" = x; then
53588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53589$as_echo "no" >&6; }
53590  else
53591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53592$as_echo "unknown" >&6; }
53593    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53594  fi
53595
53596
53597
53598# Check whether --with-ccache-dir was given.
53599if test "${with_ccache_dir+set}" = set; then :
53600  withval=$with_ccache_dir;
53601fi
53602
53603
53604  if test "x$with_ccache_dir" != x; then
53605    # When using a non home ccache directory, assume the use is to share ccache files
53606    # with other users. Thus change the umask.
53607    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53608    if test "x$CCACHE" = x; then
53609      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53610$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53611    fi
53612  fi
53613
53614  if test "x$CCACHE" != x; then
53615
53616  if test "x$CCACHE" != x; then
53617    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53618      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53619          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53620      if test "x$HAS_BAD_CCACHE" != "x"; then
53621        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53622      fi
53623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53624$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53625      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53626      PUSHED_FLAGS="$CXXFLAGS"
53627      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53628      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53629/* end confdefs.h.  */
53630
53631int
53632main ()
53633{
53634
53635  ;
53636  return 0;
53637}
53638_ACEOF
53639if ac_fn_cxx_try_compile "$LINENO"; then :
53640  CC_KNOWS_CCACHE_TRICK=yes
53641else
53642  CC_KNOWS_CCACHE_TRICK=no
53643fi
53644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53645      CXXFLAGS="$PUSHED_FLAGS"
53646      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53648$as_echo "yes" >&6; }
53649        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53650
53651        CCACHE_SLOPPINESS=pch_defines,time_macros
53652      else
53653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53654$as_echo "no" >&6; }
53655        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53656      fi
53657    fi
53658
53659    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53660        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53661
53662    if test "x$SET_CCACHE_DIR" != x; then
53663      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53664      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53665    fi
53666  fi
53667
53668  fi
53669
53670
53671###############################################################################
53672#
53673# And now the finish...
53674#
53675###############################################################################
53676
53677# Check for some common pitfalls
53678
53679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53680    file_to_test="$SRC_ROOT/LICENSE"
53681    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53682      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
53683    fi
53684  fi
53685
53686
53687  # Did user specify any unknown variables?
53688
53689  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53690    # Replace the separating ! with spaces before presenting for end user.
53691    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53692    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53693$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53694  fi
53695
53696
53697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53698$as_echo_n "checking if build directory is on local disk... " >&6; }
53699
53700  # df -l lists only local disks; if the given directory is not found then
53701  # a non-zero exit code is given
53702  if test "x$DF" = x; then
53703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53704      # msys does not have df; use Windows "net use" instead.
53705      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53706      if test "x$IS_NETWORK_DISK" = x; then
53707        OUTPUT_DIR_IS_LOCAL="yes"
53708      else
53709        OUTPUT_DIR_IS_LOCAL="no"
53710      fi
53711    else
53712      # No df here, say it's local
53713      OUTPUT_DIR_IS_LOCAL="yes"
53714    fi
53715  else
53716    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53717      OUTPUT_DIR_IS_LOCAL="yes"
53718    else
53719      OUTPUT_DIR_IS_LOCAL="no"
53720    fi
53721  fi
53722
53723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53724$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53725
53726
53727
53728  # Check if the user has any old-style ALT_ variables set.
53729  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53730
53731  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53732  # Since we can't properly handle the dependencies for this, warn the user about the situation
53733  if test -e $OUTPUT_ROOT/spec.gmk; then
53734    IS_RECONFIGURE=yes
53735  else
53736    IS_RECONFIGURE=no
53737  fi
53738
53739
53740# At the end, call the custom hook. (Dummy macro if no custom sources available)
53741
53742
53743# We're messing a bit with internal autoconf variables to put the config.status
53744# in the output directory instead of the current directory.
53745CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53746
53747# Create the actual output files. Now the main work of configure is done.
53748cat >confcache <<\_ACEOF
53749# This file is a shell script that caches the results of configure
53750# tests run on this system so they can be shared between configure
53751# scripts and configure runs, see configure's option --config-cache.
53752# It is not useful on other systems.  If it contains results you don't
53753# want to keep, you may remove or edit it.
53754#
53755# config.status only pays attention to the cache file if you give it
53756# the --recheck option to rerun configure.
53757#
53758# `ac_cv_env_foo' variables (set or unset) will be overridden when
53759# loading this file, other *unset* `ac_cv_foo' will be assigned the
53760# following values.
53761
53762_ACEOF
53763
53764# The following way of writing the cache mishandles newlines in values,
53765# but we know of no workaround that is simple, portable, and efficient.
53766# So, we kill variables containing newlines.
53767# Ultrix sh set writes to stderr and can't be redirected directly,
53768# and sets the high bit in the cache file unless we assign to the vars.
53769(
53770  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53771    eval ac_val=\$$ac_var
53772    case $ac_val in #(
53773    *${as_nl}*)
53774      case $ac_var in #(
53775      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53776$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53777      esac
53778      case $ac_var in #(
53779      _ | IFS | as_nl) ;; #(
53780      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53781      *) { eval $ac_var=; unset $ac_var;} ;;
53782      esac ;;
53783    esac
53784  done
53785
53786  (set) 2>&1 |
53787    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53788    *${as_nl}ac_space=\ *)
53789      # `set' does not quote correctly, so add quotes: double-quote
53790      # substitution turns \\\\ into \\, and sed turns \\ into \.
53791      sed -n \
53792	"s/'/'\\\\''/g;
53793	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53794      ;; #(
53795    *)
53796      # `set' quotes correctly as required by POSIX, so do not add quotes.
53797      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53798      ;;
53799    esac |
53800    sort
53801) |
53802  sed '
53803     /^ac_cv_env_/b end
53804     t clear
53805     :clear
53806     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53807     t end
53808     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53809     :end' >>confcache
53810if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53811  if test -w "$cache_file"; then
53812    if test "x$cache_file" != "x/dev/null"; then
53813      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53814$as_echo "$as_me: updating cache $cache_file" >&6;}
53815      if test ! -f "$cache_file" || test -h "$cache_file"; then
53816	cat confcache >"$cache_file"
53817      else
53818        case $cache_file in #(
53819        */* | ?:*)
53820	  mv -f confcache "$cache_file"$$ &&
53821	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53822        *)
53823	  mv -f confcache "$cache_file" ;;
53824	esac
53825      fi
53826    fi
53827  else
53828    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53829$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53830  fi
53831fi
53832rm -f confcache
53833
53834test "x$prefix" = xNONE && prefix=$ac_default_prefix
53835# Let make expand exec_prefix.
53836test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53837
53838# Transform confdefs.h into DEFS.
53839# Protect against shell expansion while executing Makefile rules.
53840# Protect against Makefile macro expansion.
53841#
53842# If the first sed substitution is executed (which looks for macros that
53843# take arguments), then branch to the quote section.  Otherwise,
53844# look for a macro that doesn't take arguments.
53845ac_script='
53846:mline
53847/\\$/{
53848 N
53849 s,\\\n,,
53850 b mline
53851}
53852t clear
53853:clear
53854s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53855t quote
53856s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53857t quote
53858b any
53859:quote
53860s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53861s/\[/\\&/g
53862s/\]/\\&/g
53863s/\$/$$/g
53864H
53865:any
53866${
53867	g
53868	s/^\n//
53869	s/\n/ /g
53870	p
53871}
53872'
53873DEFS=`sed -n "$ac_script" confdefs.h`
53874
53875
53876ac_libobjs=
53877ac_ltlibobjs=
53878U=
53879for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53880  # 1. Remove the extension, and $U if already installed.
53881  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53882  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53883  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53884  #    will be set to the directory where LIBOBJS objects are built.
53885  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53886  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53887done
53888LIBOBJS=$ac_libobjs
53889
53890LTLIBOBJS=$ac_ltlibobjs
53891
53892
53893
53894: "${CONFIG_STATUS=./config.status}"
53895ac_write_fail=0
53896ac_clean_files_save=$ac_clean_files
53897ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53898{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53899$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53900as_write_fail=0
53901cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53902#! $SHELL
53903# Generated by $as_me.
53904# Run this file to recreate the current configuration.
53905# Compiler output produced by configure, useful for debugging
53906# configure, is in config.log if it exists.
53907
53908debug=false
53909ac_cs_recheck=false
53910ac_cs_silent=false
53911
53912SHELL=\${CONFIG_SHELL-$SHELL}
53913export SHELL
53914_ASEOF
53915cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53916## -------------------- ##
53917## M4sh Initialization. ##
53918## -------------------- ##
53919
53920# Be more Bourne compatible
53921DUALCASE=1; export DUALCASE # for MKS sh
53922if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53923  emulate sh
53924  NULLCMD=:
53925  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53926  # is contrary to our usage.  Disable this feature.
53927  alias -g '${1+"$@"}'='"$@"'
53928  setopt NO_GLOB_SUBST
53929else
53930  case `(set -o) 2>/dev/null` in #(
53931  *posix*) :
53932    set -o posix ;; #(
53933  *) :
53934     ;;
53935esac
53936fi
53937
53938
53939as_nl='
53940'
53941export as_nl
53942# Printing a long string crashes Solaris 7 /usr/bin/printf.
53943as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53944as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53945as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53946# Prefer a ksh shell builtin over an external printf program on Solaris,
53947# but without wasting forks for bash or zsh.
53948if test -z "$BASH_VERSION$ZSH_VERSION" \
53949    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53950  as_echo='print -r --'
53951  as_echo_n='print -rn --'
53952elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53953  as_echo='printf %s\n'
53954  as_echo_n='printf %s'
53955else
53956  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53957    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53958    as_echo_n='/usr/ucb/echo -n'
53959  else
53960    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53961    as_echo_n_body='eval
53962      arg=$1;
53963      case $arg in #(
53964      *"$as_nl"*)
53965	expr "X$arg" : "X\\(.*\\)$as_nl";
53966	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53967      esac;
53968      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53969    '
53970    export as_echo_n_body
53971    as_echo_n='sh -c $as_echo_n_body as_echo'
53972  fi
53973  export as_echo_body
53974  as_echo='sh -c $as_echo_body as_echo'
53975fi
53976
53977# The user is always right.
53978if test "${PATH_SEPARATOR+set}" != set; then
53979  PATH_SEPARATOR=:
53980  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53981    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53982      PATH_SEPARATOR=';'
53983  }
53984fi
53985
53986
53987# IFS
53988# We need space, tab and new line, in precisely that order.  Quoting is
53989# there to prevent editors from complaining about space-tab.
53990# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53991# splitting by setting IFS to empty value.)
53992IFS=" ""	$as_nl"
53993
53994# Find who we are.  Look in the path if we contain no directory separator.
53995as_myself=
53996case $0 in #((
53997  *[\\/]* ) as_myself=$0 ;;
53998  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53999for as_dir in $PATH
54000do
54001  IFS=$as_save_IFS
54002  test -z "$as_dir" && as_dir=.
54003    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
54004  done
54005IFS=$as_save_IFS
54006
54007     ;;
54008esac
54009# We did not find ourselves, most probably we were run as `sh COMMAND'
54010# in which case we are not to be found in the path.
54011if test "x$as_myself" = x; then
54012  as_myself=$0
54013fi
54014if test ! -f "$as_myself"; then
54015  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
54016  exit 1
54017fi
54018
54019# Unset variables that we do not need and which cause bugs (e.g. in
54020# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
54021# suppresses any "Segmentation fault" message there.  '((' could
54022# trigger a bug in pdksh 5.2.14.
54023for as_var in BASH_ENV ENV MAIL MAILPATH
54024do eval test x\${$as_var+set} = xset \
54025  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
54026done
54027PS1='$ '
54028PS2='> '
54029PS4='+ '
54030
54031# NLS nuisances.
54032LC_ALL=C
54033export LC_ALL
54034LANGUAGE=C
54035export LANGUAGE
54036
54037# CDPATH.
54038(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54039
54040
54041# as_fn_error STATUS ERROR [LINENO LOG_FD]
54042# ----------------------------------------
54043# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
54044# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
54045# script with STATUS, using 1 if that was 0.
54046as_fn_error ()
54047{
54048  as_status=$1; test $as_status -eq 0 && as_status=1
54049  if test "$4"; then
54050    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
54051    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
54052  fi
54053  $as_echo "$as_me: error: $2" >&2
54054  as_fn_exit $as_status
54055} # as_fn_error
54056
54057
54058# as_fn_set_status STATUS
54059# -----------------------
54060# Set $? to STATUS, without forking.
54061as_fn_set_status ()
54062{
54063  return $1
54064} # as_fn_set_status
54065
54066# as_fn_exit STATUS
54067# -----------------
54068# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
54069as_fn_exit ()
54070{
54071  set +e
54072  as_fn_set_status $1
54073  exit $1
54074} # as_fn_exit
54075
54076# as_fn_unset VAR
54077# ---------------
54078# Portably unset VAR.
54079as_fn_unset ()
54080{
54081  { eval $1=; unset $1;}
54082}
54083as_unset=as_fn_unset
54084# as_fn_append VAR VALUE
54085# ----------------------
54086# Append the text in VALUE to the end of the definition contained in VAR. Take
54087# advantage of any shell optimizations that allow amortized linear growth over
54088# repeated appends, instead of the typical quadratic growth present in naive
54089# implementations.
54090if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54091  eval 'as_fn_append ()
54092  {
54093    eval $1+=\$2
54094  }'
54095else
54096  as_fn_append ()
54097  {
54098    eval $1=\$$1\$2
54099  }
54100fi # as_fn_append
54101
54102# as_fn_arith ARG...
54103# ------------------
54104# Perform arithmetic evaluation on the ARGs, and store the result in the
54105# global $as_val. Take advantage of shells that can avoid forks. The arguments
54106# must be portable across $(()) and expr.
54107if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54108  eval 'as_fn_arith ()
54109  {
54110    as_val=$(( $* ))
54111  }'
54112else
54113  as_fn_arith ()
54114  {
54115    as_val=`expr "$@" || test $? -eq 1`
54116  }
54117fi # as_fn_arith
54118
54119
54120if expr a : '\(a\)' >/dev/null 2>&1 &&
54121   test "X`expr 00001 : '.*\(...\)'`" = X001; then
54122  as_expr=expr
54123else
54124  as_expr=false
54125fi
54126
54127if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54128  as_basename=basename
54129else
54130  as_basename=false
54131fi
54132
54133if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54134  as_dirname=dirname
54135else
54136  as_dirname=false
54137fi
54138
54139as_me=`$as_basename -- "$0" ||
54140$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54141	 X"$0" : 'X\(//\)$' \| \
54142	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54143$as_echo X/"$0" |
54144    sed '/^.*\/\([^/][^/]*\)\/*$/{
54145	    s//\1/
54146	    q
54147	  }
54148	  /^X\/\(\/\/\)$/{
54149	    s//\1/
54150	    q
54151	  }
54152	  /^X\/\(\/\).*/{
54153	    s//\1/
54154	    q
54155	  }
54156	  s/.*/./; q'`
54157
54158# Avoid depending upon Character Ranges.
54159as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54160as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54161as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54162as_cr_digits='0123456789'
54163as_cr_alnum=$as_cr_Letters$as_cr_digits
54164
54165ECHO_C= ECHO_N= ECHO_T=
54166case `echo -n x` in #(((((
54167-n*)
54168  case `echo 'xy\c'` in
54169  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54170  xy)  ECHO_C='\c';;
54171  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54172       ECHO_T='	';;
54173  esac;;
54174*)
54175  ECHO_N='-n';;
54176esac
54177
54178rm -f conf$$ conf$$.exe conf$$.file
54179if test -d conf$$.dir; then
54180  rm -f conf$$.dir/conf$$.file
54181else
54182  rm -f conf$$.dir
54183  mkdir conf$$.dir 2>/dev/null
54184fi
54185if (echo >conf$$.file) 2>/dev/null; then
54186  if ln -s conf$$.file conf$$ 2>/dev/null; then
54187    as_ln_s='ln -s'
54188    # ... but there are two gotchas:
54189    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54190    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54191    # In both cases, we have to default to `cp -pR'.
54192    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54193      as_ln_s='cp -pR'
54194  elif ln conf$$.file conf$$ 2>/dev/null; then
54195    as_ln_s=ln
54196  else
54197    as_ln_s='cp -pR'
54198  fi
54199else
54200  as_ln_s='cp -pR'
54201fi
54202rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54203rmdir conf$$.dir 2>/dev/null
54204
54205
54206# as_fn_mkdir_p
54207# -------------
54208# Create "$as_dir" as a directory, including parents if necessary.
54209as_fn_mkdir_p ()
54210{
54211
54212  case $as_dir in #(
54213  -*) as_dir=./$as_dir;;
54214  esac
54215  test -d "$as_dir" || eval $as_mkdir_p || {
54216    as_dirs=
54217    while :; do
54218      case $as_dir in #(
54219      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54220      *) as_qdir=$as_dir;;
54221      esac
54222      as_dirs="'$as_qdir' $as_dirs"
54223      as_dir=`$as_dirname -- "$as_dir" ||
54224$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54225	 X"$as_dir" : 'X\(//\)[^/]' \| \
54226	 X"$as_dir" : 'X\(//\)$' \| \
54227	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54228$as_echo X"$as_dir" |
54229    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54230	    s//\1/
54231	    q
54232	  }
54233	  /^X\(\/\/\)[^/].*/{
54234	    s//\1/
54235	    q
54236	  }
54237	  /^X\(\/\/\)$/{
54238	    s//\1/
54239	    q
54240	  }
54241	  /^X\(\/\).*/{
54242	    s//\1/
54243	    q
54244	  }
54245	  s/.*/./; q'`
54246      test -d "$as_dir" && break
54247    done
54248    test -z "$as_dirs" || eval "mkdir $as_dirs"
54249  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54250
54251
54252} # as_fn_mkdir_p
54253if mkdir -p . 2>/dev/null; then
54254  as_mkdir_p='mkdir -p "$as_dir"'
54255else
54256  test -d ./-p && rmdir ./-p
54257  as_mkdir_p=false
54258fi
54259
54260
54261# as_fn_executable_p FILE
54262# -----------------------
54263# Test if FILE is an executable regular file.
54264as_fn_executable_p ()
54265{
54266  test -f "$1" && test -x "$1"
54267} # as_fn_executable_p
54268as_test_x='test -x'
54269as_executable_p=as_fn_executable_p
54270
54271# Sed expression to map a string onto a valid CPP name.
54272as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54273
54274# Sed expression to map a string onto a valid variable name.
54275as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54276
54277
54278exec 6>&1
54279## ----------------------------------- ##
54280## Main body of $CONFIG_STATUS script. ##
54281## ----------------------------------- ##
54282_ASEOF
54283test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54284
54285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54286# Save the log message, to keep $0 and so on meaningful, and to
54287# report actual input values of CONFIG_FILES etc. instead of their
54288# values after options handling.
54289ac_log="
54290This file was extended by OpenJDK $as_me jdk9, which was
54291generated by GNU Autoconf 2.69.  Invocation command line was
54292
54293  CONFIG_FILES    = $CONFIG_FILES
54294  CONFIG_HEADERS  = $CONFIG_HEADERS
54295  CONFIG_LINKS    = $CONFIG_LINKS
54296  CONFIG_COMMANDS = $CONFIG_COMMANDS
54297  $ $0 $@
54298
54299on `(hostname || uname -n) 2>/dev/null | sed 1q`
54300"
54301
54302_ACEOF
54303
54304case $ac_config_files in *"
54305"*) set x $ac_config_files; shift; ac_config_files=$*;;
54306esac
54307
54308
54309
54310cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54311# Files that config.status was made for.
54312config_files="$ac_config_files"
54313
54314_ACEOF
54315
54316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54317ac_cs_usage="\
54318\`$as_me' instantiates files and other configuration actions
54319from templates according to the current configuration.  Unless the files
54320and actions are specified as TAGs, all are instantiated by default.
54321
54322Usage: $0 [OPTION]... [TAG]...
54323
54324  -h, --help       print this help, then exit
54325  -V, --version    print version number and configuration settings, then exit
54326      --config     print configuration, then exit
54327  -q, --quiet, --silent
54328                   do not print progress messages
54329  -d, --debug      don't remove temporary files
54330      --recheck    update $as_me by reconfiguring in the same conditions
54331      --file=FILE[:TEMPLATE]
54332                   instantiate the configuration file FILE
54333
54334Configuration files:
54335$config_files
54336
54337Report bugs to <build-dev@openjdk.java.net>.
54338OpenJDK home page: <http://openjdk.java.net>."
54339
54340_ACEOF
54341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54342ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54343ac_cs_version="\\
54344OpenJDK config.status jdk9
54345configured by $0, generated by GNU Autoconf 2.69,
54346  with options \\"\$ac_cs_config\\"
54347
54348Copyright (C) 2012 Free Software Foundation, Inc.
54349This config.status script is free software; the Free Software Foundation
54350gives unlimited permission to copy, distribute and modify it."
54351
54352ac_pwd='$ac_pwd'
54353srcdir='$srcdir'
54354AWK='$AWK'
54355test -n "\$AWK" || AWK=awk
54356_ACEOF
54357
54358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54359# The default lists apply if the user does not specify any file.
54360ac_need_defaults=:
54361while test $# != 0
54362do
54363  case $1 in
54364  --*=?*)
54365    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54366    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54367    ac_shift=:
54368    ;;
54369  --*=)
54370    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54371    ac_optarg=
54372    ac_shift=:
54373    ;;
54374  *)
54375    ac_option=$1
54376    ac_optarg=$2
54377    ac_shift=shift
54378    ;;
54379  esac
54380
54381  case $ac_option in
54382  # Handling of the options.
54383  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54384    ac_cs_recheck=: ;;
54385  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54386    $as_echo "$ac_cs_version"; exit ;;
54387  --config | --confi | --conf | --con | --co | --c )
54388    $as_echo "$ac_cs_config"; exit ;;
54389  --debug | --debu | --deb | --de | --d | -d )
54390    debug=: ;;
54391  --file | --fil | --fi | --f )
54392    $ac_shift
54393    case $ac_optarg in
54394    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54395    '') as_fn_error $? "missing file argument" ;;
54396    esac
54397    as_fn_append CONFIG_FILES " '$ac_optarg'"
54398    ac_need_defaults=false;;
54399  --he | --h |  --help | --hel | -h )
54400    $as_echo "$ac_cs_usage"; exit ;;
54401  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54402  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54403    ac_cs_silent=: ;;
54404
54405  # This is an error.
54406  -*) as_fn_error $? "unrecognized option: \`$1'
54407Try \`$0 --help' for more information." ;;
54408
54409  *) as_fn_append ac_config_targets " $1"
54410     ac_need_defaults=false ;;
54411
54412  esac
54413  shift
54414done
54415
54416ac_configure_extra_args=
54417
54418if $ac_cs_silent; then
54419  exec 6>/dev/null
54420  ac_configure_extra_args="$ac_configure_extra_args --silent"
54421fi
54422
54423_ACEOF
54424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54425if \$ac_cs_recheck; then
54426  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54427  shift
54428  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54429  CONFIG_SHELL='$SHELL'
54430  export CONFIG_SHELL
54431  exec "\$@"
54432fi
54433
54434_ACEOF
54435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54436exec 5>>config.log
54437{
54438  echo
54439  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54440## Running $as_me. ##
54441_ASBOX
54442  $as_echo "$ac_log"
54443} >&5
54444
54445_ACEOF
54446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54447_ACEOF
54448
54449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54450
54451# Handling of arguments.
54452for ac_config_target in $ac_config_targets
54453do
54454  case $ac_config_target in
54455    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54456    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54457    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54458    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54459    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54460
54461  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54462  esac
54463done
54464
54465
54466# If the user did not use the arguments to specify the items to instantiate,
54467# then the envvar interface is used.  Set only those that are not.
54468# We use the long form for the default assignment because of an extremely
54469# bizarre bug on SunOS 4.1.3.
54470if $ac_need_defaults; then
54471  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54472fi
54473
54474# Have a temporary directory for convenience.  Make it in the build tree
54475# simply because there is no reason against having it here, and in addition,
54476# creating and moving files from /tmp can sometimes cause problems.
54477# Hook for its removal unless debugging.
54478# Note that there is a small window in which the directory will not be cleaned:
54479# after its creation but before its name has been assigned to `$tmp'.
54480$debug ||
54481{
54482  tmp= ac_tmp=
54483  trap 'exit_status=$?
54484  : "${ac_tmp:=$tmp}"
54485  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54486' 0
54487  trap 'as_fn_exit 1' 1 2 13 15
54488}
54489# Create a (secure) tmp directory for tmp files.
54490
54491{
54492  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54493  test -d "$tmp"
54494}  ||
54495{
54496  tmp=./conf$$-$RANDOM
54497  (umask 077 && mkdir "$tmp")
54498} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54499ac_tmp=$tmp
54500
54501# Set up the scripts for CONFIG_FILES section.
54502# No need to generate them if there are no CONFIG_FILES.
54503# This happens for instance with `./config.status config.h'.
54504if test -n "$CONFIG_FILES"; then
54505
54506
54507ac_cr=`echo X | tr X '\015'`
54508# On cygwin, bash can eat \r inside `` if the user requested igncr.
54509# But we know of no other shell where ac_cr would be empty at this
54510# point, so we can use a bashism as a fallback.
54511if test "x$ac_cr" = x; then
54512  eval ac_cr=\$\'\\r\'
54513fi
54514ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54515if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54516  ac_cs_awk_cr='\\r'
54517else
54518  ac_cs_awk_cr=$ac_cr
54519fi
54520
54521echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54522_ACEOF
54523
54524
54525{
54526  echo "cat >conf$$subs.awk <<_ACEOF" &&
54527  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54528  echo "_ACEOF"
54529} >conf$$subs.sh ||
54530  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54531ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54532ac_delim='%!_!# '
54533for ac_last_try in false false false false false :; do
54534  . ./conf$$subs.sh ||
54535    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54536
54537  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54538  if test $ac_delim_n = $ac_delim_num; then
54539    break
54540  elif $ac_last_try; then
54541    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54542  else
54543    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54544  fi
54545done
54546rm -f conf$$subs.sh
54547
54548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54549cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54550_ACEOF
54551sed -n '
54552h
54553s/^/S["/; s/!.*/"]=/
54554p
54555g
54556s/^[^!]*!//
54557:repl
54558t repl
54559s/'"$ac_delim"'$//
54560t delim
54561:nl
54562h
54563s/\(.\{148\}\)..*/\1/
54564t more1
54565s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54566p
54567n
54568b repl
54569:more1
54570s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54571p
54572g
54573s/.\{148\}//
54574t nl
54575:delim
54576h
54577s/\(.\{148\}\)..*/\1/
54578t more2
54579s/["\\]/\\&/g; s/^/"/; s/$/"/
54580p
54581b
54582:more2
54583s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54584p
54585g
54586s/.\{148\}//
54587t delim
54588' <conf$$subs.awk | sed '
54589/^[^""]/{
54590  N
54591  s/\n//
54592}
54593' >>$CONFIG_STATUS || ac_write_fail=1
54594rm -f conf$$subs.awk
54595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54596_ACAWK
54597cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54598  for (key in S) S_is_set[key] = 1
54599  FS = ""
54600
54601}
54602{
54603  line = $ 0
54604  nfields = split(line, field, "@")
54605  substed = 0
54606  len = length(field[1])
54607  for (i = 2; i < nfields; i++) {
54608    key = field[i]
54609    keylen = length(key)
54610    if (S_is_set[key]) {
54611      value = S[key]
54612      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54613      len += length(value) + length(field[++i])
54614      substed = 1
54615    } else
54616      len += 1 + keylen
54617  }
54618
54619  print line
54620}
54621
54622_ACAWK
54623_ACEOF
54624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54625if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54626  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54627else
54628  cat
54629fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54630  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54631_ACEOF
54632
54633# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54634# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54635# trailing colons and then remove the whole line if VPATH becomes empty
54636# (actually we leave an empty line to preserve line numbers).
54637if test "x$srcdir" = x.; then
54638  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54639h
54640s///
54641s/^/:/
54642s/[	 ]*$/:/
54643s/:\$(srcdir):/:/g
54644s/:\${srcdir}:/:/g
54645s/:@srcdir@:/:/g
54646s/^:*//
54647s/:*$//
54648x
54649s/\(=[	 ]*\).*/\1/
54650G
54651s/\n//
54652s/^[^=]*=[	 ]*$//
54653}'
54654fi
54655
54656cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54657fi # test -n "$CONFIG_FILES"
54658
54659
54660eval set X "  :F $CONFIG_FILES      "
54661shift
54662for ac_tag
54663do
54664  case $ac_tag in
54665  :[FHLC]) ac_mode=$ac_tag; continue;;
54666  esac
54667  case $ac_mode$ac_tag in
54668  :[FHL]*:*);;
54669  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54670  :[FH]-) ac_tag=-:-;;
54671  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54672  esac
54673  ac_save_IFS=$IFS
54674  IFS=:
54675  set x $ac_tag
54676  IFS=$ac_save_IFS
54677  shift
54678  ac_file=$1
54679  shift
54680
54681  case $ac_mode in
54682  :L) ac_source=$1;;
54683  :[FH])
54684    ac_file_inputs=
54685    for ac_f
54686    do
54687      case $ac_f in
54688      -) ac_f="$ac_tmp/stdin";;
54689      *) # Look for the file first in the build tree, then in the source tree
54690	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54691	 # because $ac_f cannot contain `:'.
54692	 test -f "$ac_f" ||
54693	   case $ac_f in
54694	   [\\/$]*) false;;
54695	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54696	   esac ||
54697	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54698      esac
54699      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54700      as_fn_append ac_file_inputs " '$ac_f'"
54701    done
54702
54703    # Let's still pretend it is `configure' which instantiates (i.e., don't
54704    # use $as_me), people would be surprised to read:
54705    #    /* config.h.  Generated by config.status.  */
54706    configure_input='Generated from '`
54707	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54708	`' by configure.'
54709    if test x"$ac_file" != x-; then
54710      configure_input="$ac_file.  $configure_input"
54711      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54712$as_echo "$as_me: creating $ac_file" >&6;}
54713    fi
54714    # Neutralize special characters interpreted by sed in replacement strings.
54715    case $configure_input in #(
54716    *\&* | *\|* | *\\* )
54717       ac_sed_conf_input=`$as_echo "$configure_input" |
54718       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54719    *) ac_sed_conf_input=$configure_input;;
54720    esac
54721
54722    case $ac_tag in
54723    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54724      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54725    esac
54726    ;;
54727  esac
54728
54729  ac_dir=`$as_dirname -- "$ac_file" ||
54730$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54731	 X"$ac_file" : 'X\(//\)[^/]' \| \
54732	 X"$ac_file" : 'X\(//\)$' \| \
54733	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54734$as_echo X"$ac_file" |
54735    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54736	    s//\1/
54737	    q
54738	  }
54739	  /^X\(\/\/\)[^/].*/{
54740	    s//\1/
54741	    q
54742	  }
54743	  /^X\(\/\/\)$/{
54744	    s//\1/
54745	    q
54746	  }
54747	  /^X\(\/\).*/{
54748	    s//\1/
54749	    q
54750	  }
54751	  s/.*/./; q'`
54752  as_dir="$ac_dir"; as_fn_mkdir_p
54753  ac_builddir=.
54754
54755case "$ac_dir" in
54756.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54757*)
54758  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54759  # A ".." for each directory in $ac_dir_suffix.
54760  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54761  case $ac_top_builddir_sub in
54762  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54763  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54764  esac ;;
54765esac
54766ac_abs_top_builddir=$ac_pwd
54767ac_abs_builddir=$ac_pwd$ac_dir_suffix
54768# for backward compatibility:
54769ac_top_builddir=$ac_top_build_prefix
54770
54771case $srcdir in
54772  .)  # We are building in place.
54773    ac_srcdir=.
54774    ac_top_srcdir=$ac_top_builddir_sub
54775    ac_abs_top_srcdir=$ac_pwd ;;
54776  [\\/]* | ?:[\\/]* )  # Absolute name.
54777    ac_srcdir=$srcdir$ac_dir_suffix;
54778    ac_top_srcdir=$srcdir
54779    ac_abs_top_srcdir=$srcdir ;;
54780  *) # Relative name.
54781    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54782    ac_top_srcdir=$ac_top_build_prefix$srcdir
54783    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54784esac
54785ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54786
54787
54788  case $ac_mode in
54789  :F)
54790  #
54791  # CONFIG_FILE
54792  #
54793
54794_ACEOF
54795
54796cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54797# If the template does not know about datarootdir, expand it.
54798# FIXME: This hack should be removed a few years after 2.60.
54799ac_datarootdir_hack=; ac_datarootdir_seen=
54800ac_sed_dataroot='
54801/datarootdir/ {
54802  p
54803  q
54804}
54805/@datadir@/p
54806/@docdir@/p
54807/@infodir@/p
54808/@localedir@/p
54809/@mandir@/p'
54810case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54811*datarootdir*) ac_datarootdir_seen=yes;;
54812*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54813  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54814$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54815_ACEOF
54816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54817  ac_datarootdir_hack='
54818  s&@datadir@&$datadir&g
54819  s&@docdir@&$docdir&g
54820  s&@infodir@&$infodir&g
54821  s&@localedir@&$localedir&g
54822  s&@mandir@&$mandir&g
54823  s&\\\${datarootdir}&$datarootdir&g' ;;
54824esac
54825_ACEOF
54826
54827# Neutralize VPATH when `$srcdir' = `.'.
54828# Shell code in configure.ac might set extrasub.
54829# FIXME: do we really want to maintain this feature?
54830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54831ac_sed_extra="$ac_vpsub
54832$extrasub
54833_ACEOF
54834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54835:t
54836/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54837s|@configure_input@|$ac_sed_conf_input|;t t
54838s&@top_builddir@&$ac_top_builddir_sub&;t t
54839s&@top_build_prefix@&$ac_top_build_prefix&;t t
54840s&@srcdir@&$ac_srcdir&;t t
54841s&@abs_srcdir@&$ac_abs_srcdir&;t t
54842s&@top_srcdir@&$ac_top_srcdir&;t t
54843s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54844s&@builddir@&$ac_builddir&;t t
54845s&@abs_builddir@&$ac_abs_builddir&;t t
54846s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54847$ac_datarootdir_hack
54848"
54849eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54850  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54851
54852test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54853  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54854  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54855      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54856  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54857which seems to be undefined.  Please make sure it is defined" >&5
54858$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54859which seems to be undefined.  Please make sure it is defined" >&2;}
54860
54861  rm -f "$ac_tmp/stdin"
54862  case $ac_file in
54863  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54864  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54865  esac \
54866  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54867 ;;
54868
54869
54870
54871  esac
54872
54873done # for ac_tag
54874
54875
54876as_fn_exit 0
54877_ACEOF
54878ac_clean_files=$ac_clean_files_save
54879
54880test $ac_write_fail = 0 ||
54881  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54882
54883
54884# configure is writing to config.log, and then calls config.status.
54885# config.status does its own redirection, appending to config.log.
54886# Unfortunately, on DOS this fails, as config.log is still kept open
54887# by configure, so config.status won't be able to write to it; its
54888# output is simply discarded.  So we exec the FD to /dev/null,
54889# effectively closing config.log, so it can be properly (re)opened and
54890# appended to by config.status.  When coming back to configure, we
54891# need to make the FD available again.
54892if test "$no_create" != yes; then
54893  ac_cs_success=:
54894  ac_config_status_args=
54895  test "$silent" = yes &&
54896    ac_config_status_args="$ac_config_status_args --quiet"
54897  exec 5>/dev/null
54898  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54899  exec 5>>config.log
54900  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54901  # would make configure fail if this is the last instruction.
54902  $ac_cs_success || as_fn_exit 1
54903fi
54904if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54905  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54906$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54907fi
54908
54909
54910# After AC_OUTPUT, we need to do final work
54911
54912
54913  # Try to move config.log (generated by autoconf) to the configure-support directory.
54914  if test -e ./config.log; then
54915    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54916  fi
54917
54918  # Rotate our log file (configure.log)
54919  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54920    $RM -f "$OUTPUT_ROOT/configure.log.old"
54921  fi
54922  if test -e "$OUTPUT_ROOT/configure.log"; then
54923    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54924  fi
54925
54926  # Move configure.log from current directory to the build output root
54927  if test -e ./configure.log; then
54928    echo found it
54929    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54930  fi
54931
54932  # Make the compare script executable
54933  $CHMOD +x $OUTPUT_ROOT/compare.sh
54934
54935
54936# Finally output some useful information to the user
54937
54938  # Finally output some useful information to the user
54939
54940  printf "\n"
54941  printf "====================================================\n"
54942  if test "x$no_create" != "xyes"; then
54943    if test "x$IS_RECONFIGURE" != "xyes"; then
54944      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54945    else
54946      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54947    fi
54948  else
54949    if test "x$IS_RECONFIGURE" != "xyes"; then
54950      printf "A configuration has been successfully checked but not created\n"
54951    else
54952      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54953    fi
54954  fi
54955  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54956    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54957  else
54958    printf "using default settings.\n"
54959  fi
54960
54961  printf "\n"
54962  printf "Configuration summary:\n"
54963  printf "* Debug level:    $DEBUG_LEVEL\n"
54964  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54965  printf "* JDK variant:    $JDK_VARIANT\n"
54966  printf "* JVM variants:   $with_jvm_variants\n"
54967  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54968  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54969
54970  printf "\n"
54971  printf "Tools summary:\n"
54972  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54973    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54974  fi
54975  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54976  if test "x$TOOLCHAIN_VERSION" != "x"; then
54977    print_version=" $TOOLCHAIN_VERSION"
54978  fi
54979  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54980  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54981  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54982
54983  printf "\n"
54984  printf "Build performance summary:\n"
54985  printf "* Cores to use:   $JOBS\n"
54986  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54987  if test "x$CCACHE_STATUS" != "x"; then
54988    printf "* ccache status:  $CCACHE_STATUS\n"
54989  fi
54990  printf "\n"
54991
54992  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54993    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54994    printf "will result in longer build times.\n"
54995    printf "\n"
54996  fi
54997
54998  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54999    printf "WARNING: You have old-style ALT_ environment variables set.\n"
55000    printf "These are not respected, and will be ignored. It is recommended\n"
55001    printf "that you clean your environment. The following variables are set:\n"
55002    printf "$FOUND_ALT_VARIABLES\n"
55003    printf "\n"
55004  fi
55005
55006  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
55007    printf "WARNING: Your build output directory is not on a local disk.\n"
55008    printf "This will severely degrade build performance!\n"
55009    printf "It is recommended that you create an output directory on a local disk,\n"
55010    printf "and run the configure script again from that directory.\n"
55011    printf "\n"
55012  fi
55013
55014  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
55015    printf "WARNING: The result of this configuration has overridden an older\n"
55016    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
55017    printf "proper build. Failure to do so might result in strange build problems.\n"
55018    printf "\n"
55019  fi
55020
55021  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
55022    printf "WARNING: The result of this configuration was not saved.\n"
55023    printf "You should run without '--no-create | -n' to create the configuration.\n"
55024    printf "\n"
55025  fi
55026
55027
55028
55029  # Locate config.log.
55030  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
55031    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
55032  elif test -e "./config.log"; then
55033    CONFIG_LOG_PATH="."
55034  fi
55035
55036  if test -e "$CONFIG_LOG_PATH/config.log"; then
55037    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
55038    if test $? -eq 0; then
55039      printf "The following warnings were produced. Repeated here for convenience:\n"
55040      # We must quote sed expression (using []) to stop m4 from eating the [].
55041      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
55042      printf "\n"
55043    fi
55044  fi
55045
55046