generated-configure.sh revision 1901:9a38f8b4ba22
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
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691STRIP_POLICY
692DEBUG_BINARIES
693ZIP_EXTERNAL_DEBUG_SYMBOLS
694COPY_DEBUG_SYMBOLS
695COMPILE_WITH_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SHARED_LIBRARY_FLAGS
733SET_SHARED_LIBRARY_MAPFILE
734SET_SHARED_LIBRARY_NAME
735SET_SHARED_LIBRARY_ORIGIN
736SET_EXECUTABLE_ORIGIN
737CXX_FLAG_REORDER
738C_FLAG_REORDER
739RC_FLAGS
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744STRIPFLAGS
745ARFLAGS
746COMPILER_COMMAND_FILE_FLAG
747COMPILER_TARGET_BITS_FLAG
748JT_HOME
749JTREGEXE
750USING_BROKEN_SUSE_LD
751PACKAGE_PATH
752USE_CLANG
753HOTSPOT_LD
754HOTSPOT_CXX
755HOTSPOT_RC
756HOTSPOT_MT
757BUILD_AS
758BUILD_LDCXX
759BUILD_LD
760BUILD_AR
761BUILD_NM
762BUILD_CXX
763BUILD_CC
764BUILD_SYSROOT_LDFLAGS
765BUILD_SYSROOT_CFLAGS
766ac_ct_OBJDUMP
767OBJDUMP
768ac_ct_OBJCOPY
769OBJCOPY
770ac_ct_NM
771ac_ct_STRIP
772GNM
773NM
774STRIP
775MSBUILD
776DUMPBIN
777RC
778MT
779LIPO
780ac_ct_AR
781AR
782AS
783LDCXX
784LD
785CXXCPP
786CPP
787ac_ct_CXX
788CXXFLAGS
789CXX
790TOOLCHAIN_PATH_CXX
791POTENTIAL_CXX
792OBJEXT
793EXEEXT
794ac_ct_CC
795CPPFLAGS
796LDFLAGS
797CFLAGS
798CC
799TOOLCHAIN_PATH_CC
800POTENTIAL_CC
801TOOLCHAIN_VERSION
802VS_LIB
803VS_INCLUDE
804VS_PATH
805CYGWIN_LINK
806SYSROOT_LDFLAGS
807SYSROOT_CFLAGS
808LEGACY_EXTRA_LDFLAGS
809LEGACY_EXTRA_CXXFLAGS
810LEGACY_EXTRA_CFLAGS
811EXE_SUFFIX
812OBJ_SUFFIX
813STATIC_LIBRARY
814SHARED_LIBRARY
815STATIC_LIBRARY_SUFFIX
816SHARED_LIBRARY_SUFFIX
817LIBRARY_PREFIX
818TOOLCHAIN_TYPE
819STATIC_BUILD
820BUILD_HOTSPOT
821HOTSPOT_DIST
822BUILD_OUTPUT
823JDK_TOPDIR
824NASHORN_TOPDIR
825HOTSPOT_TOPDIR
826JAXWS_TOPDIR
827JAXP_TOPDIR
828CORBA_TOPDIR
829LANGTOOLS_TOPDIR
830BOOT_JDK_BITS
831JAVAC_FLAGS
832BOOT_JDK_SOURCETARGET
833JARSIGNER
834JAR
835JAVAH
836JAVAC
837JAVA
838BOOT_JDK
839JAVA_CHECK
840JAVAC_CHECK
841VERSION_IS_GA
842VERSION_SHORT
843VERSION_STRING
844VERSION_NUMBER_FOUR_POSITIONS
845VERSION_NUMBER
846VERSION_OPT
847VERSION_BUILD
848VERSION_PRE
849VERSION_PATCH
850VERSION_SECURITY
851VERSION_MINOR
852VERSION_MAJOR
853MACOSX_BUNDLE_ID_BASE
854MACOSX_BUNDLE_NAME_BASE
855COMPANY_NAME
856JDK_RC_PLATFORM_NAME
857PRODUCT_SUFFIX
858PRODUCT_NAME
859LAUNCHER_NAME
860TEST_IN_BUILD
861COPYRIGHT_YEAR
862COMPRESS_JARS
863UNLIMITED_CRYPTO
864CACERTS_FILE
865BUILD_HEADLESS
866SUPPORT_HEADFUL
867SUPPORT_HEADLESS
868DEFAULT_MAKE_TARGET
869OS_VERSION_MICRO
870OS_VERSION_MINOR
871OS_VERSION_MAJOR
872PKG_CONFIG
873BASH_ARGS
874SETFILE
875CODESIGN
876XATTR
877DSYMUTIL
878IS_GNU_TIME
879PATCH
880TIME
881STAT
882HG
883READELF
884OTOOL
885LDD
886ZIP
887UNZIP
888FIND_DELETE
889OUTPUT_SYNC
890OUTPUT_SYNC_SUPPORTED
891CHECK_TOOLSDIR_MAKE
892CHECK_TOOLSDIR_GMAKE
893CHECK_MAKE
894CHECK_GMAKE
895MAKE
896PKGHANDLER
897CONFIGURESUPPORT_OUTPUTDIR
898OUTPUT_ROOT
899CONF_NAME
900SPEC
901SDKROOT
902XCODEBUILD
903BUILD_VARIANT_RELEASE
904DEBUG_CLASSFILES
905FASTDEBUG
906VARIANT
907DEBUG_LEVEL
908MACOSX_UNIVERSAL
909INCLUDE_SA
910JVM_VARIANT_CORE
911JVM_VARIANT_ZEROSHARK
912JVM_VARIANT_ZERO
913JVM_VARIANT_MINIMAL1
914JVM_VARIANT_CLIENT
915JVM_VARIANT_SERVER
916JVM_VARIANTS
917JVM_INTERPRETER
918JDK_VARIANT
919SET_OPENJDK
920CANONICAL_TOPDIR
921ORIGINAL_TOPDIR
922TOPDIR
923PATH_SEP
924ZERO_ARCHDEF
925DEFINE_CROSS_COMPILE_ARCH
926LP64
927OPENJDK_TARGET_OS_EXPORT_DIR
928OPENJDK_TARGET_CPU_JLI_CFLAGS
929OPENJDK_TARGET_CPU_OSARCH
930OPENJDK_TARGET_CPU_ISADIR
931OPENJDK_TARGET_CPU_LIBDIR
932OPENJDK_TARGET_CPU_LEGACY_LIB
933OPENJDK_TARGET_CPU_LEGACY
934REQUIRED_OS_VERSION
935REQUIRED_OS_NAME
936COMPILE_TYPE
937OPENJDK_TARGET_CPU_ENDIAN
938OPENJDK_TARGET_CPU_BITS
939OPENJDK_TARGET_CPU_ARCH
940OPENJDK_TARGET_CPU
941OPENJDK_TARGET_OS_ENV
942OPENJDK_TARGET_OS_TYPE
943OPENJDK_TARGET_OS
944OPENJDK_BUILD_CPU_ENDIAN
945OPENJDK_BUILD_CPU_BITS
946OPENJDK_BUILD_CPU_ARCH
947OPENJDK_BUILD_CPU
948OPENJDK_BUILD_OS_ENV
949OPENJDK_BUILD_OS_TYPE
950OPENJDK_BUILD_OS
951OPENJDK_BUILD_AUTOCONF_NAME
952OPENJDK_TARGET_AUTOCONF_NAME
953target_os
954target_vendor
955target_cpu
956target
957host_os
958host_vendor
959host_cpu
960host
961build_os
962build_vendor
963build_cpu
964build
965NICE
966CPIO
967DF
968READLINK
969CYGPATH
970SED
971FGREP
972EGREP
973GREP
974AWK
975XARGS
976WHICH
977WC
978UNIQ
979UNAME
980TR
981TOUCH
982TEE
983TAR
984TAIL
985SORT
986SH
987RMDIR
988RM
989PRINTF
990NAWK
991MV
992MKTEMP
993MKDIR
994LS
995LN
996HEAD
997FIND
998FILE
999EXPR
1000ECHO
1001DIRNAME
1002DIFF
1003DATE
1004CUT
1005CP
1006COMM
1007CMP
1008CHMOD
1009CAT
1010BASH
1011BASENAME
1012DATE_WHEN_CONFIGURED
1013ORIGINAL_PATH
1014CONFIGURE_COMMAND_LINE
1015target_alias
1016host_alias
1017build_alias
1018LIBS
1019ECHO_T
1020ECHO_N
1021ECHO_C
1022DEFS
1023mandir
1024localedir
1025libdir
1026psdir
1027pdfdir
1028dvidir
1029htmldir
1030infodir
1031docdir
1032oldincludedir
1033includedir
1034localstatedir
1035sharedstatedir
1036sysconfdir
1037datadir
1038datarootdir
1039libexecdir
1040sbindir
1041bindir
1042program_transform_name
1043prefix
1044exec_prefix
1045PACKAGE_URL
1046PACKAGE_BUGREPORT
1047PACKAGE_STRING
1048PACKAGE_VERSION
1049PACKAGE_TARNAME
1050PACKAGE_NAME
1051PATH_SEPARATOR
1052SHELL'
1053ac_subst_files=''
1054ac_user_opts='
1055enable_option_checking
1056with_target_bits
1057enable_openjdk_only
1058with_custom_make_dir
1059with_jdk_variant
1060with_jvm_interpreter
1061with_jvm_variants
1062enable_debug
1063with_debug_level
1064with_devkit
1065with_sys_root
1066with_sysroot
1067with_tools_dir
1068with_toolchain_path
1069with_extra_path
1070with_sdk_name
1071with_conf_name
1072with_output_sync
1073with_default_make_target
1074enable_headful
1075with_cacerts_file
1076enable_unlimited_crypto
1077with_copyright_year
1078enable_hotspot_test_in_build
1079with_milestone
1080with_update_version
1081with_user_release_suffix
1082with_build_number
1083with_version_string
1084with_version_pre
1085with_version_opt
1086with_version_build
1087with_version_major
1088with_version_minor
1089with_version_security
1090with_version_patch
1091with_boot_jdk
1092with_add_source_root
1093with_override_source_root
1094with_adds_and_overrides
1095with_override_langtools
1096with_override_corba
1097with_override_jaxp
1098with_override_jaxws
1099with_override_hotspot
1100with_override_nashorn
1101with_override_jdk
1102with_import_hotspot
1103enable_static_build
1104with_toolchain_type
1105with_extra_cflags
1106with_extra_cxxflags
1107with_extra_ldflags
1108with_toolchain_version
1109with_build_devkit
1110with_jtreg
1111enable_warnings_as_errors
1112with_native_debug_symbols
1113enable_debug_symbols
1114enable_zip_debug_info
1115enable_native_coverage
1116with_stdc__lib
1117with_msvcr_dll
1118with_msvcp_dll
1119with_x
1120with_cups
1121with_cups_include
1122with_freetype
1123with_freetype_include
1124with_freetype_lib
1125with_freetype_src
1126enable_freetype_bundling
1127with_alsa
1128with_alsa_include
1129with_alsa_lib
1130with_libffi
1131with_libffi_include
1132with_libffi_lib
1133with_libjpeg
1134with_giflib
1135with_libpng
1136with_zlib
1137with_lcms
1138with_dxsdk
1139with_dxsdk_lib
1140with_dxsdk_include
1141with_num_cores
1142with_memory_size
1143with_jobs
1144with_test_jobs
1145with_boot_jdk_jvmargs
1146with_sjavac_server_java
1147enable_sjavac
1148enable_javac_server
1149enable_icecc
1150enable_precompiled_headers
1151enable_ccache
1152with_ccache_dir
1153'
1154      ac_precious_vars='build_alias
1155host_alias
1156target_alias
1157BASENAME
1158BASH
1159CAT
1160CHMOD
1161CMP
1162COMM
1163CP
1164CUT
1165DATE
1166DIFF
1167DIRNAME
1168ECHO
1169EXPR
1170FILE
1171FIND
1172HEAD
1173LN
1174LS
1175MKDIR
1176MKTEMP
1177MV
1178NAWK
1179PRINTF
1180RM
1181RMDIR
1182SH
1183SORT
1184TAIL
1185TAR
1186TEE
1187TOUCH
1188TR
1189UNAME
1190UNIQ
1191WC
1192WHICH
1193XARGS
1194AWK
1195GREP
1196EGREP
1197FGREP
1198SED
1199CYGPATH
1200READLINK
1201DF
1202CPIO
1203NICE
1204MAKE
1205UNZIP
1206ZIP
1207LDD
1208OTOOL
1209READELF
1210HG
1211STAT
1212TIME
1213PATCH
1214DSYMUTIL
1215XATTR
1216CODESIGN
1217SETFILE
1218PKG_CONFIG
1219JAVA
1220JAVAC
1221JAVAH
1222JAR
1223JARSIGNER
1224CC
1225CFLAGS
1226LDFLAGS
1227LIBS
1228CPPFLAGS
1229CXX
1230CXXFLAGS
1231CCC
1232CPP
1233CXXCPP
1234AS
1235AR
1236LIPO
1237STRIP
1238NM
1239GNM
1240OBJCOPY
1241OBJDUMP
1242BUILD_CC
1243BUILD_CXX
1244BUILD_NM
1245BUILD_AR
1246JTREGEXE
1247XMKMF
1248FREETYPE_CFLAGS
1249FREETYPE_LIBS
1250ALSA_CFLAGS
1251ALSA_LIBS
1252LIBFFI_CFLAGS
1253LIBFFI_LIBS
1254PNG_CFLAGS
1255PNG_LIBS
1256LCMS_CFLAGS
1257LCMS_LIBS
1258ICECC_CMD
1259ICECC_CREATE_ENV
1260ICECC_WRAPPER
1261CCACHE'
1262
1263
1264# Initialize some variables set by options.
1265ac_init_help=
1266ac_init_version=false
1267ac_unrecognized_opts=
1268ac_unrecognized_sep=
1269# The variables have the same names as the options, with
1270# dashes changed to underlines.
1271cache_file=/dev/null
1272exec_prefix=NONE
1273no_create=
1274no_recursion=
1275prefix=NONE
1276program_prefix=NONE
1277program_suffix=NONE
1278program_transform_name=s,x,x,
1279silent=
1280site=
1281srcdir=
1282verbose=
1283x_includes=NONE
1284x_libraries=NONE
1285
1286# Installation directory options.
1287# These are left unexpanded so users can "make install exec_prefix=/foo"
1288# and all the variables that are supposed to be based on exec_prefix
1289# by default will actually change.
1290# Use braces instead of parens because sh, perl, etc. also accept them.
1291# (The list follows the same order as the GNU Coding Standards.)
1292bindir='${exec_prefix}/bin'
1293sbindir='${exec_prefix}/sbin'
1294libexecdir='${exec_prefix}/libexec'
1295datarootdir='${prefix}/share'
1296datadir='${datarootdir}'
1297sysconfdir='${prefix}/etc'
1298sharedstatedir='${prefix}/com'
1299localstatedir='${prefix}/var'
1300includedir='${prefix}/include'
1301oldincludedir='/usr/include'
1302docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1303infodir='${datarootdir}/info'
1304htmldir='${docdir}'
1305dvidir='${docdir}'
1306pdfdir='${docdir}'
1307psdir='${docdir}'
1308libdir='${exec_prefix}/lib'
1309localedir='${datarootdir}/locale'
1310mandir='${datarootdir}/man'
1311
1312ac_prev=
1313ac_dashdash=
1314for ac_option
1315do
1316  # If the previous option needs an argument, assign it.
1317  if test -n "$ac_prev"; then
1318    eval $ac_prev=\$ac_option
1319    ac_prev=
1320    continue
1321  fi
1322
1323  case $ac_option in
1324  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1325  *=)   ac_optarg= ;;
1326  *)    ac_optarg=yes ;;
1327  esac
1328
1329  # Accept the important Cygnus configure options, so we can diagnose typos.
1330
1331  case $ac_dashdash$ac_option in
1332  --)
1333    ac_dashdash=yes ;;
1334
1335  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1336    ac_prev=bindir ;;
1337  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1338    bindir=$ac_optarg ;;
1339
1340  -build | --build | --buil | --bui | --bu)
1341    ac_prev=build_alias ;;
1342  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1343    build_alias=$ac_optarg ;;
1344
1345  -cache-file | --cache-file | --cache-fil | --cache-fi \
1346  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1347    ac_prev=cache_file ;;
1348  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1349  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1350    cache_file=$ac_optarg ;;
1351
1352  --config-cache | -C)
1353    cache_file=config.cache ;;
1354
1355  -datadir | --datadir | --datadi | --datad)
1356    ac_prev=datadir ;;
1357  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1358    datadir=$ac_optarg ;;
1359
1360  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1361  | --dataroo | --dataro | --datar)
1362    ac_prev=datarootdir ;;
1363  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1364  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1365    datarootdir=$ac_optarg ;;
1366
1367  -disable-* | --disable-*)
1368    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1369    # Reject names that are not valid shell variable names.
1370    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1371      as_fn_error $? "invalid feature name: $ac_useropt"
1372    ac_useropt_orig=$ac_useropt
1373    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1374    case $ac_user_opts in
1375      *"
1376"enable_$ac_useropt"
1377"*) ;;
1378      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1379	 ac_unrecognized_sep=', ';;
1380    esac
1381    eval enable_$ac_useropt=no ;;
1382
1383  -docdir | --docdir | --docdi | --doc | --do)
1384    ac_prev=docdir ;;
1385  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1386    docdir=$ac_optarg ;;
1387
1388  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1389    ac_prev=dvidir ;;
1390  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1391    dvidir=$ac_optarg ;;
1392
1393  -enable-* | --enable-*)
1394    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1395    # Reject names that are not valid shell variable names.
1396    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1397      as_fn_error $? "invalid feature name: $ac_useropt"
1398    ac_useropt_orig=$ac_useropt
1399    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1400    case $ac_user_opts in
1401      *"
1402"enable_$ac_useropt"
1403"*) ;;
1404      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1405	 ac_unrecognized_sep=', ';;
1406    esac
1407    eval enable_$ac_useropt=\$ac_optarg ;;
1408
1409  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1410  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1411  | --exec | --exe | --ex)
1412    ac_prev=exec_prefix ;;
1413  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1414  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1415  | --exec=* | --exe=* | --ex=*)
1416    exec_prefix=$ac_optarg ;;
1417
1418  -gas | --gas | --ga | --g)
1419    # Obsolete; use --with-gas.
1420    with_gas=yes ;;
1421
1422  -help | --help | --hel | --he | -h)
1423    ac_init_help=long ;;
1424  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1425    ac_init_help=recursive ;;
1426  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1427    ac_init_help=short ;;
1428
1429  -host | --host | --hos | --ho)
1430    ac_prev=host_alias ;;
1431  -host=* | --host=* | --hos=* | --ho=*)
1432    host_alias=$ac_optarg ;;
1433
1434  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1435    ac_prev=htmldir ;;
1436  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1437  | --ht=*)
1438    htmldir=$ac_optarg ;;
1439
1440  -includedir | --includedir | --includedi | --included | --include \
1441  | --includ | --inclu | --incl | --inc)
1442    ac_prev=includedir ;;
1443  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1444  | --includ=* | --inclu=* | --incl=* | --inc=*)
1445    includedir=$ac_optarg ;;
1446
1447  -infodir | --infodir | --infodi | --infod | --info | --inf)
1448    ac_prev=infodir ;;
1449  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1450    infodir=$ac_optarg ;;
1451
1452  -libdir | --libdir | --libdi | --libd)
1453    ac_prev=libdir ;;
1454  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1455    libdir=$ac_optarg ;;
1456
1457  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1458  | --libexe | --libex | --libe)
1459    ac_prev=libexecdir ;;
1460  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1461  | --libexe=* | --libex=* | --libe=*)
1462    libexecdir=$ac_optarg ;;
1463
1464  -localedir | --localedir | --localedi | --localed | --locale)
1465    ac_prev=localedir ;;
1466  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1467    localedir=$ac_optarg ;;
1468
1469  -localstatedir | --localstatedir | --localstatedi | --localstated \
1470  | --localstate | --localstat | --localsta | --localst | --locals)
1471    ac_prev=localstatedir ;;
1472  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1473  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1474    localstatedir=$ac_optarg ;;
1475
1476  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1477    ac_prev=mandir ;;
1478  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1479    mandir=$ac_optarg ;;
1480
1481  -nfp | --nfp | --nf)
1482    # Obsolete; use --without-fp.
1483    with_fp=no ;;
1484
1485  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1486  | --no-cr | --no-c | -n)
1487    no_create=yes ;;
1488
1489  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1490  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1491    no_recursion=yes ;;
1492
1493  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1494  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1495  | --oldin | --oldi | --old | --ol | --o)
1496    ac_prev=oldincludedir ;;
1497  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1498  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1499  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1500    oldincludedir=$ac_optarg ;;
1501
1502  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1503    ac_prev=prefix ;;
1504  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1505    prefix=$ac_optarg ;;
1506
1507  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1508  | --program-pre | --program-pr | --program-p)
1509    ac_prev=program_prefix ;;
1510  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1511  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1512    program_prefix=$ac_optarg ;;
1513
1514  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1515  | --program-suf | --program-su | --program-s)
1516    ac_prev=program_suffix ;;
1517  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1518  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1519    program_suffix=$ac_optarg ;;
1520
1521  -program-transform-name | --program-transform-name \
1522  | --program-transform-nam | --program-transform-na \
1523  | --program-transform-n | --program-transform- \
1524  | --program-transform | --program-transfor \
1525  | --program-transfo | --program-transf \
1526  | --program-trans | --program-tran \
1527  | --progr-tra | --program-tr | --program-t)
1528    ac_prev=program_transform_name ;;
1529  -program-transform-name=* | --program-transform-name=* \
1530  | --program-transform-nam=* | --program-transform-na=* \
1531  | --program-transform-n=* | --program-transform-=* \
1532  | --program-transform=* | --program-transfor=* \
1533  | --program-transfo=* | --program-transf=* \
1534  | --program-trans=* | --program-tran=* \
1535  | --progr-tra=* | --program-tr=* | --program-t=*)
1536    program_transform_name=$ac_optarg ;;
1537
1538  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1539    ac_prev=pdfdir ;;
1540  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1541    pdfdir=$ac_optarg ;;
1542
1543  -psdir | --psdir | --psdi | --psd | --ps)
1544    ac_prev=psdir ;;
1545  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1546    psdir=$ac_optarg ;;
1547
1548  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1549  | -silent | --silent | --silen | --sile | --sil)
1550    silent=yes ;;
1551
1552  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1553    ac_prev=sbindir ;;
1554  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1555  | --sbi=* | --sb=*)
1556    sbindir=$ac_optarg ;;
1557
1558  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1559  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1560  | --sharedst | --shareds | --shared | --share | --shar \
1561  | --sha | --sh)
1562    ac_prev=sharedstatedir ;;
1563  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1564  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1565  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1566  | --sha=* | --sh=*)
1567    sharedstatedir=$ac_optarg ;;
1568
1569  -site | --site | --sit)
1570    ac_prev=site ;;
1571  -site=* | --site=* | --sit=*)
1572    site=$ac_optarg ;;
1573
1574  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1575    ac_prev=srcdir ;;
1576  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1577    srcdir=$ac_optarg ;;
1578
1579  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1580  | --syscon | --sysco | --sysc | --sys | --sy)
1581    ac_prev=sysconfdir ;;
1582  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1583  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1584    sysconfdir=$ac_optarg ;;
1585
1586  -target | --target | --targe | --targ | --tar | --ta | --t)
1587    ac_prev=target_alias ;;
1588  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1589    target_alias=$ac_optarg ;;
1590
1591  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1592    verbose=yes ;;
1593
1594  -version | --version | --versio | --versi | --vers | -V)
1595    ac_init_version=: ;;
1596
1597  -with-* | --with-*)
1598    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1599    # Reject names that are not valid shell variable names.
1600    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1601      as_fn_error $? "invalid package name: $ac_useropt"
1602    ac_useropt_orig=$ac_useropt
1603    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1604    case $ac_user_opts in
1605      *"
1606"with_$ac_useropt"
1607"*) ;;
1608      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1609	 ac_unrecognized_sep=', ';;
1610    esac
1611    eval with_$ac_useropt=\$ac_optarg ;;
1612
1613  -without-* | --without-*)
1614    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1615    # Reject names that are not valid shell variable names.
1616    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1617      as_fn_error $? "invalid package name: $ac_useropt"
1618    ac_useropt_orig=$ac_useropt
1619    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1620    case $ac_user_opts in
1621      *"
1622"with_$ac_useropt"
1623"*) ;;
1624      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1625	 ac_unrecognized_sep=', ';;
1626    esac
1627    eval with_$ac_useropt=no ;;
1628
1629  --x)
1630    # Obsolete; use --with-x.
1631    with_x=yes ;;
1632
1633  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1634  | --x-incl | --x-inc | --x-in | --x-i)
1635    ac_prev=x_includes ;;
1636  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1637  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1638    x_includes=$ac_optarg ;;
1639
1640  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1641  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1642    ac_prev=x_libraries ;;
1643  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1644  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1645    x_libraries=$ac_optarg ;;
1646
1647  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1648Try \`$0 --help' for more information"
1649    ;;
1650
1651  *=*)
1652    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1653    # Reject names that are not valid shell variable names.
1654    case $ac_envvar in #(
1655      '' | [0-9]* | *[!_$as_cr_alnum]* )
1656      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1657    esac
1658    eval $ac_envvar=\$ac_optarg
1659    export $ac_envvar ;;
1660
1661  *)
1662    # FIXME: should be removed in autoconf 3.0.
1663    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1664    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1665      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1666    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1667    ;;
1668
1669  esac
1670done
1671
1672if test -n "$ac_prev"; then
1673  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1674  as_fn_error $? "missing argument to $ac_option"
1675fi
1676
1677if test -n "$ac_unrecognized_opts"; then
1678  case $enable_option_checking in
1679    no) ;;
1680    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1681    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1682  esac
1683fi
1684
1685# Check all directory arguments for consistency.
1686for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1687		datadir sysconfdir sharedstatedir localstatedir includedir \
1688		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1689		libdir localedir mandir
1690do
1691  eval ac_val=\$$ac_var
1692  # Remove trailing slashes.
1693  case $ac_val in
1694    */ )
1695      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1696      eval $ac_var=\$ac_val;;
1697  esac
1698  # Be sure to have absolute directory names.
1699  case $ac_val in
1700    [\\/$]* | ?:[\\/]* )  continue;;
1701    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1702  esac
1703  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1704done
1705
1706# There might be people who depend on the old broken behavior: `$host'
1707# used to hold the argument of --host etc.
1708# FIXME: To remove some day.
1709build=$build_alias
1710host=$host_alias
1711target=$target_alias
1712
1713# FIXME: To remove some day.
1714if test "x$host_alias" != x; then
1715  if test "x$build_alias" = x; then
1716    cross_compiling=maybe
1717  elif test "x$build_alias" != "x$host_alias"; then
1718    cross_compiling=yes
1719  fi
1720fi
1721
1722ac_tool_prefix=
1723test -n "$host_alias" && ac_tool_prefix=$host_alias-
1724
1725test "$silent" = yes && exec 6>/dev/null
1726
1727
1728ac_pwd=`pwd` && test -n "$ac_pwd" &&
1729ac_ls_di=`ls -di .` &&
1730ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1731  as_fn_error $? "working directory cannot be determined"
1732test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1733  as_fn_error $? "pwd does not report name of working directory"
1734
1735
1736# Find the source files, if location was not specified.
1737if test -z "$srcdir"; then
1738  ac_srcdir_defaulted=yes
1739  # Try the directory containing this script, then the parent directory.
1740  ac_confdir=`$as_dirname -- "$as_myself" ||
1741$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1742	 X"$as_myself" : 'X\(//\)[^/]' \| \
1743	 X"$as_myself" : 'X\(//\)$' \| \
1744	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1745$as_echo X"$as_myself" |
1746    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1747	    s//\1/
1748	    q
1749	  }
1750	  /^X\(\/\/\)[^/].*/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\/\)$/{
1755	    s//\1/
1756	    q
1757	  }
1758	  /^X\(\/\).*/{
1759	    s//\1/
1760	    q
1761	  }
1762	  s/.*/./; q'`
1763  srcdir=$ac_confdir
1764  if test ! -r "$srcdir/$ac_unique_file"; then
1765    srcdir=..
1766  fi
1767else
1768  ac_srcdir_defaulted=no
1769fi
1770if test ! -r "$srcdir/$ac_unique_file"; then
1771  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1772  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1773fi
1774ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1775ac_abs_confdir=`(
1776	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1777	pwd)`
1778# When building in place, set srcdir=.
1779if test "$ac_abs_confdir" = "$ac_pwd"; then
1780  srcdir=.
1781fi
1782# Remove unnecessary trailing slashes from srcdir.
1783# Double slashes in file names in object file debugging info
1784# mess up M-x gdb in Emacs.
1785case $srcdir in
1786*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1787esac
1788for ac_var in $ac_precious_vars; do
1789  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1790  eval ac_env_${ac_var}_value=\$${ac_var}
1791  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1792  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1793done
1794
1795#
1796# Report the --help message.
1797#
1798if test "$ac_init_help" = "long"; then
1799  # Omit some internal or obsolete options to make the list less imposing.
1800  # This message is too long to be a string in the A/UX 3.1 sh.
1801  cat <<_ACEOF
1802\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1803
1804Usage: $0 [OPTION]... [VAR=VALUE]...
1805
1806To assign environment variables (e.g., CC, CFLAGS...), specify them as
1807VAR=VALUE.  See below for descriptions of some of the useful variables.
1808
1809Defaults for the options are specified in brackets.
1810
1811Configuration:
1812  -h, --help              display this help and exit
1813      --help=short        display options specific to this package
1814      --help=recursive    display the short help of all the included packages
1815  -V, --version           display version information and exit
1816  -q, --quiet, --silent   do not print \`checking ...' messages
1817      --cache-file=FILE   cache test results in FILE [disabled]
1818  -C, --config-cache      alias for \`--cache-file=config.cache'
1819  -n, --no-create         do not create output files
1820      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1821
1822Installation directories:
1823  --prefix=PREFIX         install architecture-independent files in PREFIX
1824                          [$ac_default_prefix]
1825  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1826                          [PREFIX]
1827
1828By default, \`make install' will install all the files in
1829\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1830an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1831for instance \`--prefix=\$HOME'.
1832
1833For better control, use the options below.
1834
1835Fine tuning of the installation directories:
1836  --bindir=DIR            user executables [EPREFIX/bin]
1837  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1838  --libexecdir=DIR        program executables [EPREFIX/libexec]
1839  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1840  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1841  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1842  --libdir=DIR            object code libraries [EPREFIX/lib]
1843  --includedir=DIR        C header files [PREFIX/include]
1844  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1845  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1846  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1847  --infodir=DIR           info documentation [DATAROOTDIR/info]
1848  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1849  --mandir=DIR            man documentation [DATAROOTDIR/man]
1850  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1851  --htmldir=DIR           html documentation [DOCDIR]
1852  --dvidir=DIR            dvi documentation [DOCDIR]
1853  --pdfdir=DIR            pdf documentation [DOCDIR]
1854  --psdir=DIR             ps documentation [DOCDIR]
1855_ACEOF
1856
1857  cat <<\_ACEOF
1858
1859X features:
1860  --x-includes=DIR    X include files are in DIR
1861  --x-libraries=DIR   X library files are in DIR
1862
1863System types:
1864  --build=BUILD     configure for building on BUILD [guessed]
1865  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1866  --target=TARGET   configure for building compilers for TARGET [HOST]
1867_ACEOF
1868fi
1869
1870if test -n "$ac_init_help"; then
1871  case $ac_init_help in
1872     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1873   esac
1874  cat <<\_ACEOF
1875
1876Optional Features:
1877  --disable-option-checking  ignore unrecognized --enable/--with options
1878  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1879  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1880  --enable-openjdk-only   suppress building custom source even if present
1881                          [disabled]
1882  --enable-debug          set the debug level to fastdebug (shorthand for
1883                          --with-debug-level=fastdebug) [disabled]
1884  --disable-headful       disable building headful support (graphical UI
1885                          support) [enabled]
1886  --enable-unlimited-crypto
1887                          Enable unlimited crypto policy [disabled]
1888  --enable-hotspot-test-in-build
1889                          run the Queens test after Hotspot build [disabled]
1890  --enable-static-build   enable static library build [disabled]
1891  --disable-warnings-as-errors
1892                          do not consider native warnings to be an error
1893                          [enabled]
1894  --enable-debug-symbols  Deprecated. Option is kept for backwards
1895                          compatibility and is ignored
1896  --enable-zip-debug-info Deprecated. Option is kept for backwards
1897                          compatibility and is ignored
1898  --enable-native-coverage
1899                          enable native compilation with code coverage
1900                          data[disabled]
1901  --disable-freetype-bundling
1902                          disable bundling of the freetype library with the
1903                          build result [enabled on Windows or when using
1904                          --with-freetype, disabled otherwise]
1905  --enable-sjavac         use sjavac to do fast incremental compiles
1906                          [disabled]
1907  --disable-javac-server  disable javac server [enabled]
1908  --enable-icecc          enable distribted compilation of native code using
1909                          icecc/icecream [disabled]
1910  --disable-precompiled-headers
1911                          disable using precompiled headers when compiling C++
1912                          [enabled]
1913  --enable-ccache         enable using ccache to speed up recompilations
1914                          [disabled]
1915
1916Optional Packages:
1917  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1918  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1919  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1920                          support it), e.g. --with-target-bits=32 [guessed]
1921  --with-custom-make-dir  Deprecated. Option is kept for backwards
1922                          compatibility and is ignored
1923  --with-jdk-variant      JDK variant to build (normal) [normal]
1924  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1925  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1926                          client, minimal1, zero, zeroshark, core) [server]
1927  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1928                          optimized (HotSpot build only)) [release]
1929  --with-devkit           use this devkit for compilers, tools and resources
1930  --with-sys-root         alias for --with-sysroot for backwards compatability
1931  --with-sysroot          use this directory as sysroot
1932  --with-tools-dir        alias for --with-toolchain-path for backwards
1933                          compatibility
1934  --with-toolchain-path   prepend these directories when searching for
1935                          toolchain binaries (compilers etc)
1936  --with-extra-path       prepend these directories to the default path
1937  --with-sdk-name         use the platform SDK of the given name. [macosx]
1938  --with-conf-name        use this as the name of the configuration [generated
1939                          from important configuration options]
1940  --with-output-sync      set make output sync type if supported by make.
1941                          [recurse]
1942  --with-default-make-target
1943                          set the default make target [exploded-image]
1944  --with-cacerts-file     specify alternative cacerts file
1945  --with-copyright-year   Set copyright year value for build [current year]
1946  --with-milestone        Deprecated. Option is kept for backwards
1947                          compatibility and is ignored
1948  --with-update-version   Deprecated. Option is kept for backwards
1949                          compatibility and is ignored
1950  --with-user-release-suffix
1951                          Deprecated. Option is kept for backwards
1952                          compatibility and is ignored
1953  --with-build-number     Deprecated. Option is kept for backwards
1954                          compatibility and is ignored
1955  --with-version-string   Set version string [calculated]
1956  --with-version-pre      Set the base part of the version 'PRE' field
1957                          (pre-release identifier) ['internal']
1958  --with-version-opt      Set version 'OPT' field (build metadata)
1959                          [<timestamp>.<user>.<dirname>]
1960  --with-version-build    Set version 'BUILD' field (build number) [not
1961                          specified]
1962  --with-version-major    Set version 'MAJOR' field (first number) [current
1963                          source value]
1964  --with-version-minor    Set version 'MINOR' field (second number) [current
1965                          source value]
1966  --with-version-security Set version 'SECURITY' field (third number) [current
1967                          source value]
1968  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1969                          specified]
1970  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1971  --with-add-source-root  Deprecated. Option is kept for backwards
1972                          compatibility and is ignored
1973  --with-override-source-root
1974                          Deprecated. Option is kept for backwards
1975                          compatibility and is ignored
1976  --with-adds-and-overrides
1977                          Deprecated. Option is kept for backwards
1978                          compatibility and is ignored
1979  --with-override-langtools
1980                          Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --with-override-corba   Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --with-override-jaxp    Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-override-jaxws   Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-override-hotspot Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-override-nashorn Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-override-jdk     Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-import-hotspot   import hotspot binaries from this jdk image or
1995                          hotspot build dist dir instead of building from
1996                          source
1997  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1998                          to show possible values [platform dependent]
1999  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2000  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2001  --with-extra-ldflags    extra flags to be used when linking jdk
2002  --with-toolchain-version
2003                          the version of the toolchain to look for, use
2004                          '--help' to show possible values [platform
2005                          dependent]
2006  --with-build-devkit     Devkit to use for the build platform toolchain
2007  --with-jtreg            Regression Test Harness [probed]
2008  --with-native-debug-symbols
2009                          set the native debug symbol configuration (none,
2010                          internal, external, zipped) [zipped]
2011  --with-stdc++lib=<static>,<dynamic>,<default>
2012                          force linking of the C++ runtime on Linux to either
2013                          static or dynamic, default is static with dynamic as
2014                          fallback
2015  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2016                          (Windows only) [probed]
2017  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2018                          (Windows only) [probed]
2019  --with-x                use the X Window System
2020  --with-cups             specify prefix directory for the cups package
2021                          (expecting the headers under PATH/include)
2022  --with-cups-include     specify directory for the cups include files
2023  --with-freetype         specify prefix directory for the freetype package
2024                          (expecting the libraries under PATH/lib and the
2025                          headers under PATH/include)
2026  --with-freetype-include specify directory for the freetype include files
2027  --with-freetype-lib     specify directory for the freetype library
2028  --with-freetype-src     specify directory with freetype sources to
2029                          automatically build the library (experimental,
2030                          Windows-only)
2031  --with-alsa             specify prefix directory for the alsa package
2032                          (expecting the libraries under PATH/lib and the
2033                          headers under PATH/include)
2034  --with-alsa-include     specify directory for the alsa include files
2035  --with-alsa-lib         specify directory for the alsa library
2036  --with-libffi           specify prefix directory for the libffi package
2037                          (expecting the libraries under PATH/lib and the
2038                          headers under PATH/include)
2039  --with-libffi-include   specify directory for the libffi include files
2040  --with-libffi-lib       specify directory for the libffi library
2041  --with-libjpeg          use libjpeg from build system or OpenJDK source
2042                          (system, bundled) [bundled]
2043  --with-giflib           use giflib from build system or OpenJDK source
2044                          (system, bundled) [bundled]
2045  --with-libpng           use libpng from build system or OpenJDK source
2046                          (system, bundled) [bundled]
2047  --with-zlib             use zlib from build system or OpenJDK source
2048                          (system, bundled) [bundled]
2049  --with-lcms             use lcms2 from build system or OpenJDK source
2050                          (system, bundled) [bundled]
2051  --with-dxsdk            Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-dxsdk-include    Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-num-cores        number of cores in the build system, e.g.
2058                          --with-num-cores=8 [probed]
2059  --with-memory-size      memory (in MB) available in the build system, e.g.
2060                          --with-memory-size=1024 [probed]
2061  --with-jobs             number of parallel jobs to let make run [calculated
2062                          based on cores and memory]
2063  --with-test-jobs        number of parallel tests jobs to run [based on build
2064                          jobs]
2065  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2066                          invocations of boot JDK, overriding the default
2067                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2068                          -enableassertions"
2069  --with-sjavac-server-java
2070                          use this java binary for running the sjavac
2071                          background server [Boot JDK java]
2072  --with-ccache-dir       where to store ccache files [~/.ccache]
2073
2074Some influential environment variables:
2075  BASENAME    Override default value for BASENAME
2076  BASH        Override default value for BASH
2077  CAT         Override default value for CAT
2078  CHMOD       Override default value for CHMOD
2079  CMP         Override default value for CMP
2080  COMM        Override default value for COMM
2081  CP          Override default value for CP
2082  CUT         Override default value for CUT
2083  DATE        Override default value for DATE
2084  DIFF        Override default value for DIFF
2085  DIRNAME     Override default value for DIRNAME
2086  ECHO        Override default value for ECHO
2087  EXPR        Override default value for EXPR
2088  FILE        Override default value for FILE
2089  FIND        Override default value for FIND
2090  HEAD        Override default value for HEAD
2091  LN          Override default value for LN
2092  LS          Override default value for LS
2093  MKDIR       Override default value for MKDIR
2094  MKTEMP      Override default value for MKTEMP
2095  MV          Override default value for MV
2096  NAWK        Override default value for NAWK
2097  PRINTF      Override default value for PRINTF
2098  RM          Override default value for RM
2099  RMDIR       Override default value for RMDIR
2100  SH          Override default value for SH
2101  SORT        Override default value for SORT
2102  TAIL        Override default value for TAIL
2103  TAR         Override default value for TAR
2104  TEE         Override default value for TEE
2105  TOUCH       Override default value for TOUCH
2106  TR          Override default value for TR
2107  UNAME       Override default value for UNAME
2108  UNIQ        Override default value for UNIQ
2109  WC          Override default value for WC
2110  WHICH       Override default value for WHICH
2111  XARGS       Override default value for XARGS
2112  AWK         Override default value for AWK
2113  GREP        Override default value for GREP
2114  EGREP       Override default value for EGREP
2115  FGREP       Override default value for FGREP
2116  SED         Override default value for SED
2117  CYGPATH     Override default value for CYGPATH
2118  READLINK    Override default value for READLINK
2119  DF          Override default value for DF
2120  CPIO        Override default value for CPIO
2121  NICE        Override default value for NICE
2122  MAKE        Override default value for MAKE
2123  UNZIP       Override default value for UNZIP
2124  ZIP         Override default value for ZIP
2125  LDD         Override default value for LDD
2126  OTOOL       Override default value for OTOOL
2127  READELF     Override default value for READELF
2128  HG          Override default value for HG
2129  STAT        Override default value for STAT
2130  TIME        Override default value for TIME
2131  PATCH       Override default value for PATCH
2132  DSYMUTIL    Override default value for DSYMUTIL
2133  XATTR       Override default value for XATTR
2134  CODESIGN    Override default value for CODESIGN
2135  SETFILE     Override default value for SETFILE
2136  PKG_CONFIG  path to pkg-config utility
2137  JAVA        Override default value for JAVA
2138  JAVAC       Override default value for JAVAC
2139  JAVAH       Override default value for JAVAH
2140  JAR         Override default value for JAR
2141  JARSIGNER   Override default value for JARSIGNER
2142  CC          C compiler command
2143  CFLAGS      C compiler flags
2144  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2145              nonstandard directory <lib dir>
2146  LIBS        libraries to pass to the linker, e.g. -l<library>
2147  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2148              you have headers in a nonstandard directory <include dir>
2149  CXX         C++ compiler command
2150  CXXFLAGS    C++ compiler flags
2151  CPP         C preprocessor
2152  CXXCPP      C++ preprocessor
2153  AS          Override default value for AS
2154  AR          Override default value for AR
2155  LIPO        Override default value for LIPO
2156  STRIP       Override default value for STRIP
2157  NM          Override default value for NM
2158  GNM         Override default value for GNM
2159  OBJCOPY     Override default value for OBJCOPY
2160  OBJDUMP     Override default value for OBJDUMP
2161  BUILD_CC    Override default value for BUILD_CC
2162  BUILD_CXX   Override default value for BUILD_CXX
2163  BUILD_NM    Override default value for BUILD_NM
2164  BUILD_AR    Override default value for BUILD_AR
2165  JTREGEXE    Override default value for JTREGEXE
2166  XMKMF       Path to xmkmf, Makefile generator for X Window System
2167  FREETYPE_CFLAGS
2168              C compiler flags for FREETYPE, overriding pkg-config
2169  FREETYPE_LIBS
2170              linker flags for FREETYPE, overriding pkg-config
2171  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2172  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2173  LIBFFI_CFLAGS
2174              C compiler flags for LIBFFI, overriding pkg-config
2175  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2176  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2177  PNG_LIBS    linker flags for PNG, overriding pkg-config
2178  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2179  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2180  ICECC_CMD   Override default value for ICECC_CMD
2181  ICECC_CREATE_ENV
2182              Override default value for ICECC_CREATE_ENV
2183  ICECC_WRAPPER
2184              Override default value for ICECC_WRAPPER
2185  CCACHE      Override default value for CCACHE
2186
2187Use these variables to override the choices made by `configure' or to help
2188it to find libraries and programs with nonstandard names/locations.
2189
2190Report bugs to <build-dev@openjdk.java.net>.
2191OpenJDK home page: <http://openjdk.java.net>.
2192_ACEOF
2193ac_status=$?
2194fi
2195
2196if test "$ac_init_help" = "recursive"; then
2197  # If there are subdirs, report their specific --help.
2198  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2199    test -d "$ac_dir" ||
2200      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2201      continue
2202    ac_builddir=.
2203
2204case "$ac_dir" in
2205.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2206*)
2207  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2208  # A ".." for each directory in $ac_dir_suffix.
2209  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2210  case $ac_top_builddir_sub in
2211  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2212  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2213  esac ;;
2214esac
2215ac_abs_top_builddir=$ac_pwd
2216ac_abs_builddir=$ac_pwd$ac_dir_suffix
2217# for backward compatibility:
2218ac_top_builddir=$ac_top_build_prefix
2219
2220case $srcdir in
2221  .)  # We are building in place.
2222    ac_srcdir=.
2223    ac_top_srcdir=$ac_top_builddir_sub
2224    ac_abs_top_srcdir=$ac_pwd ;;
2225  [\\/]* | ?:[\\/]* )  # Absolute name.
2226    ac_srcdir=$srcdir$ac_dir_suffix;
2227    ac_top_srcdir=$srcdir
2228    ac_abs_top_srcdir=$srcdir ;;
2229  *) # Relative name.
2230    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2231    ac_top_srcdir=$ac_top_build_prefix$srcdir
2232    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2233esac
2234ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2235
2236    cd "$ac_dir" || { ac_status=$?; continue; }
2237    # Check for guested configure.
2238    if test -f "$ac_srcdir/configure.gnu"; then
2239      echo &&
2240      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2241    elif test -f "$ac_srcdir/configure"; then
2242      echo &&
2243      $SHELL "$ac_srcdir/configure" --help=recursive
2244    else
2245      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2246    fi || ac_status=$?
2247    cd "$ac_pwd" || { ac_status=$?; break; }
2248  done
2249fi
2250
2251test -n "$ac_init_help" && exit $ac_status
2252if $ac_init_version; then
2253  cat <<\_ACEOF
2254OpenJDK configure jdk9
2255generated by GNU Autoconf 2.69
2256
2257Copyright (C) 2012 Free Software Foundation, Inc.
2258This configure script is free software; the Free Software Foundation
2259gives unlimited permission to copy, distribute and modify it.
2260_ACEOF
2261  exit
2262fi
2263
2264## ------------------------ ##
2265## Autoconf initialization. ##
2266## ------------------------ ##
2267
2268# ac_fn_c_try_compile LINENO
2269# --------------------------
2270# Try to compile conftest.$ac_ext, and return whether this succeeded.
2271ac_fn_c_try_compile ()
2272{
2273  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274  rm -f conftest.$ac_objext
2275  if { { ac_try="$ac_compile"
2276case "(($ac_try" in
2277  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2278  *) ac_try_echo=$ac_try;;
2279esac
2280eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2281$as_echo "$ac_try_echo"; } >&5
2282  (eval "$ac_compile") 2>conftest.err
2283  ac_status=$?
2284  if test -s conftest.err; then
2285    grep -v '^ *+' conftest.err >conftest.er1
2286    cat conftest.er1 >&5
2287    mv -f conftest.er1 conftest.err
2288  fi
2289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2290  test $ac_status = 0; } && {
2291	 test -z "$ac_c_werror_flag" ||
2292	 test ! -s conftest.err
2293       } && test -s conftest.$ac_objext; then :
2294  ac_retval=0
2295else
2296  $as_echo "$as_me: failed program was:" >&5
2297sed 's/^/| /' conftest.$ac_ext >&5
2298
2299	ac_retval=1
2300fi
2301  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2302  as_fn_set_status $ac_retval
2303
2304} # ac_fn_c_try_compile
2305
2306# ac_fn_cxx_try_compile LINENO
2307# ----------------------------
2308# Try to compile conftest.$ac_ext, and return whether this succeeded.
2309ac_fn_cxx_try_compile ()
2310{
2311  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312  rm -f conftest.$ac_objext
2313  if { { ac_try="$ac_compile"
2314case "(($ac_try" in
2315  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2316  *) ac_try_echo=$ac_try;;
2317esac
2318eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2319$as_echo "$ac_try_echo"; } >&5
2320  (eval "$ac_compile") 2>conftest.err
2321  ac_status=$?
2322  if test -s conftest.err; then
2323    grep -v '^ *+' conftest.err >conftest.er1
2324    cat conftest.er1 >&5
2325    mv -f conftest.er1 conftest.err
2326  fi
2327  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2328  test $ac_status = 0; } && {
2329	 test -z "$ac_cxx_werror_flag" ||
2330	 test ! -s conftest.err
2331       } && test -s conftest.$ac_objext; then :
2332  ac_retval=0
2333else
2334  $as_echo "$as_me: failed program was:" >&5
2335sed 's/^/| /' conftest.$ac_ext >&5
2336
2337	ac_retval=1
2338fi
2339  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2340  as_fn_set_status $ac_retval
2341
2342} # ac_fn_cxx_try_compile
2343
2344# ac_fn_c_try_cpp LINENO
2345# ----------------------
2346# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2347ac_fn_c_try_cpp ()
2348{
2349  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2350  if { { ac_try="$ac_cpp conftest.$ac_ext"
2351case "(($ac_try" in
2352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353  *) ac_try_echo=$ac_try;;
2354esac
2355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356$as_echo "$ac_try_echo"; } >&5
2357  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2358  ac_status=$?
2359  if test -s conftest.err; then
2360    grep -v '^ *+' conftest.err >conftest.er1
2361    cat conftest.er1 >&5
2362    mv -f conftest.er1 conftest.err
2363  fi
2364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365  test $ac_status = 0; } > conftest.i && {
2366	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2367	 test ! -s conftest.err
2368       }; then :
2369  ac_retval=0
2370else
2371  $as_echo "$as_me: failed program was:" >&5
2372sed 's/^/| /' conftest.$ac_ext >&5
2373
2374    ac_retval=1
2375fi
2376  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2377  as_fn_set_status $ac_retval
2378
2379} # ac_fn_c_try_cpp
2380
2381# ac_fn_cxx_try_cpp LINENO
2382# ------------------------
2383# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2384ac_fn_cxx_try_cpp ()
2385{
2386  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2387  if { { ac_try="$ac_cpp conftest.$ac_ext"
2388case "(($ac_try" in
2389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2390  *) ac_try_echo=$ac_try;;
2391esac
2392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2393$as_echo "$ac_try_echo"; } >&5
2394  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2395  ac_status=$?
2396  if test -s conftest.err; then
2397    grep -v '^ *+' conftest.err >conftest.er1
2398    cat conftest.er1 >&5
2399    mv -f conftest.er1 conftest.err
2400  fi
2401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2402  test $ac_status = 0; } > conftest.i && {
2403	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2404	 test ! -s conftest.err
2405       }; then :
2406  ac_retval=0
2407else
2408  $as_echo "$as_me: failed program was:" >&5
2409sed 's/^/| /' conftest.$ac_ext >&5
2410
2411    ac_retval=1
2412fi
2413  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2414  as_fn_set_status $ac_retval
2415
2416} # ac_fn_cxx_try_cpp
2417
2418# ac_fn_c_try_link LINENO
2419# -----------------------
2420# Try to link conftest.$ac_ext, and return whether this succeeded.
2421ac_fn_c_try_link ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  rm -f conftest.$ac_objext conftest$ac_exeext
2425  if { { ac_try="$ac_link"
2426case "(($ac_try" in
2427  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2428  *) ac_try_echo=$ac_try;;
2429esac
2430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2431$as_echo "$ac_try_echo"; } >&5
2432  (eval "$ac_link") 2>conftest.err
2433  ac_status=$?
2434  if test -s conftest.err; then
2435    grep -v '^ *+' conftest.err >conftest.er1
2436    cat conftest.er1 >&5
2437    mv -f conftest.er1 conftest.err
2438  fi
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; } && {
2441	 test -z "$ac_c_werror_flag" ||
2442	 test ! -s conftest.err
2443       } && test -s conftest$ac_exeext && {
2444	 test "$cross_compiling" = yes ||
2445	 test -x conftest$ac_exeext
2446       }; then :
2447  ac_retval=0
2448else
2449  $as_echo "$as_me: failed program was:" >&5
2450sed 's/^/| /' conftest.$ac_ext >&5
2451
2452	ac_retval=1
2453fi
2454  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2455  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2456  # interfere with the next link command; also delete a directory that is
2457  # left behind by Apple's compiler.  We do this before executing the actions.
2458  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2459  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2460  as_fn_set_status $ac_retval
2461
2462} # ac_fn_c_try_link
2463
2464# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2465# ---------------------------------------------------------
2466# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2467# the include files in INCLUDES and setting the cache variable VAR
2468# accordingly.
2469ac_fn_cxx_check_header_mongrel ()
2470{
2471  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472  if eval \${$3+:} false; then :
2473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2474$as_echo_n "checking for $2... " >&6; }
2475if eval \${$3+:} false; then :
2476  $as_echo_n "(cached) " >&6
2477fi
2478eval ac_res=\$$3
2479	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2480$as_echo "$ac_res" >&6; }
2481else
2482  # Is the header compilable?
2483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2484$as_echo_n "checking $2 usability... " >&6; }
2485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2486/* end confdefs.h.  */
2487$4
2488#include <$2>
2489_ACEOF
2490if ac_fn_cxx_try_compile "$LINENO"; then :
2491  ac_header_compiler=yes
2492else
2493  ac_header_compiler=no
2494fi
2495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2497$as_echo "$ac_header_compiler" >&6; }
2498
2499# Is the header present?
2500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2501$as_echo_n "checking $2 presence... " >&6; }
2502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2503/* end confdefs.h.  */
2504#include <$2>
2505_ACEOF
2506if ac_fn_cxx_try_cpp "$LINENO"; then :
2507  ac_header_preproc=yes
2508else
2509  ac_header_preproc=no
2510fi
2511rm -f conftest.err conftest.i conftest.$ac_ext
2512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2513$as_echo "$ac_header_preproc" >&6; }
2514
2515# So?  What about this header?
2516case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2517  yes:no: )
2518    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2519$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2520    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2521$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2522    ;;
2523  no:yes:* )
2524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2525$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2526    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2527$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2529$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2531$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2532    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2533$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2534( $as_echo "## ----------------------------------------- ##
2535## Report this to build-dev@openjdk.java.net ##
2536## ----------------------------------------- ##"
2537     ) | sed "s/^/$as_me: WARNING:     /" >&2
2538    ;;
2539esac
2540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2541$as_echo_n "checking for $2... " >&6; }
2542if eval \${$3+:} false; then :
2543  $as_echo_n "(cached) " >&6
2544else
2545  eval "$3=\$ac_header_compiler"
2546fi
2547eval ac_res=\$$3
2548	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2549$as_echo "$ac_res" >&6; }
2550fi
2551  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2552
2553} # ac_fn_cxx_check_header_mongrel
2554
2555# ac_fn_cxx_try_run LINENO
2556# ------------------------
2557# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2558# that executables *can* be run.
2559ac_fn_cxx_try_run ()
2560{
2561  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562  if { { ac_try="$ac_link"
2563case "(($ac_try" in
2564  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2565  *) ac_try_echo=$ac_try;;
2566esac
2567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2568$as_echo "$ac_try_echo"; } >&5
2569  (eval "$ac_link") 2>&5
2570  ac_status=$?
2571  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2572  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2573  { { case "(($ac_try" in
2574  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2575  *) ac_try_echo=$ac_try;;
2576esac
2577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2578$as_echo "$ac_try_echo"; } >&5
2579  (eval "$ac_try") 2>&5
2580  ac_status=$?
2581  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2582  test $ac_status = 0; }; }; then :
2583  ac_retval=0
2584else
2585  $as_echo "$as_me: program exited with status $ac_status" >&5
2586       $as_echo "$as_me: failed program was:" >&5
2587sed 's/^/| /' conftest.$ac_ext >&5
2588
2589       ac_retval=$ac_status
2590fi
2591  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2592  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2593  as_fn_set_status $ac_retval
2594
2595} # ac_fn_cxx_try_run
2596
2597# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2598# ---------------------------------------------------------
2599# Tests whether HEADER exists and can be compiled using the include files in
2600# INCLUDES, setting the cache variable VAR accordingly.
2601ac_fn_cxx_check_header_compile ()
2602{
2603  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2605$as_echo_n "checking for $2... " >&6; }
2606if eval \${$3+:} false; then :
2607  $as_echo_n "(cached) " >&6
2608else
2609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610/* end confdefs.h.  */
2611$4
2612#include <$2>
2613_ACEOF
2614if ac_fn_cxx_try_compile "$LINENO"; then :
2615  eval "$3=yes"
2616else
2617  eval "$3=no"
2618fi
2619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2620fi
2621eval ac_res=\$$3
2622	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2623$as_echo "$ac_res" >&6; }
2624  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2625
2626} # ac_fn_cxx_check_header_compile
2627
2628# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2629# ----------------------------------------------
2630# Tries to find the compile-time value of EXPR in a program that includes
2631# INCLUDES, setting VAR accordingly. Returns whether the value could be
2632# computed
2633ac_fn_cxx_compute_int ()
2634{
2635  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2636  if test "$cross_compiling" = yes; then
2637    # Depending upon the size, compute the lo and hi bounds.
2638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2639/* end confdefs.h.  */
2640$4
2641int
2642main ()
2643{
2644static int test_array [1 - 2 * !(($2) >= 0)];
2645test_array [0] = 0;
2646return test_array [0];
2647
2648  ;
2649  return 0;
2650}
2651_ACEOF
2652if ac_fn_cxx_try_compile "$LINENO"; then :
2653  ac_lo=0 ac_mid=0
2654  while :; do
2655    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2656/* end confdefs.h.  */
2657$4
2658int
2659main ()
2660{
2661static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2662test_array [0] = 0;
2663return test_array [0];
2664
2665  ;
2666  return 0;
2667}
2668_ACEOF
2669if ac_fn_cxx_try_compile "$LINENO"; then :
2670  ac_hi=$ac_mid; break
2671else
2672  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2673			if test $ac_lo -le $ac_mid; then
2674			  ac_lo= ac_hi=
2675			  break
2676			fi
2677			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2678fi
2679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680  done
2681else
2682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2683/* end confdefs.h.  */
2684$4
2685int
2686main ()
2687{
2688static int test_array [1 - 2 * !(($2) < 0)];
2689test_array [0] = 0;
2690return test_array [0];
2691
2692  ;
2693  return 0;
2694}
2695_ACEOF
2696if ac_fn_cxx_try_compile "$LINENO"; then :
2697  ac_hi=-1 ac_mid=-1
2698  while :; do
2699    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2700/* end confdefs.h.  */
2701$4
2702int
2703main ()
2704{
2705static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2706test_array [0] = 0;
2707return test_array [0];
2708
2709  ;
2710  return 0;
2711}
2712_ACEOF
2713if ac_fn_cxx_try_compile "$LINENO"; then :
2714  ac_lo=$ac_mid; break
2715else
2716  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2717			if test $ac_mid -le $ac_hi; then
2718			  ac_lo= ac_hi=
2719			  break
2720			fi
2721			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2722fi
2723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2724  done
2725else
2726  ac_lo= ac_hi=
2727fi
2728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2729fi
2730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2731# Binary search between lo and hi bounds.
2732while test "x$ac_lo" != "x$ac_hi"; do
2733  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735/* end confdefs.h.  */
2736$4
2737int
2738main ()
2739{
2740static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2741test_array [0] = 0;
2742return test_array [0];
2743
2744  ;
2745  return 0;
2746}
2747_ACEOF
2748if ac_fn_cxx_try_compile "$LINENO"; then :
2749  ac_hi=$ac_mid
2750else
2751  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2752fi
2753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2754done
2755case $ac_lo in #((
2756?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2757'') ac_retval=1 ;;
2758esac
2759  else
2760    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2761/* end confdefs.h.  */
2762$4
2763static long int longval () { return $2; }
2764static unsigned long int ulongval () { return $2; }
2765#include <stdio.h>
2766#include <stdlib.h>
2767int
2768main ()
2769{
2770
2771  FILE *f = fopen ("conftest.val", "w");
2772  if (! f)
2773    return 1;
2774  if (($2) < 0)
2775    {
2776      long int i = longval ();
2777      if (i != ($2))
2778	return 1;
2779      fprintf (f, "%ld", i);
2780    }
2781  else
2782    {
2783      unsigned long int i = ulongval ();
2784      if (i != ($2))
2785	return 1;
2786      fprintf (f, "%lu", i);
2787    }
2788  /* Do not output a trailing newline, as this causes \r\n confusion
2789     on some platforms.  */
2790  return ferror (f) || fclose (f) != 0;
2791
2792  ;
2793  return 0;
2794}
2795_ACEOF
2796if ac_fn_cxx_try_run "$LINENO"; then :
2797  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2798else
2799  ac_retval=1
2800fi
2801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2802  conftest.$ac_objext conftest.beam conftest.$ac_ext
2803rm -f conftest.val
2804
2805  fi
2806  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2807  as_fn_set_status $ac_retval
2808
2809} # ac_fn_cxx_compute_int
2810
2811# ac_fn_cxx_try_link LINENO
2812# -------------------------
2813# Try to link conftest.$ac_ext, and return whether this succeeded.
2814ac_fn_cxx_try_link ()
2815{
2816  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2817  rm -f conftest.$ac_objext conftest$ac_exeext
2818  if { { ac_try="$ac_link"
2819case "(($ac_try" in
2820  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2821  *) ac_try_echo=$ac_try;;
2822esac
2823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2824$as_echo "$ac_try_echo"; } >&5
2825  (eval "$ac_link") 2>conftest.err
2826  ac_status=$?
2827  if test -s conftest.err; then
2828    grep -v '^ *+' conftest.err >conftest.er1
2829    cat conftest.er1 >&5
2830    mv -f conftest.er1 conftest.err
2831  fi
2832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2833  test $ac_status = 0; } && {
2834	 test -z "$ac_cxx_werror_flag" ||
2835	 test ! -s conftest.err
2836       } && test -s conftest$ac_exeext && {
2837	 test "$cross_compiling" = yes ||
2838	 test -x conftest$ac_exeext
2839       }; then :
2840  ac_retval=0
2841else
2842  $as_echo "$as_me: failed program was:" >&5
2843sed 's/^/| /' conftest.$ac_ext >&5
2844
2845	ac_retval=1
2846fi
2847  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2848  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2849  # interfere with the next link command; also delete a directory that is
2850  # left behind by Apple's compiler.  We do this before executing the actions.
2851  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2852  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2853  as_fn_set_status $ac_retval
2854
2855} # ac_fn_cxx_try_link
2856
2857# ac_fn_cxx_check_func LINENO FUNC VAR
2858# ------------------------------------
2859# Tests whether FUNC exists, setting the cache variable VAR accordingly
2860ac_fn_cxx_check_func ()
2861{
2862  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2864$as_echo_n "checking for $2... " >&6; }
2865if eval \${$3+:} false; then :
2866  $as_echo_n "(cached) " >&6
2867else
2868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h.  */
2870/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2871   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2872#define $2 innocuous_$2
2873
2874/* System header to define __stub macros and hopefully few prototypes,
2875    which can conflict with char $2 (); below.
2876    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2877    <limits.h> exists even on freestanding compilers.  */
2878
2879#ifdef __STDC__
2880# include <limits.h>
2881#else
2882# include <assert.h>
2883#endif
2884
2885#undef $2
2886
2887/* Override any GCC internal prototype to avoid an error.
2888   Use char because int might match the return type of a GCC
2889   builtin and then its argument prototype would still apply.  */
2890#ifdef __cplusplus
2891extern "C"
2892#endif
2893char $2 ();
2894/* The GNU C library defines this for functions which it implements
2895    to always fail with ENOSYS.  Some functions are actually named
2896    something starting with __ and the normal name is an alias.  */
2897#if defined __stub_$2 || defined __stub___$2
2898choke me
2899#endif
2900
2901int
2902main ()
2903{
2904return $2 ();
2905  ;
2906  return 0;
2907}
2908_ACEOF
2909if ac_fn_cxx_try_link "$LINENO"; then :
2910  eval "$3=yes"
2911else
2912  eval "$3=no"
2913fi
2914rm -f core conftest.err conftest.$ac_objext \
2915    conftest$ac_exeext conftest.$ac_ext
2916fi
2917eval ac_res=\$$3
2918	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2919$as_echo "$ac_res" >&6; }
2920  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2921
2922} # ac_fn_cxx_check_func
2923
2924# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2925# -------------------------------------------------------
2926# Tests whether HEADER exists and can be compiled using the include files in
2927# INCLUDES, setting the cache variable VAR accordingly.
2928ac_fn_c_check_header_compile ()
2929{
2930  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2932$as_echo_n "checking for $2... " >&6; }
2933if eval \${$3+:} false; then :
2934  $as_echo_n "(cached) " >&6
2935else
2936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2937/* end confdefs.h.  */
2938$4
2939#include <$2>
2940_ACEOF
2941if ac_fn_c_try_compile "$LINENO"; then :
2942  eval "$3=yes"
2943else
2944  eval "$3=no"
2945fi
2946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2947fi
2948eval ac_res=\$$3
2949	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2950$as_echo "$ac_res" >&6; }
2951  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2952
2953} # ac_fn_c_check_header_compile
2954cat >config.log <<_ACEOF
2955This file contains any messages produced by compilers while
2956running configure, to aid debugging if configure makes a mistake.
2957
2958It was created by OpenJDK $as_me jdk9, which was
2959generated by GNU Autoconf 2.69.  Invocation command line was
2960
2961  $ $0 $@
2962
2963_ACEOF
2964exec 5>>config.log
2965{
2966cat <<_ASUNAME
2967## --------- ##
2968## Platform. ##
2969## --------- ##
2970
2971hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2972uname -m = `(uname -m) 2>/dev/null || echo unknown`
2973uname -r = `(uname -r) 2>/dev/null || echo unknown`
2974uname -s = `(uname -s) 2>/dev/null || echo unknown`
2975uname -v = `(uname -v) 2>/dev/null || echo unknown`
2976
2977/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2978/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2979
2980/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2981/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2982/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2983/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2984/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2985/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2986/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2987
2988_ASUNAME
2989
2990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991for as_dir in $PATH
2992do
2993  IFS=$as_save_IFS
2994  test -z "$as_dir" && as_dir=.
2995    $as_echo "PATH: $as_dir"
2996  done
2997IFS=$as_save_IFS
2998
2999} >&5
3000
3001cat >&5 <<_ACEOF
3002
3003
3004## ----------- ##
3005## Core tests. ##
3006## ----------- ##
3007
3008_ACEOF
3009
3010
3011# Keep a trace of the command line.
3012# Strip out --no-create and --no-recursion so they do not pile up.
3013# Strip out --silent because we don't want to record it for future runs.
3014# Also quote any args containing shell meta-characters.
3015# Make two passes to allow for proper duplicate-argument suppression.
3016ac_configure_args=
3017ac_configure_args0=
3018ac_configure_args1=
3019ac_must_keep_next=false
3020for ac_pass in 1 2
3021do
3022  for ac_arg
3023  do
3024    case $ac_arg in
3025    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3026    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3027    | -silent | --silent | --silen | --sile | --sil)
3028      continue ;;
3029    *\'*)
3030      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3031    esac
3032    case $ac_pass in
3033    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3034    2)
3035      as_fn_append ac_configure_args1 " '$ac_arg'"
3036      if test $ac_must_keep_next = true; then
3037	ac_must_keep_next=false # Got value, back to normal.
3038      else
3039	case $ac_arg in
3040	  *=* | --config-cache | -C | -disable-* | --disable-* \
3041	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3042	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3043	  | -with-* | --with-* | -without-* | --without-* | --x)
3044	    case "$ac_configure_args0 " in
3045	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3046	    esac
3047	    ;;
3048	  -* ) ac_must_keep_next=true ;;
3049	esac
3050      fi
3051      as_fn_append ac_configure_args " '$ac_arg'"
3052      ;;
3053    esac
3054  done
3055done
3056{ ac_configure_args0=; unset ac_configure_args0;}
3057{ ac_configure_args1=; unset ac_configure_args1;}
3058
3059# When interrupted or exit'd, cleanup temporary files, and complete
3060# config.log.  We remove comments because anyway the quotes in there
3061# would cause problems or look ugly.
3062# WARNING: Use '\'' to represent an apostrophe within the trap.
3063# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3064trap 'exit_status=$?
3065  # Save into config.log some information that might help in debugging.
3066  {
3067    echo
3068
3069    $as_echo "## ---------------- ##
3070## Cache variables. ##
3071## ---------------- ##"
3072    echo
3073    # The following way of writing the cache mishandles newlines in values,
3074(
3075  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3076    eval ac_val=\$$ac_var
3077    case $ac_val in #(
3078    *${as_nl}*)
3079      case $ac_var in #(
3080      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3081$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3082      esac
3083      case $ac_var in #(
3084      _ | IFS | as_nl) ;; #(
3085      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3086      *) { eval $ac_var=; unset $ac_var;} ;;
3087      esac ;;
3088    esac
3089  done
3090  (set) 2>&1 |
3091    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3092    *${as_nl}ac_space=\ *)
3093      sed -n \
3094	"s/'\''/'\''\\\\'\'''\''/g;
3095	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3096      ;; #(
3097    *)
3098      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3099      ;;
3100    esac |
3101    sort
3102)
3103    echo
3104
3105    $as_echo "## ----------------- ##
3106## Output variables. ##
3107## ----------------- ##"
3108    echo
3109    for ac_var in $ac_subst_vars
3110    do
3111      eval ac_val=\$$ac_var
3112      case $ac_val in
3113      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3114      esac
3115      $as_echo "$ac_var='\''$ac_val'\''"
3116    done | sort
3117    echo
3118
3119    if test -n "$ac_subst_files"; then
3120      $as_echo "## ------------------- ##
3121## File substitutions. ##
3122## ------------------- ##"
3123      echo
3124      for ac_var in $ac_subst_files
3125      do
3126	eval ac_val=\$$ac_var
3127	case $ac_val in
3128	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3129	esac
3130	$as_echo "$ac_var='\''$ac_val'\''"
3131      done | sort
3132      echo
3133    fi
3134
3135    if test -s confdefs.h; then
3136      $as_echo "## ----------- ##
3137## confdefs.h. ##
3138## ----------- ##"
3139      echo
3140      cat confdefs.h
3141      echo
3142    fi
3143    test "$ac_signal" != 0 &&
3144      $as_echo "$as_me: caught signal $ac_signal"
3145    $as_echo "$as_me: exit $exit_status"
3146  } >&5
3147  rm -f core *.core core.conftest.* &&
3148    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3149    exit $exit_status
3150' 0
3151for ac_signal in 1 2 13 15; do
3152  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3153done
3154ac_signal=0
3155
3156# confdefs.h avoids OS command line length limits that DEFS can exceed.
3157rm -f -r conftest* confdefs.h
3158
3159$as_echo "/* confdefs.h */" > confdefs.h
3160
3161# Predefined preprocessor variables.
3162
3163cat >>confdefs.h <<_ACEOF
3164#define PACKAGE_NAME "$PACKAGE_NAME"
3165_ACEOF
3166
3167cat >>confdefs.h <<_ACEOF
3168#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3169_ACEOF
3170
3171cat >>confdefs.h <<_ACEOF
3172#define PACKAGE_VERSION "$PACKAGE_VERSION"
3173_ACEOF
3174
3175cat >>confdefs.h <<_ACEOF
3176#define PACKAGE_STRING "$PACKAGE_STRING"
3177_ACEOF
3178
3179cat >>confdefs.h <<_ACEOF
3180#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3181_ACEOF
3182
3183cat >>confdefs.h <<_ACEOF
3184#define PACKAGE_URL "$PACKAGE_URL"
3185_ACEOF
3186
3187
3188# Let the site file select an alternate cache file if it wants to.
3189# Prefer an explicitly selected file to automatically selected ones.
3190ac_site_file1=NONE
3191ac_site_file2=NONE
3192if test -n "$CONFIG_SITE"; then
3193  # We do not want a PATH search for config.site.
3194  case $CONFIG_SITE in #((
3195    -*)  ac_site_file1=./$CONFIG_SITE;;
3196    */*) ac_site_file1=$CONFIG_SITE;;
3197    *)   ac_site_file1=./$CONFIG_SITE;;
3198  esac
3199elif test "x$prefix" != xNONE; then
3200  ac_site_file1=$prefix/share/config.site
3201  ac_site_file2=$prefix/etc/config.site
3202else
3203  ac_site_file1=$ac_default_prefix/share/config.site
3204  ac_site_file2=$ac_default_prefix/etc/config.site
3205fi
3206for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3207do
3208  test "x$ac_site_file" = xNONE && continue
3209  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3210    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3211$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3212    sed 's/^/| /' "$ac_site_file" >&5
3213    . "$ac_site_file" \
3214      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3216as_fn_error $? "failed to load site script $ac_site_file
3217See \`config.log' for more details" "$LINENO" 5; }
3218  fi
3219done
3220
3221if test -r "$cache_file"; then
3222  # Some versions of bash will fail to source /dev/null (special files
3223  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3224  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3225    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3226$as_echo "$as_me: loading cache $cache_file" >&6;}
3227    case $cache_file in
3228      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3229      *)                      . "./$cache_file";;
3230    esac
3231  fi
3232else
3233  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3234$as_echo "$as_me: creating cache $cache_file" >&6;}
3235  >$cache_file
3236fi
3237
3238# Check that the precious variables saved in the cache have kept the same
3239# value.
3240ac_cache_corrupted=false
3241for ac_var in $ac_precious_vars; do
3242  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3243  eval ac_new_set=\$ac_env_${ac_var}_set
3244  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3245  eval ac_new_val=\$ac_env_${ac_var}_value
3246  case $ac_old_set,$ac_new_set in
3247    set,)
3248      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3249$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3250      ac_cache_corrupted=: ;;
3251    ,set)
3252      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3253$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3254      ac_cache_corrupted=: ;;
3255    ,);;
3256    *)
3257      if test "x$ac_old_val" != "x$ac_new_val"; then
3258	# differences in whitespace do not lead to failure.
3259	ac_old_val_w=`echo x $ac_old_val`
3260	ac_new_val_w=`echo x $ac_new_val`
3261	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3262	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3263$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3264	  ac_cache_corrupted=:
3265	else
3266	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3267$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3268	  eval $ac_var=\$ac_old_val
3269	fi
3270	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3271$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3272	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3273$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3274      fi;;
3275  esac
3276  # Pass precious variables to config.status.
3277  if test "$ac_new_set" = set; then
3278    case $ac_new_val in
3279    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3280    *) ac_arg=$ac_var=$ac_new_val ;;
3281    esac
3282    case " $ac_configure_args " in
3283      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3284      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3285    esac
3286  fi
3287done
3288if $ac_cache_corrupted; then
3289  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3291  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3292$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3293  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3294fi
3295## -------------------- ##
3296## Main body of script. ##
3297## -------------------- ##
3298
3299ac_ext=c
3300ac_cpp='$CPP $CPPFLAGS'
3301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3303ac_compiler_gnu=$ac_cv_c_compiler_gnu
3304
3305
3306
3307ac_aux_dir=
3308for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3309  if test -f "$ac_dir/install-sh"; then
3310    ac_aux_dir=$ac_dir
3311    ac_install_sh="$ac_aux_dir/install-sh -c"
3312    break
3313  elif test -f "$ac_dir/install.sh"; then
3314    ac_aux_dir=$ac_dir
3315    ac_install_sh="$ac_aux_dir/install.sh -c"
3316    break
3317  elif test -f "$ac_dir/shtool"; then
3318    ac_aux_dir=$ac_dir
3319    ac_install_sh="$ac_aux_dir/shtool install -c"
3320    break
3321  fi
3322done
3323if test -z "$ac_aux_dir"; then
3324  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
3325fi
3326
3327# These three variables are undocumented and unsupported,
3328# and are intended to be withdrawn in a future Autoconf release.
3329# They can cause serious problems if a builder's source tree is in a directory
3330# whose full name contains unusual characters.
3331ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3332ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3333ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3334
3335
3336# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3337
3338#
3339# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3340# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3341#
3342# This code is free software; you can redistribute it and/or modify it
3343# under the terms of the GNU General Public License version 2 only, as
3344# published by the Free Software Foundation.  Oracle designates this
3345# particular file as subject to the "Classpath" exception as provided
3346# by Oracle in the LICENSE file that accompanied this code.
3347#
3348# This code is distributed in the hope that it will be useful, but WITHOUT
3349# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3350# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3351# version 2 for more details (a copy is included in the LICENSE file that
3352# accompanied this code).
3353#
3354# You should have received a copy of the GNU General Public License version
3355# 2 along with this work; if not, write to the Free Software Foundation,
3356# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3357#
3358# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3359# or visit www.oracle.com if you need additional information or have any
3360# questions.
3361#
3362
3363#
3364# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3365#
3366# This program is free software; you can redistribute it and/or modify
3367# it under the terms of the GNU General Public License as published by
3368# the Free Software Foundation; either version 2 of the License, or
3369# (at your option) any later version.
3370#
3371# This program is distributed in the hope that it will be useful, but
3372# WITHOUT ANY WARRANTY; without even the implied warranty of
3373# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3374# General Public License for more details.
3375#
3376# You should have received a copy of the GNU General Public License
3377# along with this program; if not, write to the Free Software
3378# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3379#
3380# As a special exception to the GNU General Public License, if you
3381# distribute this file as part of a program that contains a
3382# configuration script generated by Autoconf, you may include it under
3383# the same distribution terms that you use for the rest of that program.
3384
3385# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3386# ----------------------------------
3387# PKG_PROG_PKG_CONFIG
3388
3389# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3390#
3391# Check to see whether a particular set of modules exists.  Similar
3392# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3393#
3394#
3395# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3396# this or PKG_CHECK_MODULES is called, or make sure to call
3397# PKG_CHECK_EXISTS manually
3398# --------------------------------------------------------------
3399
3400
3401
3402# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3403# ---------------------------------------------
3404# _PKG_CONFIG
3405
3406# _PKG_SHORT_ERRORS_SUPPORTED
3407# -----------------------------
3408# _PKG_SHORT_ERRORS_SUPPORTED
3409
3410
3411# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3412# [ACTION-IF-NOT-FOUND])
3413#
3414#
3415# Note that if there is a possibility the first call to
3416# PKG_CHECK_MODULES might not happen, you should be sure to include an
3417# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3418#
3419#
3420# --------------------------------------------------------------
3421# PKG_CHECK_MODULES
3422
3423
3424# Include these first...
3425#
3426# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3427# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3428#
3429# This code is free software; you can redistribute it and/or modify it
3430# under the terms of the GNU General Public License version 2 only, as
3431# published by the Free Software Foundation.  Oracle designates this
3432# particular file as subject to the "Classpath" exception as provided
3433# by Oracle in the LICENSE file that accompanied this code.
3434#
3435# This code is distributed in the hope that it will be useful, but WITHOUT
3436# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3437# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3438# version 2 for more details (a copy is included in the LICENSE file that
3439# accompanied this code).
3440#
3441# You should have received a copy of the GNU General Public License version
3442# 2 along with this work; if not, write to the Free Software Foundation,
3443# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3444#
3445# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3446# or visit www.oracle.com if you need additional information or have any
3447# questions.
3448#
3449
3450# Create a function/macro that takes a series of named arguments. The call is
3451# similar to AC_DEFUN, but the setup of the function looks like this:
3452# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3453# ... do something
3454#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3455# ])
3456# A star (*) in front of a named argument means that it is required and it's
3457# presence will be verified. To pass e.g. the first value as a normal indexed
3458# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3459# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3460# "ARG_FOO".
3461#
3462# The generated function can be called like this:
3463# MYFUNC(FOO: [foo-val], BAR:
3464#     [
3465#         $ECHO hello world
3466#     ])
3467#
3468#
3469# Argument 1: Name of the function to define
3470# Argument 2: List of legal named arguments, with a * prefix for required arguments
3471# Argument 3: Argument array to treat as named, typically $@
3472# Argument 4: The main function body
3473
3474
3475# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3476# If so, then append $1 to $2 \
3477# Also set JVM_ARG_OK to true/false depending on outcome.
3478
3479
3480# Appends a string to a path variable, only adding the : when needed.
3481
3482
3483# Prepends a string to a path variable, only adding the : when needed.
3484
3485
3486# This will make sure the given variable points to a full and proper
3487# path. This means:
3488# 1) There will be no spaces in the path. On unix platforms,
3489#    spaces in the path will result in an error. On Windows,
3490#    the path will be rewritten using short-style to be space-free.
3491# 2) The path will be absolute, and it will be in unix-style (on
3492#     cygwin).
3493# $1: The name of the variable to fix
3494
3495
3496# This will make sure the given variable points to a executable
3497# with a full and proper path. This means:
3498# 1) There will be no spaces in the path. On unix platforms,
3499#    spaces in the path will result in an error. On Windows,
3500#    the path will be rewritten using short-style to be space-free.
3501# 2) The path will be absolute, and it will be in unix-style (on
3502#     cygwin).
3503# Any arguments given to the executable is preserved.
3504# If the input variable does not have a directory specification, then
3505# it need to be in the PATH.
3506# $1: The name of the variable to fix
3507
3508
3509
3510
3511# Register a --with argument but mark it as deprecated
3512# $1: The name of the with argument to deprecate, not including --with-
3513
3514
3515# Register a --enable argument but mark it as deprecated
3516# $1: The name of the with argument to deprecate, not including --enable-
3517# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3518# $3: Messages to user.
3519
3520
3521
3522
3523# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3524# $1: variable to check
3525
3526
3527# Check that there are no unprocessed overridden variables left.
3528# If so, they are an incorrect argument and we will exit with an error.
3529
3530
3531# Setup a tool for the given variable. If correctly specified by the user,
3532# use that value, otherwise search for the tool using the supplied code snippet.
3533# $1: variable to set
3534# $2: code snippet to call to look for the tool
3535# $3: code snippet to call if variable was used to find tool
3536
3537
3538# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3539# $1: variable to set
3540# $2: executable name (or list of names) to look for
3541
3542
3543# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3544# $1: variable to set
3545# $2: executable name (or list of names) to look for
3546
3547
3548# Like BASIC_PATH_PROGS but fails if no tool was found.
3549# $1: variable to set
3550# $2: executable name (or list of names) to look for
3551
3552
3553# Like BASIC_SETUP_TOOL but fails if no tool was found.
3554# $1: variable to set
3555# $2: autoconf macro to call to look for the special tool
3556
3557
3558# Setup the most fundamental tools that relies on not much else to set up,
3559# but is used by much of the early bootstrap code.
3560
3561
3562# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3563
3564
3565# Evaluates platform specific overrides for devkit variables.
3566# $1: Name of variable
3567
3568
3569
3570
3571
3572
3573#%%% Simple tools %%%
3574
3575# Check if we have found a usable version of make
3576# $1: the path to a potential make binary (or empty)
3577# $2: the description on how we found this
3578
3579
3580
3581
3582# Goes looking for a usable version of GNU make.
3583
3584
3585
3586
3587
3588
3589# Check if build directory is on local disk. If not possible to determine,
3590# we prefer to claim it's local.
3591# Argument 1: directory to test
3592# Argument 2: what to do if it is on local disk
3593# Argument 3: what to do otherwise (remote disk or failure)
3594
3595
3596# Check that source files have basic read permissions set. This might
3597# not be the case in cygwin in certain conditions.
3598
3599
3600
3601
3602# Check for support for specific options in bash
3603
3604
3605################################################################################
3606#
3607# Default make target
3608#
3609
3610
3611# Code to run after AC_OUTPUT
3612
3613
3614#
3615# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3616# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3617#
3618# This code is free software; you can redistribute it and/or modify it
3619# under the terms of the GNU General Public License version 2 only, as
3620# published by the Free Software Foundation.  Oracle designates this
3621# particular file as subject to the "Classpath" exception as provided
3622# by Oracle in the LICENSE file that accompanied this code.
3623#
3624# This code is distributed in the hope that it will be useful, but WITHOUT
3625# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3626# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3627# version 2 for more details (a copy is included in the LICENSE file that
3628# accompanied this code).
3629#
3630# You should have received a copy of the GNU General Public License version
3631# 2 along with this work; if not, write to the Free Software Foundation,
3632# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3633#
3634# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3635# or visit www.oracle.com if you need additional information or have any
3636# questions.
3637#
3638
3639
3640
3641
3642
3643# Helper function which possibly converts a path using DOS-style short mode.
3644# If so, the updated path is stored in $new_path.
3645# $1: The path to check
3646
3647
3648# Helper function which possibly converts a path using DOS-style short mode.
3649# If so, the updated path is stored in $new_path.
3650# $1: The path to check
3651
3652
3653# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3654# and could probably be heavily simplified. However, all changes in this
3655# area tend to need lot of testing in different scenarios, and in lack of
3656# proper unit testing, cleaning this up has not been deemed worth the effort
3657# at the moment.
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3668
3669
3670
3671
3672# ... then the rest
3673#
3674# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3675# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3676#
3677# This code is free software; you can redistribute it and/or modify it
3678# under the terms of the GNU General Public License version 2 only, as
3679# published by the Free Software Foundation.  Oracle designates this
3680# particular file as subject to the "Classpath" exception as provided
3681# by Oracle in the LICENSE file that accompanied this code.
3682#
3683# This code is distributed in the hope that it will be useful, but WITHOUT
3684# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3685# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3686# version 2 for more details (a copy is included in the LICENSE file that
3687# accompanied this code).
3688#
3689# You should have received a copy of the GNU General Public License version
3690# 2 along with this work; if not, write to the Free Software Foundation,
3691# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3692#
3693# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3694# or visit www.oracle.com if you need additional information or have any
3695# questions.
3696#
3697
3698########################################################################
3699# This file handles detection of the Boot JDK. The Boot JDK detection
3700# process has been developed as a response to solve a complex real-world
3701# problem. Initially, it was simple, but it has grown as platform after
3702# platform, idiosyncracy after idiosyncracy has been supported.
3703#
3704# The basic idea is this:
3705# 1) You need an acceptable *) JDK to use as a Boot JDK
3706# 2) There are several ways to locate a JDK, that are mostly platform
3707#    dependent **)
3708# 3) You can have multiple JDKs installed
3709# 4) If possible, configure should try to dig out an acceptable JDK
3710#    automatically, without having to resort to command-line options
3711#
3712# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3713#     javac) and not a JRE, etc.
3714#
3715# **) On Windows we typically use a well-known path.
3716#     On MacOSX we typically use the tool java_home.
3717#     On Linux we typically find javac in the $PATH, and then follow a
3718#     chain of symlinks that often ends up in a real JDK.
3719#
3720# This leads to the code where we check in different ways to locate a
3721# JDK, and if one is found, check if it is acceptable. If not, we print
3722# our reasons for rejecting it (useful when debugging non-working
3723# configure situations) and continue checking the next one.
3724########################################################################
3725
3726# Execute the check given as argument, and verify the result
3727# If the Boot JDK was previously found, do nothing
3728# $1 A command line (typically autoconf macro) to execute
3729
3730
3731# Test: Is bootjdk explicitely set by command line arguments?
3732
3733
3734# Test: Is $JAVA_HOME set?
3735
3736
3737# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3738
3739
3740# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3741# $1: Argument to the java_home binary (optional)
3742
3743
3744# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3745
3746
3747# Look for a jdk in the given path. If there are multiple, try to select the newest.
3748# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3749# $1 = Path to directory containing jdk installations.
3750# $2 = String to append to the found JDK directory to get the proper JDK home
3751
3752
3753# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3754# environmental variable as base for where to look.
3755# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3756
3757
3758# Test: Is there a JDK installed in default, well-known locations?
3759
3760
3761# Check that a command-line tool in the Boot JDK is correct
3762# $1 = name of variable to assign
3763# $2 = name of binary
3764
3765
3766###############################################################################
3767#
3768# We need a Boot JDK to bootstrap the build.
3769#
3770
3771
3772
3773
3774
3775#
3776# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3778#
3779# This code is free software; you can redistribute it and/or modify it
3780# under the terms of the GNU General Public License version 2 only, as
3781# published by the Free Software Foundation.  Oracle designates this
3782# particular file as subject to the "Classpath" exception as provided
3783# by Oracle in the LICENSE file that accompanied this code.
3784#
3785# This code is distributed in the hope that it will be useful, but WITHOUT
3786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3788# version 2 for more details (a copy is included in the LICENSE file that
3789# accompanied this code).
3790#
3791# You should have received a copy of the GNU General Public License version
3792# 2 along with this work; if not, write to the Free Software Foundation,
3793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3794#
3795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3796# or visit www.oracle.com if you need additional information or have any
3797# questions.
3798#
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816################################################################################
3817#
3818# Runs icecc-create-env once and prints the error if it fails
3819#
3820# $1: arguments to icecc-create-env
3821# $2: log file
3822#
3823
3824
3825################################################################################
3826#
3827# Optionally enable distributed compilation of native code using icecc/icecream
3828#
3829
3830
3831
3832
3833
3834
3835
3836#
3837# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3838# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3839#
3840# This code is free software; you can redistribute it and/or modify it
3841# under the terms of the GNU General Public License version 2 only, as
3842# published by the Free Software Foundation.  Oracle designates this
3843# particular file as subject to the "Classpath" exception as provided
3844# by Oracle in the LICENSE file that accompanied this code.
3845#
3846# This code is distributed in the hope that it will be useful, but WITHOUT
3847# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3848# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3849# version 2 for more details (a copy is included in the LICENSE file that
3850# accompanied this code).
3851#
3852# You should have received a copy of the GNU General Public License version
3853# 2 along with this work; if not, write to the Free Software Foundation,
3854# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3855#
3856# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3857# or visit www.oracle.com if you need additional information or have any
3858# questions.
3859#
3860
3861# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3862# corresponding configure arguments instead
3863
3864
3865# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3866# that configure can use them while detecting compilers.
3867# TOOLCHAIN_TYPE is available here.
3868# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3869
3870
3871
3872
3873
3874
3875# Documentation on common flags used for solstudio in HIGHEST.
3876#
3877# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3878#          done with care, there are some assumptions below that need to
3879#          be understood about the use of pointers, and IEEE behavior.
3880#
3881# -fns: Use non-standard floating point mode (not IEEE 754)
3882# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3883# -fsingle: Use single precision floating point with 'float'
3884# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3885#   (Source with excessing pointer casting and data access with mixed
3886#    pointer types are not recommended)
3887# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3888#   (If you expect perfect errno behavior, do not use this)
3889# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3890# -xrestrict: Pointer parameters to functions do not overlap
3891#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3892#    If you pass in multiple pointers to the same data, do not use this)
3893# -xlibmil: Inline some library routines
3894#   (If you expect perfect errno behavior, do not use this)
3895# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3896#   (If you expect perfect errno behavior, do not use this)
3897#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3898
3899    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3900    # Bug?
3901    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3902    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3903    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3904    #fi
3905
3906
3907
3908
3909
3910# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3911#                                   IF_FALSE: [RUN-IF-FALSE])
3912# ------------------------------------------------------------
3913# Check that the c and c++ compilers support an argument
3914
3915
3916
3917
3918# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3919#                                   IF_FALSE: [RUN-IF-FALSE])
3920# ------------------------------------------------------------
3921# Check that the linker support an argument
3922
3923
3924
3925
3926
3927
3928#
3929# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3930# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3931#
3932# This code is free software; you can redistribute it and/or modify it
3933# under the terms of the GNU General Public License version 2 only, as
3934# published by the Free Software Foundation.  Oracle designates this
3935# particular file as subject to the "Classpath" exception as provided
3936# by Oracle in the LICENSE file that accompanied this code.
3937#
3938# This code is distributed in the hope that it will be useful, but WITHOUT
3939# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3940# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3941# version 2 for more details (a copy is included in the LICENSE file that
3942# accompanied this code).
3943#
3944# You should have received a copy of the GNU General Public License version
3945# 2 along with this work; if not, write to the Free Software Foundation,
3946# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3947#
3948# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3949# or visit www.oracle.com if you need additional information or have any
3950# questions.
3951#
3952
3953
3954
3955
3956
3957cygwin_help() {
3958  case $1 in
3959    unzip)
3960      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3961      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3962      ;;
3963    zip)
3964      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3965      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3966      ;;
3967    make)
3968      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3970      ;;
3971    freetype)
3972      HELP_MSG="
3973The freetype library can now be build during the configure process.
3974Download the freetype sources and unpack them into an arbitrary directory:
3975
3976wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3977tar -xzf freetype-2.5.3.tar.gz
3978
3979Then run configure with '--with-freetype-src=<freetype_src>'. This will
3980automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3981builds or into '<freetype_src>/lib32' for 32-bit builds.
3982Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3983and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3984
3985Alternatively you can unpack the sources like this to use the default directory:
3986
3987tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3988      ;;
3989  esac
3990}
3991
3992msys_help() {
3993  PKGHANDLER_COMMAND=""
3994}
3995
3996apt_help() {
3997  case $1 in
3998    reduced)
3999      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4000    devkit)
4001      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4002    openjdk)
4003      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4004    alsa)
4005      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4006    cups)
4007      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4008    freetype)
4009      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4010    ffi)
4011      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4012    x11)
4013      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4014    ccache)
4015      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4016  esac
4017}
4018
4019yum_help() {
4020  case $1 in
4021    devkit)
4022      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4023    openjdk)
4024      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4025    alsa)
4026      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4027    cups)
4028      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4029    freetype)
4030      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4031    x11)
4032      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4033    ccache)
4034      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4035  esac
4036}
4037
4038port_help() {
4039  PKGHANDLER_COMMAND=""
4040}
4041
4042pkgutil_help() {
4043  PKGHANDLER_COMMAND=""
4044}
4045
4046pkgadd_help() {
4047  PKGHANDLER_COMMAND=""
4048}
4049
4050# This function will check if we're called from the "configure" wrapper while
4051# printing --help. If so, we will print out additional information that can
4052# only be extracted within the autoconf script, and then exit. This must be
4053# called at the very beginning in configure.ac.
4054
4055
4056
4057
4058
4059
4060#
4061# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4062# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4063#
4064# This code is free software; you can redistribute it and/or modify it
4065# under the terms of the GNU General Public License version 2 only, as
4066# published by the Free Software Foundation.  Oracle designates this
4067# particular file as subject to the "Classpath" exception as provided
4068# by Oracle in the LICENSE file that accompanied this code.
4069#
4070# This code is distributed in the hope that it will be useful, but WITHOUT
4071# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4072# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4073# version 2 for more details (a copy is included in the LICENSE file that
4074# accompanied this code).
4075#
4076# You should have received a copy of the GNU General Public License version
4077# 2 along with this work; if not, write to the Free Software Foundation,
4078# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4079#
4080# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4081# or visit www.oracle.com if you need additional information or have any
4082# questions.
4083#
4084
4085###############################################################################
4086# Check which interpreter of the JVM we want to build.
4087# Currently we have:
4088#    template: Template interpreter (the default)
4089#    cpp     : C++ interpreter
4090
4091
4092###############################################################################
4093# Check which variants of the JVM that we want to build.
4094# Currently we have:
4095#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4096#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4097#    minimal1: reduced form of client with optional VM services and features stripped out
4098#    zero: no machine code interpreter, no compiler
4099#    zeroshark: zero interpreter and shark/llvm compiler backend
4100#    core: interpreter only, no compiler (only works on some platforms)
4101
4102
4103
4104###############################################################################
4105# Setup legacy vars/targets and new vars to deal with different debug levels.
4106#
4107#    release: no debug information, all optimizations, no asserts.
4108#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4109#    fastdebug: debug information (-g), all optimizations, all asserts
4110#    slowdebug: debug information (-g), no optimizations, all asserts
4111#
4112
4113
4114
4115
4116
4117
4118#
4119# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4120# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4121#
4122# This code is free software; you can redistribute it and/or modify it
4123# under the terms of the GNU General Public License version 2 only, as
4124# published by the Free Software Foundation.  Oracle designates this
4125# particular file as subject to the "Classpath" exception as provided
4126# by Oracle in the LICENSE file that accompanied this code.
4127#
4128# This code is distributed in the hope that it will be useful, but WITHOUT
4129# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4130# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4131# version 2 for more details (a copy is included in the LICENSE file that
4132# accompanied this code).
4133#
4134# You should have received a copy of the GNU General Public License version
4135# 2 along with this work; if not, write to the Free Software Foundation,
4136# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4137#
4138# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4139# or visit www.oracle.com if you need additional information or have any
4140# questions.
4141#
4142
4143###############################################################################
4144# Check which variant of the JDK that we want to build.
4145# Currently we have:
4146#    normal:   standard edition
4147# but the custom make system may add other variants
4148#
4149# Effectively the JDK variant gives a name to a specific set of
4150# modules to compile into the JDK.
4151
4152
4153###############################################################################
4154# Set the debug level
4155#    release: no debug information, all optimizations, no asserts.
4156#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4157#    fastdebug: debug information (-g), all optimizations, all asserts
4158#    slowdebug: debug information (-g), no optimizations, all asserts
4159
4160
4161###############################################################################
4162#
4163# Should we build only OpenJDK even if closed sources are present?
4164#
4165
4166
4167
4168
4169###############################################################################
4170#
4171# Enable or disable the elliptic curve crypto implementation
4172#
4173
4174
4175
4176
4177################################################################################
4178#
4179# Gcov coverage data for hotspot
4180#
4181
4182
4183################################################################################
4184#
4185# Static build support.  When enabled will generate static
4186# libraries instead of shared libraries for all JDK libs.
4187#
4188
4189
4190#
4191# Copyright (c) 2015, 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# Setup version numbers
4218#
4219
4220# Verify that a given string represents a valid version number, and assign it
4221# to a variable.
4222
4223# Argument 1: the variable to assign to
4224# Argument 2: the value given by the user
4225
4226
4227
4228
4229#
4230# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4231# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232#
4233# This code is free software; you can redistribute it and/or modify it
4234# under the terms of the GNU General Public License version 2 only, as
4235# published by the Free Software Foundation.  Oracle designates this
4236# particular file as subject to the "Classpath" exception as provided
4237# by Oracle in the LICENSE file that accompanied this code.
4238#
4239# This code is distributed in the hope that it will be useful, but WITHOUT
4240# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4242# version 2 for more details (a copy is included in the LICENSE file that
4243# accompanied this code).
4244#
4245# You should have received a copy of the GNU General Public License version
4246# 2 along with this work; if not, write to the Free Software Foundation,
4247# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248#
4249# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250# or visit www.oracle.com if you need additional information or have any
4251# questions.
4252#
4253
4254# Major library component reside in separate files.
4255#
4256# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4257# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4258#
4259# This code is free software; you can redistribute it and/or modify it
4260# under the terms of the GNU General Public License version 2 only, as
4261# published by the Free Software Foundation.  Oracle designates this
4262# particular file as subject to the "Classpath" exception as provided
4263# by Oracle in the LICENSE file that accompanied this code.
4264#
4265# This code is distributed in the hope that it will be useful, but WITHOUT
4266# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4267# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4268# version 2 for more details (a copy is included in the LICENSE file that
4269# accompanied this code).
4270#
4271# You should have received a copy of the GNU General Public License version
4272# 2 along with this work; if not, write to the Free Software Foundation,
4273# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4274#
4275# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4276# or visit www.oracle.com if you need additional information or have any
4277# questions.
4278#
4279
4280################################################################################
4281# Setup alsa (Advanced Linux Sound Architecture)
4282################################################################################
4283
4284
4285#
4286# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4287# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4288#
4289# This code is free software; you can redistribute it and/or modify it
4290# under the terms of the GNU General Public License version 2 only, as
4291# published by the Free Software Foundation.  Oracle designates this
4292# particular file as subject to the "Classpath" exception as provided
4293# by Oracle in the LICENSE file that accompanied this code.
4294#
4295# This code is distributed in the hope that it will be useful, but WITHOUT
4296# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4297# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4298# version 2 for more details (a copy is included in the LICENSE file that
4299# accompanied this code).
4300#
4301# You should have received a copy of the GNU General Public License version
4302# 2 along with this work; if not, write to the Free Software Foundation,
4303# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4304#
4305# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4306# or visit www.oracle.com if you need additional information or have any
4307# questions.
4308#
4309
4310################################################################################
4311# Setup bundled libraries.
4312#
4313# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4314# OpenJDK repository. Default is to use these libraries as bundled, but they
4315# might be replaced by en external version by the user.
4316################################################################################
4317
4318
4319################################################################################
4320# Setup libjpeg
4321################################################################################
4322
4323
4324################################################################################
4325# Setup giflib
4326################################################################################
4327
4328
4329################################################################################
4330# Setup libpng
4331################################################################################
4332
4333
4334################################################################################
4335# Setup zlib
4336################################################################################
4337
4338
4339################################################################################
4340# Setup lcms (Little CMS)
4341################################################################################
4342
4343
4344#
4345# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4346# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4347#
4348# This code is free software; you can redistribute it and/or modify it
4349# under the terms of the GNU General Public License version 2 only, as
4350# published by the Free Software Foundation.  Oracle designates this
4351# particular file as subject to the "Classpath" exception as provided
4352# by Oracle in the LICENSE file that accompanied this code.
4353#
4354# This code is distributed in the hope that it will be useful, but WITHOUT
4355# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4356# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4357# version 2 for more details (a copy is included in the LICENSE file that
4358# accompanied this code).
4359#
4360# You should have received a copy of the GNU General Public License version
4361# 2 along with this work; if not, write to the Free Software Foundation,
4362# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4363#
4364# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4365# or visit www.oracle.com if you need additional information or have any
4366# questions.
4367#
4368
4369################################################################################
4370# Setup cups (Common Unix Printing System)
4371################################################################################
4372
4373
4374#
4375# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4376# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4377#
4378# This code is free software; you can redistribute it and/or modify it
4379# under the terms of the GNU General Public License version 2 only, as
4380# published by the Free Software Foundation.  Oracle designates this
4381# particular file as subject to the "Classpath" exception as provided
4382# by Oracle in the LICENSE file that accompanied this code.
4383#
4384# This code is distributed in the hope that it will be useful, but WITHOUT
4385# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4386# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4387# version 2 for more details (a copy is included in the LICENSE file that
4388# accompanied this code).
4389#
4390# You should have received a copy of the GNU General Public License version
4391# 2 along with this work; if not, write to the Free Software Foundation,
4392# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4393#
4394# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4395# or visit www.oracle.com if you need additional information or have any
4396# questions.
4397#
4398
4399################################################################################
4400# Setup libffi (Foreign Function Interface)
4401################################################################################
4402
4403
4404#
4405# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4406# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4407#
4408# This code is free software; you can redistribute it and/or modify it
4409# under the terms of the GNU General Public License version 2 only, as
4410# published by the Free Software Foundation.  Oracle designates this
4411# particular file as subject to the "Classpath" exception as provided
4412# by Oracle in the LICENSE file that accompanied this code.
4413#
4414# This code is distributed in the hope that it will be useful, but WITHOUT
4415# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4416# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4417# version 2 for more details (a copy is included in the LICENSE file that
4418# accompanied this code).
4419#
4420# You should have received a copy of the GNU General Public License version
4421# 2 along with this work; if not, write to the Free Software Foundation,
4422# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4423#
4424# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4425# or visit www.oracle.com if you need additional information or have any
4426# questions.
4427#
4428
4429################################################################################
4430# Build the freetype lib from source
4431################################################################################
4432
4433
4434################################################################################
4435# Check if a potential freeype library match is correct and usable
4436################################################################################
4437
4438
4439################################################################################
4440# Setup freetype (The FreeType2 font rendering library)
4441################################################################################
4442
4443
4444#
4445# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4446# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4447#
4448# This code is free software; you can redistribute it and/or modify it
4449# under the terms of the GNU General Public License version 2 only, as
4450# published by the Free Software Foundation.  Oracle designates this
4451# particular file as subject to the "Classpath" exception as provided
4452# by Oracle in the LICENSE file that accompanied this code.
4453#
4454# This code is distributed in the hope that it will be useful, but WITHOUT
4455# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4456# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4457# version 2 for more details (a copy is included in the LICENSE file that
4458# accompanied this code).
4459#
4460# You should have received a copy of the GNU General Public License version
4461# 2 along with this work; if not, write to the Free Software Foundation,
4462# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4463#
4464# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4465# or visit www.oracle.com if you need additional information or have any
4466# questions.
4467#
4468
4469################################################################################
4470# Setup the standard C/C++ runtime libraries.
4471#
4472# Most importantly, determine if stdc++ should be linked statically or
4473# dynamically.
4474################################################################################
4475
4476
4477#
4478# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4479# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4480#
4481# This code is free software; you can redistribute it and/or modify it
4482# under the terms of the GNU General Public License version 2 only, as
4483# published by the Free Software Foundation.  Oracle designates this
4484# particular file as subject to the "Classpath" exception as provided
4485# by Oracle in the LICENSE file that accompanied this code.
4486#
4487# This code is distributed in the hope that it will be useful, but WITHOUT
4488# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4489# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4490# version 2 for more details (a copy is included in the LICENSE file that
4491# accompanied this code).
4492#
4493# You should have received a copy of the GNU General Public License version
4494# 2 along with this work; if not, write to the Free Software Foundation,
4495# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4496#
4497# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4498# or visit www.oracle.com if you need additional information or have any
4499# questions.
4500#
4501
4502################################################################################
4503# Setup X11 Windows system
4504################################################################################
4505
4506
4507
4508################################################################################
4509# Determine which libraries are needed for this configuration
4510################################################################################
4511
4512
4513################################################################################
4514# Parse library options, and setup needed libraries
4515################################################################################
4516
4517
4518################################################################################
4519# Setup llvm (Low-Level VM)
4520################################################################################
4521
4522
4523################################################################################
4524# Setup various libraries, typically small system libraries
4525################################################################################
4526
4527
4528#
4529# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4530# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4531#
4532# This code is free software; you can redistribute it and/or modify it
4533# under the terms of the GNU General Public License version 2 only, as
4534# published by the Free Software Foundation.  Oracle designates this
4535# particular file as subject to the "Classpath" exception as provided
4536# by Oracle in the LICENSE file that accompanied this code.
4537#
4538# This code is distributed in the hope that it will be useful, but WITHOUT
4539# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4540# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4541# version 2 for more details (a copy is included in the LICENSE file that
4542# accompanied this code).
4543#
4544# You should have received a copy of the GNU General Public License version
4545# 2 along with this work; if not, write to the Free Software Foundation,
4546# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4547#
4548# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4549# or visit www.oracle.com if you need additional information or have any
4550# questions.
4551#
4552
4553# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4554# Converts autoconf style CPU name to OpenJDK style, into
4555# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4556
4557
4558# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4559# Converts autoconf style OS name to OpenJDK style, into
4560# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4561
4562
4563# Expects $host_os $host_cpu $build_os and $build_cpu
4564# and $with_target_bits to have been setup!
4565#
4566# Translate the standard triplet(quadruplet) definition
4567# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4568# OPENJDK_BUILD_OS, etc.
4569
4570
4571# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4572# accordingly. Must be done after setting up build and target system, but before
4573# doing anything else with these values.
4574
4575
4576# Setup the legacy variables, for controlling the old makefiles.
4577#
4578
4579
4580
4581
4582#%%% Build and target systems %%%
4583
4584
4585
4586
4587# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4588# Add -mX to various FLAGS variables.
4589
4590
4591
4592
4593
4594
4595#
4596# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4597# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4598#
4599# This code is free software; you can redistribute it and/or modify it
4600# under the terms of the GNU General Public License version 2 only, as
4601# published by the Free Software Foundation.  Oracle designates this
4602# particular file as subject to the "Classpath" exception as provided
4603# by Oracle in the LICENSE file that accompanied this code.
4604#
4605# This code is distributed in the hope that it will be useful, but WITHOUT
4606# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4607# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4608# version 2 for more details (a copy is included in the LICENSE file that
4609# accompanied this code).
4610#
4611# You should have received a copy of the GNU General Public License version
4612# 2 along with this work; if not, write to the Free Software Foundation,
4613# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4614#
4615# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4616# or visit www.oracle.com if you need additional information or have any
4617# questions.
4618#
4619
4620
4621
4622
4623
4624
4625
4626#
4627# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4628# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4629#
4630# This code is free software; you can redistribute it and/or modify it
4631# under the terms of the GNU General Public License version 2 only, as
4632# published by the Free Software Foundation.  Oracle designates this
4633# particular file as subject to the "Classpath" exception as provided
4634# by Oracle in the LICENSE file that accompanied this code.
4635#
4636# This code is distributed in the hope that it will be useful, but WITHOUT
4637# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4638# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4639# version 2 for more details (a copy is included in the LICENSE file that
4640# accompanied this code).
4641#
4642# You should have received a copy of the GNU General Public License version
4643# 2 along with this work; if not, write to the Free Software Foundation,
4644# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4645#
4646# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4647# or visit www.oracle.com if you need additional information or have any
4648# questions.
4649#
4650
4651########################################################################
4652# This file is responsible for detecting, verifying and setting up the
4653# toolchain, i.e. the compiler, linker and related utilities. It will setup
4654# proper paths to the binaries, but it will not setup any flags.
4655#
4656# The binaries used is determined by the toolchain type, which is the family of
4657# compilers and related tools that are used.
4658########################################################################
4659
4660
4661# All valid toolchains, regardless of platform (used by help.m4)
4662VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4663
4664# These toolchains are valid on different platforms
4665VALID_TOOLCHAINS_linux="gcc clang"
4666VALID_TOOLCHAINS_solaris="solstudio"
4667VALID_TOOLCHAINS_macosx="gcc clang"
4668VALID_TOOLCHAINS_aix="xlc"
4669VALID_TOOLCHAINS_windows="microsoft"
4670
4671# Toolchain descriptions
4672TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4673TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4674TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4675TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4676TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4677
4678# Setup a number of variables describing how native output files are
4679# named on this platform/toolchain.
4680
4681
4682# Determine which toolchain type to use, and make sure it is valid for this
4683# platform. Setup various information about the selected toolchain.
4684
4685
4686# Before we start detecting the toolchain executables, we might need some
4687# special setup, e.g. additional paths etc.
4688
4689
4690# Restore path, etc
4691
4692
4693# Check if a compiler is of the toolchain type we expect, and save the version
4694# information from it. If the compiler does not match the expected type,
4695# this function will abort using AC_MSG_ERROR. If it matches, the version will
4696# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4697# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4698#
4699# $1 = compiler to test (CC or CXX)
4700# $2 = human readable name of compiler (C or C++)
4701
4702
4703# Try to locate the given C or C++ compiler in the path, or otherwise.
4704#
4705# $1 = compiler to test (CC or CXX)
4706# $2 = human readable name of compiler (C or C++)
4707# $3 = list of compiler names to search for
4708
4709
4710# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4711# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4712# archiver (AR). Verify that the compilers are correct according to the
4713# toolchain type.
4714
4715
4716# Setup additional tools that is considered a part of the toolchain, but not the
4717# core part. Many of these are highly platform-specific and do not exist,
4718# and/or are not needed on all platforms.
4719
4720
4721# Setup the build tools (i.e, the compiler and linker used to build programs
4722# that should be run on the build platform, not the target platform, as a build
4723# helper). Since the non-cross-compile case uses the normal, target compilers
4724# for this, we can only do this after these have been setup.
4725
4726
4727# Setup legacy variables that are still needed as alternative ways to refer to
4728# parts of the toolchain.
4729
4730
4731# Do some additional checks on the detected tools.
4732
4733
4734# Setup the JTReg Regression Test Harness.
4735
4736
4737#
4738# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4740#
4741# This code is free software; you can redistribute it and/or modify it
4742# under the terms of the GNU General Public License version 2 only, as
4743# published by the Free Software Foundation.  Oracle designates this
4744# particular file as subject to the "Classpath" exception as provided
4745# by Oracle in the LICENSE file that accompanied this code.
4746#
4747# This code is distributed in the hope that it will be useful, but WITHOUT
4748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4750# version 2 for more details (a copy is included in the LICENSE file that
4751# accompanied this code).
4752#
4753# You should have received a copy of the GNU General Public License version
4754# 2 along with this work; if not, write to the Free Software Foundation,
4755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4756#
4757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4758# or visit www.oracle.com if you need additional information or have any
4759# questions.
4760#
4761
4762################################################################################
4763# The order of these defines the priority by which we try to find them.
4764VALID_VS_VERSIONS="2013 2012 2010"
4765
4766VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4767VS_VERSION_INTERNAL_2010=100
4768VS_MSVCR_2010=msvcr100.dll
4769# We don't use msvcp on Visual Studio 2010
4770#VS_MSVCP_2010=msvcp100.dll
4771VS_ENVVAR_2010="VS100COMNTOOLS"
4772VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4773VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4774VS_VS_PLATFORM_NAME_2010="v100"
4775VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4776
4777VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4778VS_VERSION_INTERNAL_2012=110
4779VS_MSVCR_2012=msvcr110.dll
4780VS_MSVCP_2012=msvcp110.dll
4781VS_ENVVAR_2012="VS110COMNTOOLS"
4782VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4783VS_SDK_INSTALLDIR_2012=
4784VS_VS_PLATFORM_NAME_2012="v110"
4785VS_SDK_PLATFORM_NAME_2012=
4786
4787VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4788VS_VERSION_INTERNAL_2013=120
4789VS_MSVCR_2013=msvcr120.dll
4790VS_MSVCP_2013=msvcp120.dll
4791VS_ENVVAR_2013="VS120COMNTOOLS"
4792VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4793VS_SDK_INSTALLDIR_2013=
4794VS_VS_PLATFORM_NAME_2013="v120"
4795VS_SDK_PLATFORM_NAME_2013=
4796
4797################################################################################
4798
4799
4800
4801################################################################################
4802
4803
4804
4805################################################################################
4806# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4807# build environment and assigns it to VS_ENV_CMD
4808
4809
4810################################################################################
4811
4812
4813
4814################################################################################
4815# Check if the VS env variables were setup prior to running configure.
4816# If not, then find vcvarsall.bat and run it automatically, and integrate
4817# the set env variables into the spec file.
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832# This line needs to be here, verbatim, after all includes and the dummy hook
4833# definitions. It is replaced with custom functionality when building
4834# custom sources.
4835#CUSTOM_AUTOCONF_INCLUDE
4836
4837# Do not change or remove the following line, it is needed for consistency checks:
4838DATE_WHEN_GENERATED=1454146111
4839
4840###############################################################################
4841#
4842# Initialization / Boot-strapping
4843#
4844# The bootstrapping process needs to solve the "chicken or the egg" problem,
4845# thus it jumps back and forth, each time gaining something needed later on.
4846#
4847###############################################################################
4848
4849# If we are requested to print additional help, do that and then exit.
4850# This must be the very first call.
4851
4852  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4853    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4854    $PRINTF "Which are valid to use depends on the build platform.\n"
4855    for toolchain in $VALID_TOOLCHAINS_all; do
4856      # Use indirect variable referencing
4857      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4858      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4859      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4860    done
4861
4862    # And now exit directly
4863    exit 0
4864  fi
4865
4866
4867# Basic initialization that must happen first of all in the normal process.
4868
4869  # Save the original command line. This is passed to us by the wrapper configure script.
4870
4871  # Save the path variable before it gets changed
4872  ORIGINAL_PATH="$PATH"
4873
4874  DATE_WHEN_CONFIGURED=`LANG=C date`
4875
4876  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4877$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4878  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4879$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4880
4881
4882  # Start with tools that do not need have cross compilation support
4883  # and can be expected to be found in the default PATH. These tools are
4884  # used by configure.
4885
4886  # First are all the simple required tools.
4887
4888
4889
4890  # Publish this variable in the help.
4891
4892
4893  if [ -z "${BASENAME+x}" ]; then
4894    # The variable is not set by user, try to locate tool using the code snippet
4895    for ac_prog in basename
4896do
4897  # Extract the first word of "$ac_prog", so it can be a program name with args.
4898set dummy $ac_prog; ac_word=$2
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4900$as_echo_n "checking for $ac_word... " >&6; }
4901if ${ac_cv_path_BASENAME+:} false; then :
4902  $as_echo_n "(cached) " >&6
4903else
4904  case $BASENAME in
4905  [\\/]* | ?:[\\/]*)
4906  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4907  ;;
4908  *)
4909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4910for as_dir in $PATH
4911do
4912  IFS=$as_save_IFS
4913  test -z "$as_dir" && as_dir=.
4914    for ac_exec_ext in '' $ac_executable_extensions; do
4915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4916    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4918    break 2
4919  fi
4920done
4921  done
4922IFS=$as_save_IFS
4923
4924  ;;
4925esac
4926fi
4927BASENAME=$ac_cv_path_BASENAME
4928if test -n "$BASENAME"; then
4929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4930$as_echo "$BASENAME" >&6; }
4931else
4932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4933$as_echo "no" >&6; }
4934fi
4935
4936
4937  test -n "$BASENAME" && break
4938done
4939
4940  else
4941    # The variable is set, but is it from the command line or the environment?
4942
4943    # Try to remove the string !BASENAME! from our list.
4944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4946      # If it failed, the variable was not from the command line. Ignore it,
4947      # but warn the user (except for BASH, which is always set by the calling BASH).
4948      if test "xBASENAME" != xBASH; then
4949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4950$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4951      fi
4952      # Try to locate tool using the code snippet
4953      for ac_prog in basename
4954do
4955  # Extract the first word of "$ac_prog", so it can be a program name with args.
4956set dummy $ac_prog; ac_word=$2
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4958$as_echo_n "checking for $ac_word... " >&6; }
4959if ${ac_cv_path_BASENAME+:} false; then :
4960  $as_echo_n "(cached) " >&6
4961else
4962  case $BASENAME in
4963  [\\/]* | ?:[\\/]*)
4964  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4965  ;;
4966  *)
4967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in $PATH
4969do
4970  IFS=$as_save_IFS
4971  test -z "$as_dir" && as_dir=.
4972    for ac_exec_ext in '' $ac_executable_extensions; do
4973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4974    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976    break 2
4977  fi
4978done
4979  done
4980IFS=$as_save_IFS
4981
4982  ;;
4983esac
4984fi
4985BASENAME=$ac_cv_path_BASENAME
4986if test -n "$BASENAME"; then
4987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4988$as_echo "$BASENAME" >&6; }
4989else
4990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991$as_echo "no" >&6; }
4992fi
4993
4994
4995  test -n "$BASENAME" && break
4996done
4997
4998    else
4999      # If it succeeded, then it was overridden by the user. We will use it
5000      # for the tool.
5001
5002      # First remove it from the list of overridden variables, so we can test
5003      # for unknown variables in the end.
5004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5005
5006      # Check if we try to supply an empty value
5007      if test "x$BASENAME" = x; then
5008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5009$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5011$as_echo_n "checking for BASENAME... " >&6; }
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5013$as_echo "disabled" >&6; }
5014      else
5015        # Check if the provided tool contains a complete path.
5016        tool_specified="$BASENAME"
5017        tool_basename="${tool_specified##*/}"
5018        if test "x$tool_basename" = "x$tool_specified"; then
5019          # A command without a complete path is provided, search $PATH.
5020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5021$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5022          # Extract the first word of "$tool_basename", so it can be a program name with args.
5023set dummy $tool_basename; ac_word=$2
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5025$as_echo_n "checking for $ac_word... " >&6; }
5026if ${ac_cv_path_BASENAME+:} false; then :
5027  $as_echo_n "(cached) " >&6
5028else
5029  case $BASENAME in
5030  [\\/]* | ?:[\\/]*)
5031  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5032  ;;
5033  *)
5034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035for as_dir in $PATH
5036do
5037  IFS=$as_save_IFS
5038  test -z "$as_dir" && as_dir=.
5039    for ac_exec_ext in '' $ac_executable_extensions; do
5040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5041    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5043    break 2
5044  fi
5045done
5046  done
5047IFS=$as_save_IFS
5048
5049  ;;
5050esac
5051fi
5052BASENAME=$ac_cv_path_BASENAME
5053if test -n "$BASENAME"; then
5054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5055$as_echo "$BASENAME" >&6; }
5056else
5057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5058$as_echo "no" >&6; }
5059fi
5060
5061
5062          if test "x$BASENAME" = x; then
5063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5064          fi
5065        else
5066          # Otherwise we believe it is a complete path. Use it as it is.
5067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5068$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5070$as_echo_n "checking for BASENAME... " >&6; }
5071          if test ! -x "$tool_specified"; then
5072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5073$as_echo "not found" >&6; }
5074            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5075          fi
5076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5077$as_echo "$tool_specified" >&6; }
5078        fi
5079      fi
5080    fi
5081
5082  fi
5083
5084
5085
5086  if test "x$BASENAME" = x; then
5087    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5088  fi
5089
5090
5091
5092
5093
5094  # Publish this variable in the help.
5095
5096
5097  if [ -z "${BASH+x}" ]; then
5098    # The variable is not set by user, try to locate tool using the code snippet
5099    for ac_prog in bash
5100do
5101  # Extract the first word of "$ac_prog", so it can be a program name with args.
5102set dummy $ac_prog; ac_word=$2
5103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104$as_echo_n "checking for $ac_word... " >&6; }
5105if ${ac_cv_path_BASH+:} false; then :
5106  $as_echo_n "(cached) " >&6
5107else
5108  case $BASH in
5109  [\\/]* | ?:[\\/]*)
5110  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5111  ;;
5112  *)
5113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH
5115do
5116  IFS=$as_save_IFS
5117  test -z "$as_dir" && as_dir=.
5118    for ac_exec_ext in '' $ac_executable_extensions; do
5119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5120    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5122    break 2
5123  fi
5124done
5125  done
5126IFS=$as_save_IFS
5127
5128  ;;
5129esac
5130fi
5131BASH=$ac_cv_path_BASH
5132if test -n "$BASH"; then
5133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5134$as_echo "$BASH" >&6; }
5135else
5136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137$as_echo "no" >&6; }
5138fi
5139
5140
5141  test -n "$BASH" && break
5142done
5143
5144  else
5145    # The variable is set, but is it from the command line or the environment?
5146
5147    # Try to remove the string !BASH! from our list.
5148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5150      # If it failed, the variable was not from the command line. Ignore it,
5151      # but warn the user (except for BASH, which is always set by the calling BASH).
5152      if test "xBASH" != xBASH; then
5153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5154$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5155      fi
5156      # Try to locate tool using the code snippet
5157      for ac_prog in bash
5158do
5159  # Extract the first word of "$ac_prog", so it can be a program name with args.
5160set dummy $ac_prog; ac_word=$2
5161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5162$as_echo_n "checking for $ac_word... " >&6; }
5163if ${ac_cv_path_BASH+:} false; then :
5164  $as_echo_n "(cached) " >&6
5165else
5166  case $BASH in
5167  [\\/]* | ?:[\\/]*)
5168  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5169  ;;
5170  *)
5171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174  IFS=$as_save_IFS
5175  test -z "$as_dir" && as_dir=.
5176    for ac_exec_ext in '' $ac_executable_extensions; do
5177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5178    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5180    break 2
5181  fi
5182done
5183  done
5184IFS=$as_save_IFS
5185
5186  ;;
5187esac
5188fi
5189BASH=$ac_cv_path_BASH
5190if test -n "$BASH"; then
5191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5192$as_echo "$BASH" >&6; }
5193else
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
5196fi
5197
5198
5199  test -n "$BASH" && break
5200done
5201
5202    else
5203      # If it succeeded, then it was overridden by the user. We will use it
5204      # for the tool.
5205
5206      # First remove it from the list of overridden variables, so we can test
5207      # for unknown variables in the end.
5208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5209
5210      # Check if we try to supply an empty value
5211      if test "x$BASH" = x; then
5212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5213$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5215$as_echo_n "checking for BASH... " >&6; }
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5217$as_echo "disabled" >&6; }
5218      else
5219        # Check if the provided tool contains a complete path.
5220        tool_specified="$BASH"
5221        tool_basename="${tool_specified##*/}"
5222        if test "x$tool_basename" = "x$tool_specified"; then
5223          # A command without a complete path is provided, search $PATH.
5224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5225$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5226          # Extract the first word of "$tool_basename", so it can be a program name with args.
5227set dummy $tool_basename; ac_word=$2
5228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5229$as_echo_n "checking for $ac_word... " >&6; }
5230if ${ac_cv_path_BASH+:} false; then :
5231  $as_echo_n "(cached) " >&6
5232else
5233  case $BASH in
5234  [\\/]* | ?:[\\/]*)
5235  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5236  ;;
5237  *)
5238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239for as_dir in $PATH
5240do
5241  IFS=$as_save_IFS
5242  test -z "$as_dir" && as_dir=.
5243    for ac_exec_ext in '' $ac_executable_extensions; do
5244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5245    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5247    break 2
5248  fi
5249done
5250  done
5251IFS=$as_save_IFS
5252
5253  ;;
5254esac
5255fi
5256BASH=$ac_cv_path_BASH
5257if test -n "$BASH"; then
5258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5259$as_echo "$BASH" >&6; }
5260else
5261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262$as_echo "no" >&6; }
5263fi
5264
5265
5266          if test "x$BASH" = x; then
5267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5268          fi
5269        else
5270          # Otherwise we believe it is a complete path. Use it as it is.
5271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5272$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5274$as_echo_n "checking for BASH... " >&6; }
5275          if test ! -x "$tool_specified"; then
5276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5277$as_echo "not found" >&6; }
5278            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5279          fi
5280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5281$as_echo "$tool_specified" >&6; }
5282        fi
5283      fi
5284    fi
5285
5286  fi
5287
5288
5289
5290  if test "x$BASH" = x; then
5291    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5292  fi
5293
5294
5295
5296
5297
5298  # Publish this variable in the help.
5299
5300
5301  if [ -z "${CAT+x}" ]; then
5302    # The variable is not set by user, try to locate tool using the code snippet
5303    for ac_prog in cat
5304do
5305  # Extract the first word of "$ac_prog", so it can be a program name with args.
5306set dummy $ac_prog; ac_word=$2
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5308$as_echo_n "checking for $ac_word... " >&6; }
5309if ${ac_cv_path_CAT+:} false; then :
5310  $as_echo_n "(cached) " >&6
5311else
5312  case $CAT in
5313  [\\/]* | ?:[\\/]*)
5314  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5315  ;;
5316  *)
5317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5318for as_dir in $PATH
5319do
5320  IFS=$as_save_IFS
5321  test -z "$as_dir" && as_dir=.
5322    for ac_exec_ext in '' $ac_executable_extensions; do
5323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5324    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5326    break 2
5327  fi
5328done
5329  done
5330IFS=$as_save_IFS
5331
5332  ;;
5333esac
5334fi
5335CAT=$ac_cv_path_CAT
5336if test -n "$CAT"; then
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5338$as_echo "$CAT" >&6; }
5339else
5340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341$as_echo "no" >&6; }
5342fi
5343
5344
5345  test -n "$CAT" && break
5346done
5347
5348  else
5349    # The variable is set, but is it from the command line or the environment?
5350
5351    # Try to remove the string !CAT! from our list.
5352    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5353    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5354      # If it failed, the variable was not from the command line. Ignore it,
5355      # but warn the user (except for BASH, which is always set by the calling BASH).
5356      if test "xCAT" != xBASH; then
5357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5358$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5359      fi
5360      # Try to locate tool using the code snippet
5361      for ac_prog in cat
5362do
5363  # Extract the first word of "$ac_prog", so it can be a program name with args.
5364set dummy $ac_prog; ac_word=$2
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366$as_echo_n "checking for $ac_word... " >&6; }
5367if ${ac_cv_path_CAT+:} false; then :
5368  $as_echo_n "(cached) " >&6
5369else
5370  case $CAT in
5371  [\\/]* | ?:[\\/]*)
5372  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5373  ;;
5374  *)
5375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  test -z "$as_dir" && as_dir=.
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390  ;;
5391esac
5392fi
5393CAT=$ac_cv_path_CAT
5394if test -n "$CAT"; then
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5396$as_echo "$CAT" >&6; }
5397else
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401
5402
5403  test -n "$CAT" && break
5404done
5405
5406    else
5407      # If it succeeded, then it was overridden by the user. We will use it
5408      # for the tool.
5409
5410      # First remove it from the list of overridden variables, so we can test
5411      # for unknown variables in the end.
5412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5413
5414      # Check if we try to supply an empty value
5415      if test "x$CAT" = x; then
5416        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5417$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5419$as_echo_n "checking for CAT... " >&6; }
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5421$as_echo "disabled" >&6; }
5422      else
5423        # Check if the provided tool contains a complete path.
5424        tool_specified="$CAT"
5425        tool_basename="${tool_specified##*/}"
5426        if test "x$tool_basename" = "x$tool_specified"; then
5427          # A command without a complete path is provided, search $PATH.
5428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5429$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5430          # Extract the first word of "$tool_basename", so it can be a program name with args.
5431set dummy $tool_basename; ac_word=$2
5432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5433$as_echo_n "checking for $ac_word... " >&6; }
5434if ${ac_cv_path_CAT+:} false; then :
5435  $as_echo_n "(cached) " >&6
5436else
5437  case $CAT in
5438  [\\/]* | ?:[\\/]*)
5439  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5440  ;;
5441  *)
5442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5443for as_dir in $PATH
5444do
5445  IFS=$as_save_IFS
5446  test -z "$as_dir" && as_dir=.
5447    for ac_exec_ext in '' $ac_executable_extensions; do
5448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5449    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5451    break 2
5452  fi
5453done
5454  done
5455IFS=$as_save_IFS
5456
5457  ;;
5458esac
5459fi
5460CAT=$ac_cv_path_CAT
5461if test -n "$CAT"; then
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5463$as_echo "$CAT" >&6; }
5464else
5465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5466$as_echo "no" >&6; }
5467fi
5468
5469
5470          if test "x$CAT" = x; then
5471            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5472          fi
5473        else
5474          # Otherwise we believe it is a complete path. Use it as it is.
5475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5476$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5477          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5478$as_echo_n "checking for CAT... " >&6; }
5479          if test ! -x "$tool_specified"; then
5480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5481$as_echo "not found" >&6; }
5482            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5483          fi
5484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5485$as_echo "$tool_specified" >&6; }
5486        fi
5487      fi
5488    fi
5489
5490  fi
5491
5492
5493
5494  if test "x$CAT" = x; then
5495    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5496  fi
5497
5498
5499
5500
5501
5502  # Publish this variable in the help.
5503
5504
5505  if [ -z "${CHMOD+x}" ]; then
5506    # The variable is not set by user, try to locate tool using the code snippet
5507    for ac_prog in chmod
5508do
5509  # Extract the first word of "$ac_prog", so it can be a program name with args.
5510set dummy $ac_prog; ac_word=$2
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512$as_echo_n "checking for $ac_word... " >&6; }
5513if ${ac_cv_path_CHMOD+:} false; then :
5514  $as_echo_n "(cached) " >&6
5515else
5516  case $CHMOD in
5517  [\\/]* | ?:[\\/]*)
5518  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5519  ;;
5520  *)
5521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH
5523do
5524  IFS=$as_save_IFS
5525  test -z "$as_dir" && as_dir=.
5526    for ac_exec_ext in '' $ac_executable_extensions; do
5527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530    break 2
5531  fi
5532done
5533  done
5534IFS=$as_save_IFS
5535
5536  ;;
5537esac
5538fi
5539CHMOD=$ac_cv_path_CHMOD
5540if test -n "$CHMOD"; then
5541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5542$as_echo "$CHMOD" >&6; }
5543else
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548
5549  test -n "$CHMOD" && break
5550done
5551
5552  else
5553    # The variable is set, but is it from the command line or the environment?
5554
5555    # Try to remove the string !CHMOD! from our list.
5556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5558      # If it failed, the variable was not from the command line. Ignore it,
5559      # but warn the user (except for BASH, which is always set by the calling BASH).
5560      if test "xCHMOD" != xBASH; then
5561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5562$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5563      fi
5564      # Try to locate tool using the code snippet
5565      for ac_prog in chmod
5566do
5567  # Extract the first word of "$ac_prog", so it can be a program name with args.
5568set dummy $ac_prog; ac_word=$2
5569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570$as_echo_n "checking for $ac_word... " >&6; }
5571if ${ac_cv_path_CHMOD+:} false; then :
5572  $as_echo_n "(cached) " >&6
5573else
5574  case $CHMOD in
5575  [\\/]* | ?:[\\/]*)
5576  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5577  ;;
5578  *)
5579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580for as_dir in $PATH
5581do
5582  IFS=$as_save_IFS
5583  test -z "$as_dir" && as_dir=.
5584    for ac_exec_ext in '' $ac_executable_extensions; do
5585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588    break 2
5589  fi
5590done
5591  done
5592IFS=$as_save_IFS
5593
5594  ;;
5595esac
5596fi
5597CHMOD=$ac_cv_path_CHMOD
5598if test -n "$CHMOD"; then
5599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5600$as_echo "$CHMOD" >&6; }
5601else
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603$as_echo "no" >&6; }
5604fi
5605
5606
5607  test -n "$CHMOD" && break
5608done
5609
5610    else
5611      # If it succeeded, then it was overridden by the user. We will use it
5612      # for the tool.
5613
5614      # First remove it from the list of overridden variables, so we can test
5615      # for unknown variables in the end.
5616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5617
5618      # Check if we try to supply an empty value
5619      if test "x$CHMOD" = x; then
5620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5621$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5623$as_echo_n "checking for CHMOD... " >&6; }
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5625$as_echo "disabled" >&6; }
5626      else
5627        # Check if the provided tool contains a complete path.
5628        tool_specified="$CHMOD"
5629        tool_basename="${tool_specified##*/}"
5630        if test "x$tool_basename" = "x$tool_specified"; then
5631          # A command without a complete path is provided, search $PATH.
5632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5633$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5634          # Extract the first word of "$tool_basename", so it can be a program name with args.
5635set dummy $tool_basename; ac_word=$2
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5637$as_echo_n "checking for $ac_word... " >&6; }
5638if ${ac_cv_path_CHMOD+:} false; then :
5639  $as_echo_n "(cached) " >&6
5640else
5641  case $CHMOD in
5642  [\\/]* | ?:[\\/]*)
5643  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5644  ;;
5645  *)
5646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5647for as_dir in $PATH
5648do
5649  IFS=$as_save_IFS
5650  test -z "$as_dir" && as_dir=.
5651    for ac_exec_ext in '' $ac_executable_extensions; do
5652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5653    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5655    break 2
5656  fi
5657done
5658  done
5659IFS=$as_save_IFS
5660
5661  ;;
5662esac
5663fi
5664CHMOD=$ac_cv_path_CHMOD
5665if test -n "$CHMOD"; then
5666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5667$as_echo "$CHMOD" >&6; }
5668else
5669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
5671fi
5672
5673
5674          if test "x$CHMOD" = x; then
5675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5676          fi
5677        else
5678          # Otherwise we believe it is a complete path. Use it as it is.
5679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5680$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5682$as_echo_n "checking for CHMOD... " >&6; }
5683          if test ! -x "$tool_specified"; then
5684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5685$as_echo "not found" >&6; }
5686            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5687          fi
5688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5689$as_echo "$tool_specified" >&6; }
5690        fi
5691      fi
5692    fi
5693
5694  fi
5695
5696
5697
5698  if test "x$CHMOD" = x; then
5699    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5700  fi
5701
5702
5703
5704
5705
5706  # Publish this variable in the help.
5707
5708
5709  if [ -z "${CMP+x}" ]; then
5710    # The variable is not set by user, try to locate tool using the code snippet
5711    for ac_prog in cmp
5712do
5713  # Extract the first word of "$ac_prog", so it can be a program name with args.
5714set dummy $ac_prog; ac_word=$2
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716$as_echo_n "checking for $ac_word... " >&6; }
5717if ${ac_cv_path_CMP+:} false; then :
5718  $as_echo_n "(cached) " >&6
5719else
5720  case $CMP in
5721  [\\/]* | ?:[\\/]*)
5722  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5723  ;;
5724  *)
5725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726for as_dir in $PATH
5727do
5728  IFS=$as_save_IFS
5729  test -z "$as_dir" && as_dir=.
5730    for ac_exec_ext in '' $ac_executable_extensions; do
5731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734    break 2
5735  fi
5736done
5737  done
5738IFS=$as_save_IFS
5739
5740  ;;
5741esac
5742fi
5743CMP=$ac_cv_path_CMP
5744if test -n "$CMP"; then
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5746$as_echo "$CMP" >&6; }
5747else
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749$as_echo "no" >&6; }
5750fi
5751
5752
5753  test -n "$CMP" && break
5754done
5755
5756  else
5757    # The variable is set, but is it from the command line or the environment?
5758
5759    # Try to remove the string !CMP! from our list.
5760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5762      # If it failed, the variable was not from the command line. Ignore it,
5763      # but warn the user (except for BASH, which is always set by the calling BASH).
5764      if test "xCMP" != xBASH; then
5765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5766$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5767      fi
5768      # Try to locate tool using the code snippet
5769      for ac_prog in cmp
5770do
5771  # Extract the first word of "$ac_prog", so it can be a program name with args.
5772set dummy $ac_prog; ac_word=$2
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774$as_echo_n "checking for $ac_word... " >&6; }
5775if ${ac_cv_path_CMP+:} false; then :
5776  $as_echo_n "(cached) " >&6
5777else
5778  case $CMP in
5779  [\\/]* | ?:[\\/]*)
5780  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5781  ;;
5782  *)
5783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784for as_dir in $PATH
5785do
5786  IFS=$as_save_IFS
5787  test -z "$as_dir" && as_dir=.
5788    for ac_exec_ext in '' $ac_executable_extensions; do
5789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792    break 2
5793  fi
5794done
5795  done
5796IFS=$as_save_IFS
5797
5798  ;;
5799esac
5800fi
5801CMP=$ac_cv_path_CMP
5802if test -n "$CMP"; then
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5804$as_echo "$CMP" >&6; }
5805else
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807$as_echo "no" >&6; }
5808fi
5809
5810
5811  test -n "$CMP" && break
5812done
5813
5814    else
5815      # If it succeeded, then it was overridden by the user. We will use it
5816      # for the tool.
5817
5818      # First remove it from the list of overridden variables, so we can test
5819      # for unknown variables in the end.
5820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5821
5822      # Check if we try to supply an empty value
5823      if test "x$CMP" = x; then
5824        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5825$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5827$as_echo_n "checking for CMP... " >&6; }
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5829$as_echo "disabled" >&6; }
5830      else
5831        # Check if the provided tool contains a complete path.
5832        tool_specified="$CMP"
5833        tool_basename="${tool_specified##*/}"
5834        if test "x$tool_basename" = "x$tool_specified"; then
5835          # A command without a complete path is provided, search $PATH.
5836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5837$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5838          # Extract the first word of "$tool_basename", so it can be a program name with args.
5839set dummy $tool_basename; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_path_CMP+:} false; then :
5843  $as_echo_n "(cached) " >&6
5844else
5845  case $CMP in
5846  [\\/]* | ?:[\\/]*)
5847  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5848  ;;
5849  *)
5850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853  IFS=$as_save_IFS
5854  test -z "$as_dir" && as_dir=.
5855    for ac_exec_ext in '' $ac_executable_extensions; do
5856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5857    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5859    break 2
5860  fi
5861done
5862  done
5863IFS=$as_save_IFS
5864
5865  ;;
5866esac
5867fi
5868CMP=$ac_cv_path_CMP
5869if test -n "$CMP"; then
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5871$as_echo "$CMP" >&6; }
5872else
5873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874$as_echo "no" >&6; }
5875fi
5876
5877
5878          if test "x$CMP" = x; then
5879            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5880          fi
5881        else
5882          # Otherwise we believe it is a complete path. Use it as it is.
5883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5884$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5885          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5886$as_echo_n "checking for CMP... " >&6; }
5887          if test ! -x "$tool_specified"; then
5888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5889$as_echo "not found" >&6; }
5890            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5891          fi
5892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5893$as_echo "$tool_specified" >&6; }
5894        fi
5895      fi
5896    fi
5897
5898  fi
5899
5900
5901
5902  if test "x$CMP" = x; then
5903    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5904  fi
5905
5906
5907
5908
5909
5910  # Publish this variable in the help.
5911
5912
5913  if [ -z "${COMM+x}" ]; then
5914    # The variable is not set by user, try to locate tool using the code snippet
5915    for ac_prog in comm
5916do
5917  # Extract the first word of "$ac_prog", so it can be a program name with args.
5918set dummy $ac_prog; ac_word=$2
5919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5920$as_echo_n "checking for $ac_word... " >&6; }
5921if ${ac_cv_path_COMM+:} false; then :
5922  $as_echo_n "(cached) " >&6
5923else
5924  case $COMM in
5925  [\\/]* | ?:[\\/]*)
5926  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5927  ;;
5928  *)
5929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930for as_dir in $PATH
5931do
5932  IFS=$as_save_IFS
5933  test -z "$as_dir" && as_dir=.
5934    for ac_exec_ext in '' $ac_executable_extensions; do
5935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5936    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5938    break 2
5939  fi
5940done
5941  done
5942IFS=$as_save_IFS
5943
5944  ;;
5945esac
5946fi
5947COMM=$ac_cv_path_COMM
5948if test -n "$COMM"; then
5949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5950$as_echo "$COMM" >&6; }
5951else
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5953$as_echo "no" >&6; }
5954fi
5955
5956
5957  test -n "$COMM" && break
5958done
5959
5960  else
5961    # The variable is set, but is it from the command line or the environment?
5962
5963    # Try to remove the string !COMM! from our list.
5964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5966      # If it failed, the variable was not from the command line. Ignore it,
5967      # but warn the user (except for BASH, which is always set by the calling BASH).
5968      if test "xCOMM" != xBASH; then
5969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5970$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5971      fi
5972      # Try to locate tool using the code snippet
5973      for ac_prog in comm
5974do
5975  # Extract the first word of "$ac_prog", so it can be a program name with args.
5976set dummy $ac_prog; ac_word=$2
5977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5978$as_echo_n "checking for $ac_word... " >&6; }
5979if ${ac_cv_path_COMM+:} false; then :
5980  $as_echo_n "(cached) " >&6
5981else
5982  case $COMM in
5983  [\\/]* | ?:[\\/]*)
5984  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5985  ;;
5986  *)
5987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988for as_dir in $PATH
5989do
5990  IFS=$as_save_IFS
5991  test -z "$as_dir" && as_dir=.
5992    for ac_exec_ext in '' $ac_executable_extensions; do
5993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5994    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5996    break 2
5997  fi
5998done
5999  done
6000IFS=$as_save_IFS
6001
6002  ;;
6003esac
6004fi
6005COMM=$ac_cv_path_COMM
6006if test -n "$COMM"; then
6007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6008$as_echo "$COMM" >&6; }
6009else
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6011$as_echo "no" >&6; }
6012fi
6013
6014
6015  test -n "$COMM" && break
6016done
6017
6018    else
6019      # If it succeeded, then it was overridden by the user. We will use it
6020      # for the tool.
6021
6022      # First remove it from the list of overridden variables, so we can test
6023      # for unknown variables in the end.
6024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6025
6026      # Check if we try to supply an empty value
6027      if test "x$COMM" = x; then
6028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6029$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6031$as_echo_n "checking for COMM... " >&6; }
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6033$as_echo "disabled" >&6; }
6034      else
6035        # Check if the provided tool contains a complete path.
6036        tool_specified="$COMM"
6037        tool_basename="${tool_specified##*/}"
6038        if test "x$tool_basename" = "x$tool_specified"; then
6039          # A command without a complete path is provided, search $PATH.
6040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6041$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6042          # Extract the first word of "$tool_basename", so it can be a program name with args.
6043set dummy $tool_basename; ac_word=$2
6044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6045$as_echo_n "checking for $ac_word... " >&6; }
6046if ${ac_cv_path_COMM+:} false; then :
6047  $as_echo_n "(cached) " >&6
6048else
6049  case $COMM in
6050  [\\/]* | ?:[\\/]*)
6051  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6052  ;;
6053  *)
6054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH
6056do
6057  IFS=$as_save_IFS
6058  test -z "$as_dir" && as_dir=.
6059    for ac_exec_ext in '' $ac_executable_extensions; do
6060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6061    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6063    break 2
6064  fi
6065done
6066  done
6067IFS=$as_save_IFS
6068
6069  ;;
6070esac
6071fi
6072COMM=$ac_cv_path_COMM
6073if test -n "$COMM"; then
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6075$as_echo "$COMM" >&6; }
6076else
6077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
6079fi
6080
6081
6082          if test "x$COMM" = x; then
6083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6084          fi
6085        else
6086          # Otherwise we believe it is a complete path. Use it as it is.
6087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6088$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6090$as_echo_n "checking for COMM... " >&6; }
6091          if test ! -x "$tool_specified"; then
6092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6093$as_echo "not found" >&6; }
6094            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6095          fi
6096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6097$as_echo "$tool_specified" >&6; }
6098        fi
6099      fi
6100    fi
6101
6102  fi
6103
6104
6105
6106  if test "x$COMM" = x; then
6107    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6108  fi
6109
6110
6111
6112
6113
6114  # Publish this variable in the help.
6115
6116
6117  if [ -z "${CP+x}" ]; then
6118    # The variable is not set by user, try to locate tool using the code snippet
6119    for ac_prog in cp
6120do
6121  # Extract the first word of "$ac_prog", so it can be a program name with args.
6122set dummy $ac_prog; ac_word=$2
6123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6124$as_echo_n "checking for $ac_word... " >&6; }
6125if ${ac_cv_path_CP+:} false; then :
6126  $as_echo_n "(cached) " >&6
6127else
6128  case $CP in
6129  [\\/]* | ?:[\\/]*)
6130  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6131  ;;
6132  *)
6133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH
6135do
6136  IFS=$as_save_IFS
6137  test -z "$as_dir" && as_dir=.
6138    for ac_exec_ext in '' $ac_executable_extensions; do
6139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6140    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142    break 2
6143  fi
6144done
6145  done
6146IFS=$as_save_IFS
6147
6148  ;;
6149esac
6150fi
6151CP=$ac_cv_path_CP
6152if test -n "$CP"; then
6153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6154$as_echo "$CP" >&6; }
6155else
6156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6157$as_echo "no" >&6; }
6158fi
6159
6160
6161  test -n "$CP" && break
6162done
6163
6164  else
6165    # The variable is set, but is it from the command line or the environment?
6166
6167    # Try to remove the string !CP! from our list.
6168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6170      # If it failed, the variable was not from the command line. Ignore it,
6171      # but warn the user (except for BASH, which is always set by the calling BASH).
6172      if test "xCP" != xBASH; then
6173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6174$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6175      fi
6176      # Try to locate tool using the code snippet
6177      for ac_prog in cp
6178do
6179  # Extract the first word of "$ac_prog", so it can be a program name with args.
6180set dummy $ac_prog; ac_word=$2
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6182$as_echo_n "checking for $ac_word... " >&6; }
6183if ${ac_cv_path_CP+:} false; then :
6184  $as_echo_n "(cached) " >&6
6185else
6186  case $CP in
6187  [\\/]* | ?:[\\/]*)
6188  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6189  ;;
6190  *)
6191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192for as_dir in $PATH
6193do
6194  IFS=$as_save_IFS
6195  test -z "$as_dir" && as_dir=.
6196    for ac_exec_ext in '' $ac_executable_extensions; do
6197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6198    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6200    break 2
6201  fi
6202done
6203  done
6204IFS=$as_save_IFS
6205
6206  ;;
6207esac
6208fi
6209CP=$ac_cv_path_CP
6210if test -n "$CP"; then
6211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6212$as_echo "$CP" >&6; }
6213else
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215$as_echo "no" >&6; }
6216fi
6217
6218
6219  test -n "$CP" && break
6220done
6221
6222    else
6223      # If it succeeded, then it was overridden by the user. We will use it
6224      # for the tool.
6225
6226      # First remove it from the list of overridden variables, so we can test
6227      # for unknown variables in the end.
6228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6229
6230      # Check if we try to supply an empty value
6231      if test "x$CP" = x; then
6232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6233$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6235$as_echo_n "checking for CP... " >&6; }
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6237$as_echo "disabled" >&6; }
6238      else
6239        # Check if the provided tool contains a complete path.
6240        tool_specified="$CP"
6241        tool_basename="${tool_specified##*/}"
6242        if test "x$tool_basename" = "x$tool_specified"; then
6243          # A command without a complete path is provided, search $PATH.
6244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6245$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6246          # Extract the first word of "$tool_basename", so it can be a program name with args.
6247set dummy $tool_basename; ac_word=$2
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6249$as_echo_n "checking for $ac_word... " >&6; }
6250if ${ac_cv_path_CP+:} false; then :
6251  $as_echo_n "(cached) " >&6
6252else
6253  case $CP in
6254  [\\/]* | ?:[\\/]*)
6255  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6256  ;;
6257  *)
6258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259for as_dir in $PATH
6260do
6261  IFS=$as_save_IFS
6262  test -z "$as_dir" && as_dir=.
6263    for ac_exec_ext in '' $ac_executable_extensions; do
6264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6265    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6267    break 2
6268  fi
6269done
6270  done
6271IFS=$as_save_IFS
6272
6273  ;;
6274esac
6275fi
6276CP=$ac_cv_path_CP
6277if test -n "$CP"; then
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6279$as_echo "$CP" >&6; }
6280else
6281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6282$as_echo "no" >&6; }
6283fi
6284
6285
6286          if test "x$CP" = x; then
6287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6288          fi
6289        else
6290          # Otherwise we believe it is a complete path. Use it as it is.
6291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6292$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6294$as_echo_n "checking for CP... " >&6; }
6295          if test ! -x "$tool_specified"; then
6296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6297$as_echo "not found" >&6; }
6298            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6299          fi
6300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6301$as_echo "$tool_specified" >&6; }
6302        fi
6303      fi
6304    fi
6305
6306  fi
6307
6308
6309
6310  if test "x$CP" = x; then
6311    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6312  fi
6313
6314
6315
6316
6317
6318  # Publish this variable in the help.
6319
6320
6321  if [ -z "${CUT+x}" ]; then
6322    # The variable is not set by user, try to locate tool using the code snippet
6323    for ac_prog in cut
6324do
6325  # Extract the first word of "$ac_prog", so it can be a program name with args.
6326set dummy $ac_prog; ac_word=$2
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328$as_echo_n "checking for $ac_word... " >&6; }
6329if ${ac_cv_path_CUT+:} false; then :
6330  $as_echo_n "(cached) " >&6
6331else
6332  case $CUT in
6333  [\\/]* | ?:[\\/]*)
6334  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6335  ;;
6336  *)
6337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338for as_dir in $PATH
6339do
6340  IFS=$as_save_IFS
6341  test -z "$as_dir" && as_dir=.
6342    for ac_exec_ext in '' $ac_executable_extensions; do
6343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6344    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6346    break 2
6347  fi
6348done
6349  done
6350IFS=$as_save_IFS
6351
6352  ;;
6353esac
6354fi
6355CUT=$ac_cv_path_CUT
6356if test -n "$CUT"; then
6357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6358$as_echo "$CUT" >&6; }
6359else
6360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6361$as_echo "no" >&6; }
6362fi
6363
6364
6365  test -n "$CUT" && break
6366done
6367
6368  else
6369    # The variable is set, but is it from the command line or the environment?
6370
6371    # Try to remove the string !CUT! from our list.
6372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6374      # If it failed, the variable was not from the command line. Ignore it,
6375      # but warn the user (except for BASH, which is always set by the calling BASH).
6376      if test "xCUT" != xBASH; then
6377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6378$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6379      fi
6380      # Try to locate tool using the code snippet
6381      for ac_prog in cut
6382do
6383  # Extract the first word of "$ac_prog", so it can be a program name with args.
6384set dummy $ac_prog; ac_word=$2
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386$as_echo_n "checking for $ac_word... " >&6; }
6387if ${ac_cv_path_CUT+:} false; then :
6388  $as_echo_n "(cached) " >&6
6389else
6390  case $CUT in
6391  [\\/]* | ?:[\\/]*)
6392  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6393  ;;
6394  *)
6395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396for as_dir in $PATH
6397do
6398  IFS=$as_save_IFS
6399  test -z "$as_dir" && as_dir=.
6400    for ac_exec_ext in '' $ac_executable_extensions; do
6401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6402    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6404    break 2
6405  fi
6406done
6407  done
6408IFS=$as_save_IFS
6409
6410  ;;
6411esac
6412fi
6413CUT=$ac_cv_path_CUT
6414if test -n "$CUT"; then
6415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6416$as_echo "$CUT" >&6; }
6417else
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; }
6420fi
6421
6422
6423  test -n "$CUT" && break
6424done
6425
6426    else
6427      # If it succeeded, then it was overridden by the user. We will use it
6428      # for the tool.
6429
6430      # First remove it from the list of overridden variables, so we can test
6431      # for unknown variables in the end.
6432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6433
6434      # Check if we try to supply an empty value
6435      if test "x$CUT" = x; then
6436        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6437$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6439$as_echo_n "checking for CUT... " >&6; }
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6441$as_echo "disabled" >&6; }
6442      else
6443        # Check if the provided tool contains a complete path.
6444        tool_specified="$CUT"
6445        tool_basename="${tool_specified##*/}"
6446        if test "x$tool_basename" = "x$tool_specified"; then
6447          # A command without a complete path is provided, search $PATH.
6448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6449$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6450          # Extract the first word of "$tool_basename", so it can be a program name with args.
6451set dummy $tool_basename; ac_word=$2
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6453$as_echo_n "checking for $ac_word... " >&6; }
6454if ${ac_cv_path_CUT+:} false; then :
6455  $as_echo_n "(cached) " >&6
6456else
6457  case $CUT in
6458  [\\/]* | ?:[\\/]*)
6459  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6460  ;;
6461  *)
6462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6463for as_dir in $PATH
6464do
6465  IFS=$as_save_IFS
6466  test -z "$as_dir" && as_dir=.
6467    for ac_exec_ext in '' $ac_executable_extensions; do
6468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6469    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6471    break 2
6472  fi
6473done
6474  done
6475IFS=$as_save_IFS
6476
6477  ;;
6478esac
6479fi
6480CUT=$ac_cv_path_CUT
6481if test -n "$CUT"; then
6482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6483$as_echo "$CUT" >&6; }
6484else
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6486$as_echo "no" >&6; }
6487fi
6488
6489
6490          if test "x$CUT" = x; then
6491            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6492          fi
6493        else
6494          # Otherwise we believe it is a complete path. Use it as it is.
6495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6496$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6497          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6498$as_echo_n "checking for CUT... " >&6; }
6499          if test ! -x "$tool_specified"; then
6500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6501$as_echo "not found" >&6; }
6502            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6503          fi
6504          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6505$as_echo "$tool_specified" >&6; }
6506        fi
6507      fi
6508    fi
6509
6510  fi
6511
6512
6513
6514  if test "x$CUT" = x; then
6515    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6516  fi
6517
6518
6519
6520
6521
6522  # Publish this variable in the help.
6523
6524
6525  if [ -z "${DATE+x}" ]; then
6526    # The variable is not set by user, try to locate tool using the code snippet
6527    for ac_prog in date
6528do
6529  # Extract the first word of "$ac_prog", so it can be a program name with args.
6530set dummy $ac_prog; ac_word=$2
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532$as_echo_n "checking for $ac_word... " >&6; }
6533if ${ac_cv_path_DATE+:} false; then :
6534  $as_echo_n "(cached) " >&6
6535else
6536  case $DATE in
6537  [\\/]* | ?:[\\/]*)
6538  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6539  ;;
6540  *)
6541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in $PATH
6543do
6544  IFS=$as_save_IFS
6545  test -z "$as_dir" && as_dir=.
6546    for ac_exec_ext in '' $ac_executable_extensions; do
6547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550    break 2
6551  fi
6552done
6553  done
6554IFS=$as_save_IFS
6555
6556  ;;
6557esac
6558fi
6559DATE=$ac_cv_path_DATE
6560if test -n "$DATE"; then
6561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6562$as_echo "$DATE" >&6; }
6563else
6564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
6566fi
6567
6568
6569  test -n "$DATE" && break
6570done
6571
6572  else
6573    # The variable is set, but is it from the command line or the environment?
6574
6575    # Try to remove the string !DATE! from our list.
6576    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6577    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6578      # If it failed, the variable was not from the command line. Ignore it,
6579      # but warn the user (except for BASH, which is always set by the calling BASH).
6580      if test "xDATE" != xBASH; then
6581        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6582$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6583      fi
6584      # Try to locate tool using the code snippet
6585      for ac_prog in date
6586do
6587  # Extract the first word of "$ac_prog", so it can be a program name with args.
6588set dummy $ac_prog; ac_word=$2
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590$as_echo_n "checking for $ac_word... " >&6; }
6591if ${ac_cv_path_DATE+:} false; then :
6592  $as_echo_n "(cached) " >&6
6593else
6594  case $DATE in
6595  [\\/]* | ?:[\\/]*)
6596  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6597  ;;
6598  *)
6599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600for as_dir in $PATH
6601do
6602  IFS=$as_save_IFS
6603  test -z "$as_dir" && as_dir=.
6604    for ac_exec_ext in '' $ac_executable_extensions; do
6605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608    break 2
6609  fi
6610done
6611  done
6612IFS=$as_save_IFS
6613
6614  ;;
6615esac
6616fi
6617DATE=$ac_cv_path_DATE
6618if test -n "$DATE"; then
6619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6620$as_echo "$DATE" >&6; }
6621else
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623$as_echo "no" >&6; }
6624fi
6625
6626
6627  test -n "$DATE" && break
6628done
6629
6630    else
6631      # If it succeeded, then it was overridden by the user. We will use it
6632      # for the tool.
6633
6634      # First remove it from the list of overridden variables, so we can test
6635      # for unknown variables in the end.
6636      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6637
6638      # Check if we try to supply an empty value
6639      if test "x$DATE" = x; then
6640        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6641$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6643$as_echo_n "checking for DATE... " >&6; }
6644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6645$as_echo "disabled" >&6; }
6646      else
6647        # Check if the provided tool contains a complete path.
6648        tool_specified="$DATE"
6649        tool_basename="${tool_specified##*/}"
6650        if test "x$tool_basename" = "x$tool_specified"; then
6651          # A command without a complete path is provided, search $PATH.
6652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6653$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6654          # Extract the first word of "$tool_basename", so it can be a program name with args.
6655set dummy $tool_basename; ac_word=$2
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6657$as_echo_n "checking for $ac_word... " >&6; }
6658if ${ac_cv_path_DATE+:} false; then :
6659  $as_echo_n "(cached) " >&6
6660else
6661  case $DATE in
6662  [\\/]* | ?:[\\/]*)
6663  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6664  ;;
6665  *)
6666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6667for as_dir in $PATH
6668do
6669  IFS=$as_save_IFS
6670  test -z "$as_dir" && as_dir=.
6671    for ac_exec_ext in '' $ac_executable_extensions; do
6672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6673    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6675    break 2
6676  fi
6677done
6678  done
6679IFS=$as_save_IFS
6680
6681  ;;
6682esac
6683fi
6684DATE=$ac_cv_path_DATE
6685if test -n "$DATE"; then
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6687$as_echo "$DATE" >&6; }
6688else
6689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6690$as_echo "no" >&6; }
6691fi
6692
6693
6694          if test "x$DATE" = x; then
6695            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6696          fi
6697        else
6698          # Otherwise we believe it is a complete path. Use it as it is.
6699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6700$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6701          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6702$as_echo_n "checking for DATE... " >&6; }
6703          if test ! -x "$tool_specified"; then
6704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6705$as_echo "not found" >&6; }
6706            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6707          fi
6708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6709$as_echo "$tool_specified" >&6; }
6710        fi
6711      fi
6712    fi
6713
6714  fi
6715
6716
6717
6718  if test "x$DATE" = x; then
6719    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6720  fi
6721
6722
6723
6724
6725
6726  # Publish this variable in the help.
6727
6728
6729  if [ -z "${DIFF+x}" ]; then
6730    # The variable is not set by user, try to locate tool using the code snippet
6731    for ac_prog in gdiff diff
6732do
6733  # Extract the first word of "$ac_prog", so it can be a program name with args.
6734set dummy $ac_prog; ac_word=$2
6735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6736$as_echo_n "checking for $ac_word... " >&6; }
6737if ${ac_cv_path_DIFF+:} false; then :
6738  $as_echo_n "(cached) " >&6
6739else
6740  case $DIFF in
6741  [\\/]* | ?:[\\/]*)
6742  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6743  ;;
6744  *)
6745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6746for as_dir in $PATH
6747do
6748  IFS=$as_save_IFS
6749  test -z "$as_dir" && as_dir=.
6750    for ac_exec_ext in '' $ac_executable_extensions; do
6751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6752    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6754    break 2
6755  fi
6756done
6757  done
6758IFS=$as_save_IFS
6759
6760  ;;
6761esac
6762fi
6763DIFF=$ac_cv_path_DIFF
6764if test -n "$DIFF"; then
6765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6766$as_echo "$DIFF" >&6; }
6767else
6768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6769$as_echo "no" >&6; }
6770fi
6771
6772
6773  test -n "$DIFF" && break
6774done
6775
6776  else
6777    # The variable is set, but is it from the command line or the environment?
6778
6779    # Try to remove the string !DIFF! from our list.
6780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6782      # If it failed, the variable was not from the command line. Ignore it,
6783      # but warn the user (except for BASH, which is always set by the calling BASH).
6784      if test "xDIFF" != xBASH; then
6785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6786$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6787      fi
6788      # Try to locate tool using the code snippet
6789      for ac_prog in gdiff diff
6790do
6791  # Extract the first word of "$ac_prog", so it can be a program name with args.
6792set dummy $ac_prog; ac_word=$2
6793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6794$as_echo_n "checking for $ac_word... " >&6; }
6795if ${ac_cv_path_DIFF+:} false; then :
6796  $as_echo_n "(cached) " >&6
6797else
6798  case $DIFF in
6799  [\\/]* | ?:[\\/]*)
6800  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6801  ;;
6802  *)
6803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6804for as_dir in $PATH
6805do
6806  IFS=$as_save_IFS
6807  test -z "$as_dir" && as_dir=.
6808    for ac_exec_ext in '' $ac_executable_extensions; do
6809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6810    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6812    break 2
6813  fi
6814done
6815  done
6816IFS=$as_save_IFS
6817
6818  ;;
6819esac
6820fi
6821DIFF=$ac_cv_path_DIFF
6822if test -n "$DIFF"; then
6823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6824$as_echo "$DIFF" >&6; }
6825else
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6827$as_echo "no" >&6; }
6828fi
6829
6830
6831  test -n "$DIFF" && break
6832done
6833
6834    else
6835      # If it succeeded, then it was overridden by the user. We will use it
6836      # for the tool.
6837
6838      # First remove it from the list of overridden variables, so we can test
6839      # for unknown variables in the end.
6840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6841
6842      # Check if we try to supply an empty value
6843      if test "x$DIFF" = x; then
6844        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6845$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6846        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6847$as_echo_n "checking for DIFF... " >&6; }
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6849$as_echo "disabled" >&6; }
6850      else
6851        # Check if the provided tool contains a complete path.
6852        tool_specified="$DIFF"
6853        tool_basename="${tool_specified##*/}"
6854        if test "x$tool_basename" = "x$tool_specified"; then
6855          # A command without a complete path is provided, search $PATH.
6856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6857$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6858          # Extract the first word of "$tool_basename", so it can be a program name with args.
6859set dummy $tool_basename; ac_word=$2
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861$as_echo_n "checking for $ac_word... " >&6; }
6862if ${ac_cv_path_DIFF+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  case $DIFF in
6866  [\\/]* | ?:[\\/]*)
6867  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6868  ;;
6869  *)
6870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875    for ac_exec_ext in '' $ac_executable_extensions; do
6876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6877    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6879    break 2
6880  fi
6881done
6882  done
6883IFS=$as_save_IFS
6884
6885  ;;
6886esac
6887fi
6888DIFF=$ac_cv_path_DIFF
6889if test -n "$DIFF"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6891$as_echo "$DIFF" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896
6897
6898          if test "x$DIFF" = x; then
6899            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6900          fi
6901        else
6902          # Otherwise we believe it is a complete path. Use it as it is.
6903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6904$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6905          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6906$as_echo_n "checking for DIFF... " >&6; }
6907          if test ! -x "$tool_specified"; then
6908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6909$as_echo "not found" >&6; }
6910            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6911          fi
6912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6913$as_echo "$tool_specified" >&6; }
6914        fi
6915      fi
6916    fi
6917
6918  fi
6919
6920
6921
6922  if test "x$DIFF" = x; then
6923    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6924  fi
6925
6926
6927
6928
6929
6930  # Publish this variable in the help.
6931
6932
6933  if [ -z "${DIRNAME+x}" ]; then
6934    # The variable is not set by user, try to locate tool using the code snippet
6935    for ac_prog in dirname
6936do
6937  # Extract the first word of "$ac_prog", so it can be a program name with args.
6938set dummy $ac_prog; ac_word=$2
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6940$as_echo_n "checking for $ac_word... " >&6; }
6941if ${ac_cv_path_DIRNAME+:} false; then :
6942  $as_echo_n "(cached) " >&6
6943else
6944  case $DIRNAME in
6945  [\\/]* | ?:[\\/]*)
6946  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6947  ;;
6948  *)
6949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950for as_dir in $PATH
6951do
6952  IFS=$as_save_IFS
6953  test -z "$as_dir" && as_dir=.
6954    for ac_exec_ext in '' $ac_executable_extensions; do
6955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6956    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6958    break 2
6959  fi
6960done
6961  done
6962IFS=$as_save_IFS
6963
6964  ;;
6965esac
6966fi
6967DIRNAME=$ac_cv_path_DIRNAME
6968if test -n "$DIRNAME"; then
6969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6970$as_echo "$DIRNAME" >&6; }
6971else
6972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6973$as_echo "no" >&6; }
6974fi
6975
6976
6977  test -n "$DIRNAME" && break
6978done
6979
6980  else
6981    # The variable is set, but is it from the command line or the environment?
6982
6983    # Try to remove the string !DIRNAME! from our list.
6984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6986      # If it failed, the variable was not from the command line. Ignore it,
6987      # but warn the user (except for BASH, which is always set by the calling BASH).
6988      if test "xDIRNAME" != xBASH; then
6989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6990$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6991      fi
6992      # Try to locate tool using the code snippet
6993      for ac_prog in dirname
6994do
6995  # Extract the first word of "$ac_prog", so it can be a program name with args.
6996set dummy $ac_prog; ac_word=$2
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998$as_echo_n "checking for $ac_word... " >&6; }
6999if ${ac_cv_path_DIRNAME+:} false; then :
7000  $as_echo_n "(cached) " >&6
7001else
7002  case $DIRNAME in
7003  [\\/]* | ?:[\\/]*)
7004  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7005  ;;
7006  *)
7007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008for as_dir in $PATH
7009do
7010  IFS=$as_save_IFS
7011  test -z "$as_dir" && as_dir=.
7012    for ac_exec_ext in '' $ac_executable_extensions; do
7013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016    break 2
7017  fi
7018done
7019  done
7020IFS=$as_save_IFS
7021
7022  ;;
7023esac
7024fi
7025DIRNAME=$ac_cv_path_DIRNAME
7026if test -n "$DIRNAME"; then
7027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7028$as_echo "$DIRNAME" >&6; }
7029else
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7031$as_echo "no" >&6; }
7032fi
7033
7034
7035  test -n "$DIRNAME" && break
7036done
7037
7038    else
7039      # If it succeeded, then it was overridden by the user. We will use it
7040      # for the tool.
7041
7042      # First remove it from the list of overridden variables, so we can test
7043      # for unknown variables in the end.
7044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7045
7046      # Check if we try to supply an empty value
7047      if test "x$DIRNAME" = x; then
7048        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7049$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7051$as_echo_n "checking for DIRNAME... " >&6; }
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7053$as_echo "disabled" >&6; }
7054      else
7055        # Check if the provided tool contains a complete path.
7056        tool_specified="$DIRNAME"
7057        tool_basename="${tool_specified##*/}"
7058        if test "x$tool_basename" = "x$tool_specified"; then
7059          # A command without a complete path is provided, search $PATH.
7060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7061$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7062          # Extract the first word of "$tool_basename", so it can be a program name with args.
7063set dummy $tool_basename; 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_DIRNAME+:} false; then :
7067  $as_echo_n "(cached) " >&6
7068else
7069  case $DIRNAME in
7070  [\\/]* | ?:[\\/]*)
7071  ac_cv_path_DIRNAME="$DIRNAME" # 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_DIRNAME="$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
7092DIRNAME=$ac_cv_path_DIRNAME
7093if test -n "$DIRNAME"; then
7094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7095$as_echo "$DIRNAME" >&6; }
7096else
7097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7098$as_echo "no" >&6; }
7099fi
7100
7101
7102          if test "x$DIRNAME" = x; then
7103            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7104          fi
7105        else
7106          # Otherwise we believe it is a complete path. Use it as it is.
7107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7108$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7109          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7110$as_echo_n "checking for DIRNAME... " >&6; }
7111          if test ! -x "$tool_specified"; then
7112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7113$as_echo "not found" >&6; }
7114            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7115          fi
7116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7117$as_echo "$tool_specified" >&6; }
7118        fi
7119      fi
7120    fi
7121
7122  fi
7123
7124
7125
7126  if test "x$DIRNAME" = x; then
7127    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7128  fi
7129
7130
7131
7132
7133
7134  # Publish this variable in the help.
7135
7136
7137  if [ -z "${ECHO+x}" ]; then
7138    # The variable is not set by user, try to locate tool using the code snippet
7139    for ac_prog in echo
7140do
7141  # Extract the first word of "$ac_prog", so it can be a program name with args.
7142set dummy $ac_prog; ac_word=$2
7143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7144$as_echo_n "checking for $ac_word... " >&6; }
7145if ${ac_cv_path_ECHO+:} false; then :
7146  $as_echo_n "(cached) " >&6
7147else
7148  case $ECHO in
7149  [\\/]* | ?:[\\/]*)
7150  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7151  ;;
7152  *)
7153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7154for as_dir in $PATH
7155do
7156  IFS=$as_save_IFS
7157  test -z "$as_dir" && as_dir=.
7158    for ac_exec_ext in '' $ac_executable_extensions; do
7159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7160    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7162    break 2
7163  fi
7164done
7165  done
7166IFS=$as_save_IFS
7167
7168  ;;
7169esac
7170fi
7171ECHO=$ac_cv_path_ECHO
7172if test -n "$ECHO"; then
7173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7174$as_echo "$ECHO" >&6; }
7175else
7176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7177$as_echo "no" >&6; }
7178fi
7179
7180
7181  test -n "$ECHO" && break
7182done
7183
7184  else
7185    # The variable is set, but is it from the command line or the environment?
7186
7187    # Try to remove the string !ECHO! from our list.
7188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7190      # If it failed, the variable was not from the command line. Ignore it,
7191      # but warn the user (except for BASH, which is always set by the calling BASH).
7192      if test "xECHO" != xBASH; then
7193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7194$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7195      fi
7196      # Try to locate tool using the code snippet
7197      for ac_prog in echo
7198do
7199  # Extract the first word of "$ac_prog", so it can be a program name with args.
7200set dummy $ac_prog; ac_word=$2
7201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202$as_echo_n "checking for $ac_word... " >&6; }
7203if ${ac_cv_path_ECHO+:} false; then :
7204  $as_echo_n "(cached) " >&6
7205else
7206  case $ECHO in
7207  [\\/]* | ?:[\\/]*)
7208  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7209  ;;
7210  *)
7211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214  IFS=$as_save_IFS
7215  test -z "$as_dir" && as_dir=.
7216    for ac_exec_ext in '' $ac_executable_extensions; do
7217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220    break 2
7221  fi
7222done
7223  done
7224IFS=$as_save_IFS
7225
7226  ;;
7227esac
7228fi
7229ECHO=$ac_cv_path_ECHO
7230if test -n "$ECHO"; then
7231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7232$as_echo "$ECHO" >&6; }
7233else
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235$as_echo "no" >&6; }
7236fi
7237
7238
7239  test -n "$ECHO" && break
7240done
7241
7242    else
7243      # If it succeeded, then it was overridden by the user. We will use it
7244      # for the tool.
7245
7246      # First remove it from the list of overridden variables, so we can test
7247      # for unknown variables in the end.
7248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7249
7250      # Check if we try to supply an empty value
7251      if test "x$ECHO" = x; then
7252        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7253$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7255$as_echo_n "checking for ECHO... " >&6; }
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7257$as_echo "disabled" >&6; }
7258      else
7259        # Check if the provided tool contains a complete path.
7260        tool_specified="$ECHO"
7261        tool_basename="${tool_specified##*/}"
7262        if test "x$tool_basename" = "x$tool_specified"; then
7263          # A command without a complete path is provided, search $PATH.
7264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7265$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7266          # Extract the first word of "$tool_basename", so it can be a program name with args.
7267set dummy $tool_basename; ac_word=$2
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7269$as_echo_n "checking for $ac_word... " >&6; }
7270if ${ac_cv_path_ECHO+:} false; then :
7271  $as_echo_n "(cached) " >&6
7272else
7273  case $ECHO in
7274  [\\/]* | ?:[\\/]*)
7275  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7276  ;;
7277  *)
7278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7279for as_dir in $PATH
7280do
7281  IFS=$as_save_IFS
7282  test -z "$as_dir" && as_dir=.
7283    for ac_exec_ext in '' $ac_executable_extensions; do
7284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7285    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7287    break 2
7288  fi
7289done
7290  done
7291IFS=$as_save_IFS
7292
7293  ;;
7294esac
7295fi
7296ECHO=$ac_cv_path_ECHO
7297if test -n "$ECHO"; then
7298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7299$as_echo "$ECHO" >&6; }
7300else
7301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302$as_echo "no" >&6; }
7303fi
7304
7305
7306          if test "x$ECHO" = x; then
7307            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7308          fi
7309        else
7310          # Otherwise we believe it is a complete path. Use it as it is.
7311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7312$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7314$as_echo_n "checking for ECHO... " >&6; }
7315          if test ! -x "$tool_specified"; then
7316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7317$as_echo "not found" >&6; }
7318            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7319          fi
7320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7321$as_echo "$tool_specified" >&6; }
7322        fi
7323      fi
7324    fi
7325
7326  fi
7327
7328
7329
7330  if test "x$ECHO" = x; then
7331    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7332  fi
7333
7334
7335
7336
7337
7338  # Publish this variable in the help.
7339
7340
7341  if [ -z "${EXPR+x}" ]; then
7342    # The variable is not set by user, try to locate tool using the code snippet
7343    for ac_prog in expr
7344do
7345  # Extract the first word of "$ac_prog", so it can be a program name with args.
7346set dummy $ac_prog; ac_word=$2
7347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7348$as_echo_n "checking for $ac_word... " >&6; }
7349if ${ac_cv_path_EXPR+:} false; then :
7350  $as_echo_n "(cached) " >&6
7351else
7352  case $EXPR in
7353  [\\/]* | ?:[\\/]*)
7354  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7355  ;;
7356  *)
7357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358for as_dir in $PATH
7359do
7360  IFS=$as_save_IFS
7361  test -z "$as_dir" && as_dir=.
7362    for ac_exec_ext in '' $ac_executable_extensions; do
7363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7364    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7366    break 2
7367  fi
7368done
7369  done
7370IFS=$as_save_IFS
7371
7372  ;;
7373esac
7374fi
7375EXPR=$ac_cv_path_EXPR
7376if test -n "$EXPR"; then
7377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7378$as_echo "$EXPR" >&6; }
7379else
7380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381$as_echo "no" >&6; }
7382fi
7383
7384
7385  test -n "$EXPR" && break
7386done
7387
7388  else
7389    # The variable is set, but is it from the command line or the environment?
7390
7391    # Try to remove the string !EXPR! from our list.
7392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7394      # If it failed, the variable was not from the command line. Ignore it,
7395      # but warn the user (except for BASH, which is always set by the calling BASH).
7396      if test "xEXPR" != xBASH; then
7397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7398$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7399      fi
7400      # Try to locate tool using the code snippet
7401      for ac_prog in expr
7402do
7403  # Extract the first word of "$ac_prog", so it can be a program name with args.
7404set dummy $ac_prog; ac_word=$2
7405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7406$as_echo_n "checking for $ac_word... " >&6; }
7407if ${ac_cv_path_EXPR+:} false; then :
7408  $as_echo_n "(cached) " >&6
7409else
7410  case $EXPR in
7411  [\\/]* | ?:[\\/]*)
7412  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7413  ;;
7414  *)
7415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7416for as_dir in $PATH
7417do
7418  IFS=$as_save_IFS
7419  test -z "$as_dir" && as_dir=.
7420    for ac_exec_ext in '' $ac_executable_extensions; do
7421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7422    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7424    break 2
7425  fi
7426done
7427  done
7428IFS=$as_save_IFS
7429
7430  ;;
7431esac
7432fi
7433EXPR=$ac_cv_path_EXPR
7434if test -n "$EXPR"; then
7435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7436$as_echo "$EXPR" >&6; }
7437else
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7439$as_echo "no" >&6; }
7440fi
7441
7442
7443  test -n "$EXPR" && break
7444done
7445
7446    else
7447      # If it succeeded, then it was overridden by the user. We will use it
7448      # for the tool.
7449
7450      # First remove it from the list of overridden variables, so we can test
7451      # for unknown variables in the end.
7452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7453
7454      # Check if we try to supply an empty value
7455      if test "x$EXPR" = x; then
7456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7457$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7459$as_echo_n "checking for EXPR... " >&6; }
7460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7461$as_echo "disabled" >&6; }
7462      else
7463        # Check if the provided tool contains a complete path.
7464        tool_specified="$EXPR"
7465        tool_basename="${tool_specified##*/}"
7466        if test "x$tool_basename" = "x$tool_specified"; then
7467          # A command without a complete path is provided, search $PATH.
7468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7469$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7470          # Extract the first word of "$tool_basename", so it can be a program name with args.
7471set dummy $tool_basename; ac_word=$2
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473$as_echo_n "checking for $ac_word... " >&6; }
7474if ${ac_cv_path_EXPR+:} false; then :
7475  $as_echo_n "(cached) " >&6
7476else
7477  case $EXPR in
7478  [\\/]* | ?:[\\/]*)
7479  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7480  ;;
7481  *)
7482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7483for as_dir in $PATH
7484do
7485  IFS=$as_save_IFS
7486  test -z "$as_dir" && as_dir=.
7487    for ac_exec_ext in '' $ac_executable_extensions; do
7488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7489    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7491    break 2
7492  fi
7493done
7494  done
7495IFS=$as_save_IFS
7496
7497  ;;
7498esac
7499fi
7500EXPR=$ac_cv_path_EXPR
7501if test -n "$EXPR"; then
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7503$as_echo "$EXPR" >&6; }
7504else
7505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7506$as_echo "no" >&6; }
7507fi
7508
7509
7510          if test "x$EXPR" = x; then
7511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7512          fi
7513        else
7514          # Otherwise we believe it is a complete path. Use it as it is.
7515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7516$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7518$as_echo_n "checking for EXPR... " >&6; }
7519          if test ! -x "$tool_specified"; then
7520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7521$as_echo "not found" >&6; }
7522            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7523          fi
7524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7525$as_echo "$tool_specified" >&6; }
7526        fi
7527      fi
7528    fi
7529
7530  fi
7531
7532
7533
7534  if test "x$EXPR" = x; then
7535    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7536  fi
7537
7538
7539
7540
7541
7542  # Publish this variable in the help.
7543
7544
7545  if [ -z "${FILE+x}" ]; then
7546    # The variable is not set by user, try to locate tool using the code snippet
7547    for ac_prog in file
7548do
7549  # Extract the first word of "$ac_prog", so it can be a program name with args.
7550set dummy $ac_prog; ac_word=$2
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7552$as_echo_n "checking for $ac_word... " >&6; }
7553if ${ac_cv_path_FILE+:} false; then :
7554  $as_echo_n "(cached) " >&6
7555else
7556  case $FILE in
7557  [\\/]* | ?:[\\/]*)
7558  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7559  ;;
7560  *)
7561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7562for as_dir in $PATH
7563do
7564  IFS=$as_save_IFS
7565  test -z "$as_dir" && as_dir=.
7566    for ac_exec_ext in '' $ac_executable_extensions; do
7567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7568    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7570    break 2
7571  fi
7572done
7573  done
7574IFS=$as_save_IFS
7575
7576  ;;
7577esac
7578fi
7579FILE=$ac_cv_path_FILE
7580if test -n "$FILE"; then
7581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7582$as_echo "$FILE" >&6; }
7583else
7584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7585$as_echo "no" >&6; }
7586fi
7587
7588
7589  test -n "$FILE" && break
7590done
7591
7592  else
7593    # The variable is set, but is it from the command line or the environment?
7594
7595    # Try to remove the string !FILE! from our list.
7596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7598      # If it failed, the variable was not from the command line. Ignore it,
7599      # but warn the user (except for BASH, which is always set by the calling BASH).
7600      if test "xFILE" != xBASH; then
7601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7602$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7603      fi
7604      # Try to locate tool using the code snippet
7605      for ac_prog in file
7606do
7607  # Extract the first word of "$ac_prog", so it can be a program name with args.
7608set dummy $ac_prog; ac_word=$2
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7610$as_echo_n "checking for $ac_word... " >&6; }
7611if ${ac_cv_path_FILE+:} false; then :
7612  $as_echo_n "(cached) " >&6
7613else
7614  case $FILE in
7615  [\\/]* | ?:[\\/]*)
7616  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7617  ;;
7618  *)
7619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7620for as_dir in $PATH
7621do
7622  IFS=$as_save_IFS
7623  test -z "$as_dir" && as_dir=.
7624    for ac_exec_ext in '' $ac_executable_extensions; do
7625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7626    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7628    break 2
7629  fi
7630done
7631  done
7632IFS=$as_save_IFS
7633
7634  ;;
7635esac
7636fi
7637FILE=$ac_cv_path_FILE
7638if test -n "$FILE"; then
7639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7640$as_echo "$FILE" >&6; }
7641else
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643$as_echo "no" >&6; }
7644fi
7645
7646
7647  test -n "$FILE" && break
7648done
7649
7650    else
7651      # If it succeeded, then it was overridden by the user. We will use it
7652      # for the tool.
7653
7654      # First remove it from the list of overridden variables, so we can test
7655      # for unknown variables in the end.
7656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7657
7658      # Check if we try to supply an empty value
7659      if test "x$FILE" = x; then
7660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7661$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7663$as_echo_n "checking for FILE... " >&6; }
7664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7665$as_echo "disabled" >&6; }
7666      else
7667        # Check if the provided tool contains a complete path.
7668        tool_specified="$FILE"
7669        tool_basename="${tool_specified##*/}"
7670        if test "x$tool_basename" = "x$tool_specified"; then
7671          # A command without a complete path is provided, search $PATH.
7672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7673$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7674          # Extract the first word of "$tool_basename", so it can be a program name with args.
7675set dummy $tool_basename; ac_word=$2
7676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7677$as_echo_n "checking for $ac_word... " >&6; }
7678if ${ac_cv_path_FILE+:} false; then :
7679  $as_echo_n "(cached) " >&6
7680else
7681  case $FILE in
7682  [\\/]* | ?:[\\/]*)
7683  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7684  ;;
7685  *)
7686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7687for as_dir in $PATH
7688do
7689  IFS=$as_save_IFS
7690  test -z "$as_dir" && as_dir=.
7691    for ac_exec_ext in '' $ac_executable_extensions; do
7692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7693    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7695    break 2
7696  fi
7697done
7698  done
7699IFS=$as_save_IFS
7700
7701  ;;
7702esac
7703fi
7704FILE=$ac_cv_path_FILE
7705if test -n "$FILE"; then
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7707$as_echo "$FILE" >&6; }
7708else
7709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7710$as_echo "no" >&6; }
7711fi
7712
7713
7714          if test "x$FILE" = x; then
7715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7716          fi
7717        else
7718          # Otherwise we believe it is a complete path. Use it as it is.
7719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7720$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7722$as_echo_n "checking for FILE... " >&6; }
7723          if test ! -x "$tool_specified"; then
7724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7725$as_echo "not found" >&6; }
7726            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7727          fi
7728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7729$as_echo "$tool_specified" >&6; }
7730        fi
7731      fi
7732    fi
7733
7734  fi
7735
7736
7737
7738  if test "x$FILE" = x; then
7739    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7740  fi
7741
7742
7743
7744
7745
7746  # Publish this variable in the help.
7747
7748
7749  if [ -z "${FIND+x}" ]; then
7750    # The variable is not set by user, try to locate tool using the code snippet
7751    for ac_prog in find
7752do
7753  # Extract the first word of "$ac_prog", so it can be a program name with args.
7754set dummy $ac_prog; ac_word=$2
7755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7756$as_echo_n "checking for $ac_word... " >&6; }
7757if ${ac_cv_path_FIND+:} false; then :
7758  $as_echo_n "(cached) " >&6
7759else
7760  case $FIND in
7761  [\\/]* | ?:[\\/]*)
7762  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7763  ;;
7764  *)
7765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7766for as_dir in $PATH
7767do
7768  IFS=$as_save_IFS
7769  test -z "$as_dir" && as_dir=.
7770    for ac_exec_ext in '' $ac_executable_extensions; do
7771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7772    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7774    break 2
7775  fi
7776done
7777  done
7778IFS=$as_save_IFS
7779
7780  ;;
7781esac
7782fi
7783FIND=$ac_cv_path_FIND
7784if test -n "$FIND"; then
7785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7786$as_echo "$FIND" >&6; }
7787else
7788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7789$as_echo "no" >&6; }
7790fi
7791
7792
7793  test -n "$FIND" && break
7794done
7795
7796  else
7797    # The variable is set, but is it from the command line or the environment?
7798
7799    # Try to remove the string !FIND! from our list.
7800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7802      # If it failed, the variable was not from the command line. Ignore it,
7803      # but warn the user (except for BASH, which is always set by the calling BASH).
7804      if test "xFIND" != xBASH; then
7805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7806$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7807      fi
7808      # Try to locate tool using the code snippet
7809      for ac_prog in find
7810do
7811  # Extract the first word of "$ac_prog", so it can be a program name with args.
7812set dummy $ac_prog; ac_word=$2
7813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7814$as_echo_n "checking for $ac_word... " >&6; }
7815if ${ac_cv_path_FIND+:} false; then :
7816  $as_echo_n "(cached) " >&6
7817else
7818  case $FIND in
7819  [\\/]* | ?:[\\/]*)
7820  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7821  ;;
7822  *)
7823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7824for as_dir in $PATH
7825do
7826  IFS=$as_save_IFS
7827  test -z "$as_dir" && as_dir=.
7828    for ac_exec_ext in '' $ac_executable_extensions; do
7829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7830    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7832    break 2
7833  fi
7834done
7835  done
7836IFS=$as_save_IFS
7837
7838  ;;
7839esac
7840fi
7841FIND=$ac_cv_path_FIND
7842if test -n "$FIND"; then
7843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7844$as_echo "$FIND" >&6; }
7845else
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7847$as_echo "no" >&6; }
7848fi
7849
7850
7851  test -n "$FIND" && break
7852done
7853
7854    else
7855      # If it succeeded, then it was overridden by the user. We will use it
7856      # for the tool.
7857
7858      # First remove it from the list of overridden variables, so we can test
7859      # for unknown variables in the end.
7860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7861
7862      # Check if we try to supply an empty value
7863      if test "x$FIND" = x; then
7864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7865$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7867$as_echo_n "checking for FIND... " >&6; }
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7869$as_echo "disabled" >&6; }
7870      else
7871        # Check if the provided tool contains a complete path.
7872        tool_specified="$FIND"
7873        tool_basename="${tool_specified##*/}"
7874        if test "x$tool_basename" = "x$tool_specified"; then
7875          # A command without a complete path is provided, search $PATH.
7876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7877$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7878          # Extract the first word of "$tool_basename", so it can be a program name with args.
7879set dummy $tool_basename; ac_word=$2
7880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7881$as_echo_n "checking for $ac_word... " >&6; }
7882if ${ac_cv_path_FIND+:} false; then :
7883  $as_echo_n "(cached) " >&6
7884else
7885  case $FIND in
7886  [\\/]* | ?:[\\/]*)
7887  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7888  ;;
7889  *)
7890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7891for as_dir in $PATH
7892do
7893  IFS=$as_save_IFS
7894  test -z "$as_dir" && as_dir=.
7895    for ac_exec_ext in '' $ac_executable_extensions; do
7896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7897    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7899    break 2
7900  fi
7901done
7902  done
7903IFS=$as_save_IFS
7904
7905  ;;
7906esac
7907fi
7908FIND=$ac_cv_path_FIND
7909if test -n "$FIND"; then
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7911$as_echo "$FIND" >&6; }
7912else
7913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7914$as_echo "no" >&6; }
7915fi
7916
7917
7918          if test "x$FIND" = x; then
7919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7920          fi
7921        else
7922          # Otherwise we believe it is a complete path. Use it as it is.
7923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7924$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7926$as_echo_n "checking for FIND... " >&6; }
7927          if test ! -x "$tool_specified"; then
7928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7929$as_echo "not found" >&6; }
7930            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7931          fi
7932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7933$as_echo "$tool_specified" >&6; }
7934        fi
7935      fi
7936    fi
7937
7938  fi
7939
7940
7941
7942  if test "x$FIND" = x; then
7943    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7944  fi
7945
7946
7947
7948
7949
7950  # Publish this variable in the help.
7951
7952
7953  if [ -z "${HEAD+x}" ]; then
7954    # The variable is not set by user, try to locate tool using the code snippet
7955    for ac_prog in head
7956do
7957  # Extract the first word of "$ac_prog", so it can be a program name with args.
7958set dummy $ac_prog; ac_word=$2
7959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7960$as_echo_n "checking for $ac_word... " >&6; }
7961if ${ac_cv_path_HEAD+:} false; then :
7962  $as_echo_n "(cached) " >&6
7963else
7964  case $HEAD in
7965  [\\/]* | ?:[\\/]*)
7966  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7967  ;;
7968  *)
7969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7970for as_dir in $PATH
7971do
7972  IFS=$as_save_IFS
7973  test -z "$as_dir" && as_dir=.
7974    for ac_exec_ext in '' $ac_executable_extensions; do
7975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7976    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7978    break 2
7979  fi
7980done
7981  done
7982IFS=$as_save_IFS
7983
7984  ;;
7985esac
7986fi
7987HEAD=$ac_cv_path_HEAD
7988if test -n "$HEAD"; then
7989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7990$as_echo "$HEAD" >&6; }
7991else
7992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7993$as_echo "no" >&6; }
7994fi
7995
7996
7997  test -n "$HEAD" && break
7998done
7999
8000  else
8001    # The variable is set, but is it from the command line or the environment?
8002
8003    # Try to remove the string !HEAD! from our list.
8004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8006      # If it failed, the variable was not from the command line. Ignore it,
8007      # but warn the user (except for BASH, which is always set by the calling BASH).
8008      if test "xHEAD" != xBASH; then
8009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8010$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8011      fi
8012      # Try to locate tool using the code snippet
8013      for ac_prog in head
8014do
8015  # Extract the first word of "$ac_prog", so it can be a program name with args.
8016set dummy $ac_prog; ac_word=$2
8017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8018$as_echo_n "checking for $ac_word... " >&6; }
8019if ${ac_cv_path_HEAD+:} false; then :
8020  $as_echo_n "(cached) " >&6
8021else
8022  case $HEAD in
8023  [\\/]* | ?:[\\/]*)
8024  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8025  ;;
8026  *)
8027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8028for as_dir in $PATH
8029do
8030  IFS=$as_save_IFS
8031  test -z "$as_dir" && as_dir=.
8032    for ac_exec_ext in '' $ac_executable_extensions; do
8033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8034    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8036    break 2
8037  fi
8038done
8039  done
8040IFS=$as_save_IFS
8041
8042  ;;
8043esac
8044fi
8045HEAD=$ac_cv_path_HEAD
8046if test -n "$HEAD"; then
8047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8048$as_echo "$HEAD" >&6; }
8049else
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8051$as_echo "no" >&6; }
8052fi
8053
8054
8055  test -n "$HEAD" && break
8056done
8057
8058    else
8059      # If it succeeded, then it was overridden by the user. We will use it
8060      # for the tool.
8061
8062      # First remove it from the list of overridden variables, so we can test
8063      # for unknown variables in the end.
8064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8065
8066      # Check if we try to supply an empty value
8067      if test "x$HEAD" = x; then
8068        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8069$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8071$as_echo_n "checking for HEAD... " >&6; }
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8073$as_echo "disabled" >&6; }
8074      else
8075        # Check if the provided tool contains a complete path.
8076        tool_specified="$HEAD"
8077        tool_basename="${tool_specified##*/}"
8078        if test "x$tool_basename" = "x$tool_specified"; then
8079          # A command without a complete path is provided, search $PATH.
8080          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8081$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8082          # Extract the first word of "$tool_basename", so it can be a program name with args.
8083set dummy $tool_basename; ac_word=$2
8084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8085$as_echo_n "checking for $ac_word... " >&6; }
8086if ${ac_cv_path_HEAD+:} false; then :
8087  $as_echo_n "(cached) " >&6
8088else
8089  case $HEAD in
8090  [\\/]* | ?:[\\/]*)
8091  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8092  ;;
8093  *)
8094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8095for as_dir in $PATH
8096do
8097  IFS=$as_save_IFS
8098  test -z "$as_dir" && as_dir=.
8099    for ac_exec_ext in '' $ac_executable_extensions; do
8100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8101    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8103    break 2
8104  fi
8105done
8106  done
8107IFS=$as_save_IFS
8108
8109  ;;
8110esac
8111fi
8112HEAD=$ac_cv_path_HEAD
8113if test -n "$HEAD"; then
8114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8115$as_echo "$HEAD" >&6; }
8116else
8117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118$as_echo "no" >&6; }
8119fi
8120
8121
8122          if test "x$HEAD" = x; then
8123            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8124          fi
8125        else
8126          # Otherwise we believe it is a complete path. Use it as it is.
8127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8128$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8129          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8130$as_echo_n "checking for HEAD... " >&6; }
8131          if test ! -x "$tool_specified"; then
8132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8133$as_echo "not found" >&6; }
8134            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8135          fi
8136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8137$as_echo "$tool_specified" >&6; }
8138        fi
8139      fi
8140    fi
8141
8142  fi
8143
8144
8145
8146  if test "x$HEAD" = x; then
8147    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8148  fi
8149
8150
8151
8152
8153
8154  # Publish this variable in the help.
8155
8156
8157  if [ -z "${LN+x}" ]; then
8158    # The variable is not set by user, try to locate tool using the code snippet
8159    for ac_prog in ln
8160do
8161  # Extract the first word of "$ac_prog", so it can be a program name with args.
8162set dummy $ac_prog; ac_word=$2
8163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8164$as_echo_n "checking for $ac_word... " >&6; }
8165if ${ac_cv_path_LN+:} false; then :
8166  $as_echo_n "(cached) " >&6
8167else
8168  case $LN in
8169  [\\/]* | ?:[\\/]*)
8170  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8171  ;;
8172  *)
8173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8174for as_dir in $PATH
8175do
8176  IFS=$as_save_IFS
8177  test -z "$as_dir" && as_dir=.
8178    for ac_exec_ext in '' $ac_executable_extensions; do
8179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8180    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8182    break 2
8183  fi
8184done
8185  done
8186IFS=$as_save_IFS
8187
8188  ;;
8189esac
8190fi
8191LN=$ac_cv_path_LN
8192if test -n "$LN"; then
8193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8194$as_echo "$LN" >&6; }
8195else
8196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8197$as_echo "no" >&6; }
8198fi
8199
8200
8201  test -n "$LN" && break
8202done
8203
8204  else
8205    # The variable is set, but is it from the command line or the environment?
8206
8207    # Try to remove the string !LN! from our list.
8208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8210      # If it failed, the variable was not from the command line. Ignore it,
8211      # but warn the user (except for BASH, which is always set by the calling BASH).
8212      if test "xLN" != xBASH; then
8213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8214$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8215      fi
8216      # Try to locate tool using the code snippet
8217      for ac_prog in ln
8218do
8219  # Extract the first word of "$ac_prog", so it can be a program name with args.
8220set dummy $ac_prog; ac_word=$2
8221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8222$as_echo_n "checking for $ac_word... " >&6; }
8223if ${ac_cv_path_LN+:} false; then :
8224  $as_echo_n "(cached) " >&6
8225else
8226  case $LN in
8227  [\\/]* | ?:[\\/]*)
8228  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8229  ;;
8230  *)
8231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8232for as_dir in $PATH
8233do
8234  IFS=$as_save_IFS
8235  test -z "$as_dir" && as_dir=.
8236    for ac_exec_ext in '' $ac_executable_extensions; do
8237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8238    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8240    break 2
8241  fi
8242done
8243  done
8244IFS=$as_save_IFS
8245
8246  ;;
8247esac
8248fi
8249LN=$ac_cv_path_LN
8250if test -n "$LN"; then
8251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8252$as_echo "$LN" >&6; }
8253else
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8255$as_echo "no" >&6; }
8256fi
8257
8258
8259  test -n "$LN" && break
8260done
8261
8262    else
8263      # If it succeeded, then it was overridden by the user. We will use it
8264      # for the tool.
8265
8266      # First remove it from the list of overridden variables, so we can test
8267      # for unknown variables in the end.
8268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8269
8270      # Check if we try to supply an empty value
8271      if test "x$LN" = x; then
8272        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8273$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8275$as_echo_n "checking for LN... " >&6; }
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8277$as_echo "disabled" >&6; }
8278      else
8279        # Check if the provided tool contains a complete path.
8280        tool_specified="$LN"
8281        tool_basename="${tool_specified##*/}"
8282        if test "x$tool_basename" = "x$tool_specified"; then
8283          # A command without a complete path is provided, search $PATH.
8284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8285$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8286          # Extract the first word of "$tool_basename", so it can be a program name with args.
8287set dummy $tool_basename; ac_word=$2
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8289$as_echo_n "checking for $ac_word... " >&6; }
8290if ${ac_cv_path_LN+:} false; then :
8291  $as_echo_n "(cached) " >&6
8292else
8293  case $LN in
8294  [\\/]* | ?:[\\/]*)
8295  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8296  ;;
8297  *)
8298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8299for as_dir in $PATH
8300do
8301  IFS=$as_save_IFS
8302  test -z "$as_dir" && as_dir=.
8303    for ac_exec_ext in '' $ac_executable_extensions; do
8304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8305    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8307    break 2
8308  fi
8309done
8310  done
8311IFS=$as_save_IFS
8312
8313  ;;
8314esac
8315fi
8316LN=$ac_cv_path_LN
8317if test -n "$LN"; then
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8319$as_echo "$LN" >&6; }
8320else
8321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322$as_echo "no" >&6; }
8323fi
8324
8325
8326          if test "x$LN" = x; then
8327            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8328          fi
8329        else
8330          # Otherwise we believe it is a complete path. Use it as it is.
8331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8332$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8333          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8334$as_echo_n "checking for LN... " >&6; }
8335          if test ! -x "$tool_specified"; then
8336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8337$as_echo "not found" >&6; }
8338            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8339          fi
8340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8341$as_echo "$tool_specified" >&6; }
8342        fi
8343      fi
8344    fi
8345
8346  fi
8347
8348
8349
8350  if test "x$LN" = x; then
8351    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8352  fi
8353
8354
8355
8356
8357
8358  # Publish this variable in the help.
8359
8360
8361  if [ -z "${LS+x}" ]; then
8362    # The variable is not set by user, try to locate tool using the code snippet
8363    for ac_prog in ls
8364do
8365  # Extract the first word of "$ac_prog", so it can be a program name with args.
8366set dummy $ac_prog; ac_word=$2
8367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8368$as_echo_n "checking for $ac_word... " >&6; }
8369if ${ac_cv_path_LS+:} false; then :
8370  $as_echo_n "(cached) " >&6
8371else
8372  case $LS in
8373  [\\/]* | ?:[\\/]*)
8374  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8375  ;;
8376  *)
8377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8378for as_dir in $PATH
8379do
8380  IFS=$as_save_IFS
8381  test -z "$as_dir" && as_dir=.
8382    for ac_exec_ext in '' $ac_executable_extensions; do
8383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8384    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8386    break 2
8387  fi
8388done
8389  done
8390IFS=$as_save_IFS
8391
8392  ;;
8393esac
8394fi
8395LS=$ac_cv_path_LS
8396if test -n "$LS"; then
8397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8398$as_echo "$LS" >&6; }
8399else
8400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8401$as_echo "no" >&6; }
8402fi
8403
8404
8405  test -n "$LS" && break
8406done
8407
8408  else
8409    # The variable is set, but is it from the command line or the environment?
8410
8411    # Try to remove the string !LS! from our list.
8412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8414      # If it failed, the variable was not from the command line. Ignore it,
8415      # but warn the user (except for BASH, which is always set by the calling BASH).
8416      if test "xLS" != xBASH; then
8417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8418$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8419      fi
8420      # Try to locate tool using the code snippet
8421      for ac_prog in ls
8422do
8423  # Extract the first word of "$ac_prog", so it can be a program name with args.
8424set dummy $ac_prog; ac_word=$2
8425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8426$as_echo_n "checking for $ac_word... " >&6; }
8427if ${ac_cv_path_LS+:} false; then :
8428  $as_echo_n "(cached) " >&6
8429else
8430  case $LS in
8431  [\\/]* | ?:[\\/]*)
8432  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8433  ;;
8434  *)
8435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8436for as_dir in $PATH
8437do
8438  IFS=$as_save_IFS
8439  test -z "$as_dir" && as_dir=.
8440    for ac_exec_ext in '' $ac_executable_extensions; do
8441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8442    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8444    break 2
8445  fi
8446done
8447  done
8448IFS=$as_save_IFS
8449
8450  ;;
8451esac
8452fi
8453LS=$ac_cv_path_LS
8454if test -n "$LS"; then
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8456$as_echo "$LS" >&6; }
8457else
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459$as_echo "no" >&6; }
8460fi
8461
8462
8463  test -n "$LS" && break
8464done
8465
8466    else
8467      # If it succeeded, then it was overridden by the user. We will use it
8468      # for the tool.
8469
8470      # First remove it from the list of overridden variables, so we can test
8471      # for unknown variables in the end.
8472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8473
8474      # Check if we try to supply an empty value
8475      if test "x$LS" = x; then
8476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8477$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8479$as_echo_n "checking for LS... " >&6; }
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8481$as_echo "disabled" >&6; }
8482      else
8483        # Check if the provided tool contains a complete path.
8484        tool_specified="$LS"
8485        tool_basename="${tool_specified##*/}"
8486        if test "x$tool_basename" = "x$tool_specified"; then
8487          # A command without a complete path is provided, search $PATH.
8488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8489$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8490          # Extract the first word of "$tool_basename", so it can be a program name with args.
8491set dummy $tool_basename; ac_word=$2
8492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8493$as_echo_n "checking for $ac_word... " >&6; }
8494if ${ac_cv_path_LS+:} false; then :
8495  $as_echo_n "(cached) " >&6
8496else
8497  case $LS in
8498  [\\/]* | ?:[\\/]*)
8499  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8500  ;;
8501  *)
8502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8503for as_dir in $PATH
8504do
8505  IFS=$as_save_IFS
8506  test -z "$as_dir" && as_dir=.
8507    for ac_exec_ext in '' $ac_executable_extensions; do
8508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8509    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8511    break 2
8512  fi
8513done
8514  done
8515IFS=$as_save_IFS
8516
8517  ;;
8518esac
8519fi
8520LS=$ac_cv_path_LS
8521if test -n "$LS"; then
8522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8523$as_echo "$LS" >&6; }
8524else
8525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8526$as_echo "no" >&6; }
8527fi
8528
8529
8530          if test "x$LS" = x; then
8531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8532          fi
8533        else
8534          # Otherwise we believe it is a complete path. Use it as it is.
8535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8536$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8538$as_echo_n "checking for LS... " >&6; }
8539          if test ! -x "$tool_specified"; then
8540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8541$as_echo "not found" >&6; }
8542            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8543          fi
8544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8545$as_echo "$tool_specified" >&6; }
8546        fi
8547      fi
8548    fi
8549
8550  fi
8551
8552
8553
8554  if test "x$LS" = x; then
8555    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8556  fi
8557
8558
8559
8560
8561
8562  # Publish this variable in the help.
8563
8564
8565  if [ -z "${MKDIR+x}" ]; then
8566    # The variable is not set by user, try to locate tool using the code snippet
8567    for ac_prog in mkdir
8568do
8569  # Extract the first word of "$ac_prog", so it can be a program name with args.
8570set dummy $ac_prog; ac_word=$2
8571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8572$as_echo_n "checking for $ac_word... " >&6; }
8573if ${ac_cv_path_MKDIR+:} false; then :
8574  $as_echo_n "(cached) " >&6
8575else
8576  case $MKDIR in
8577  [\\/]* | ?:[\\/]*)
8578  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8579  ;;
8580  *)
8581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8582for as_dir in $PATH
8583do
8584  IFS=$as_save_IFS
8585  test -z "$as_dir" && as_dir=.
8586    for ac_exec_ext in '' $ac_executable_extensions; do
8587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8588    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8590    break 2
8591  fi
8592done
8593  done
8594IFS=$as_save_IFS
8595
8596  ;;
8597esac
8598fi
8599MKDIR=$ac_cv_path_MKDIR
8600if test -n "$MKDIR"; then
8601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8602$as_echo "$MKDIR" >&6; }
8603else
8604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605$as_echo "no" >&6; }
8606fi
8607
8608
8609  test -n "$MKDIR" && break
8610done
8611
8612  else
8613    # The variable is set, but is it from the command line or the environment?
8614
8615    # Try to remove the string !MKDIR! from our list.
8616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8618      # If it failed, the variable was not from the command line. Ignore it,
8619      # but warn the user (except for BASH, which is always set by the calling BASH).
8620      if test "xMKDIR" != xBASH; then
8621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8622$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8623      fi
8624      # Try to locate tool using the code snippet
8625      for ac_prog in mkdir
8626do
8627  # Extract the first word of "$ac_prog", so it can be a program name with args.
8628set dummy $ac_prog; ac_word=$2
8629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8630$as_echo_n "checking for $ac_word... " >&6; }
8631if ${ac_cv_path_MKDIR+:} false; then :
8632  $as_echo_n "(cached) " >&6
8633else
8634  case $MKDIR in
8635  [\\/]* | ?:[\\/]*)
8636  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8637  ;;
8638  *)
8639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8640for as_dir in $PATH
8641do
8642  IFS=$as_save_IFS
8643  test -z "$as_dir" && as_dir=.
8644    for ac_exec_ext in '' $ac_executable_extensions; do
8645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8646    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8648    break 2
8649  fi
8650done
8651  done
8652IFS=$as_save_IFS
8653
8654  ;;
8655esac
8656fi
8657MKDIR=$ac_cv_path_MKDIR
8658if test -n "$MKDIR"; then
8659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8660$as_echo "$MKDIR" >&6; }
8661else
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8663$as_echo "no" >&6; }
8664fi
8665
8666
8667  test -n "$MKDIR" && break
8668done
8669
8670    else
8671      # If it succeeded, then it was overridden by the user. We will use it
8672      # for the tool.
8673
8674      # First remove it from the list of overridden variables, so we can test
8675      # for unknown variables in the end.
8676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8677
8678      # Check if we try to supply an empty value
8679      if test "x$MKDIR" = x; then
8680        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8681$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8683$as_echo_n "checking for MKDIR... " >&6; }
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8685$as_echo "disabled" >&6; }
8686      else
8687        # Check if the provided tool contains a complete path.
8688        tool_specified="$MKDIR"
8689        tool_basename="${tool_specified##*/}"
8690        if test "x$tool_basename" = "x$tool_specified"; then
8691          # A command without a complete path is provided, search $PATH.
8692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8693$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8694          # Extract the first word of "$tool_basename", so it can be a program name with args.
8695set dummy $tool_basename; ac_word=$2
8696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8697$as_echo_n "checking for $ac_word... " >&6; }
8698if ${ac_cv_path_MKDIR+:} false; then :
8699  $as_echo_n "(cached) " >&6
8700else
8701  case $MKDIR in
8702  [\\/]* | ?:[\\/]*)
8703  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8704  ;;
8705  *)
8706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707for as_dir in $PATH
8708do
8709  IFS=$as_save_IFS
8710  test -z "$as_dir" && as_dir=.
8711    for ac_exec_ext in '' $ac_executable_extensions; do
8712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8713    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8715    break 2
8716  fi
8717done
8718  done
8719IFS=$as_save_IFS
8720
8721  ;;
8722esac
8723fi
8724MKDIR=$ac_cv_path_MKDIR
8725if test -n "$MKDIR"; then
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8727$as_echo "$MKDIR" >&6; }
8728else
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730$as_echo "no" >&6; }
8731fi
8732
8733
8734          if test "x$MKDIR" = x; then
8735            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8736          fi
8737        else
8738          # Otherwise we believe it is a complete path. Use it as it is.
8739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8740$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8741          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8742$as_echo_n "checking for MKDIR... " >&6; }
8743          if test ! -x "$tool_specified"; then
8744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8745$as_echo "not found" >&6; }
8746            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8747          fi
8748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8749$as_echo "$tool_specified" >&6; }
8750        fi
8751      fi
8752    fi
8753
8754  fi
8755
8756
8757
8758  if test "x$MKDIR" = x; then
8759    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8760  fi
8761
8762
8763
8764
8765
8766  # Publish this variable in the help.
8767
8768
8769  if [ -z "${MKTEMP+x}" ]; then
8770    # The variable is not set by user, try to locate tool using the code snippet
8771    for ac_prog in mktemp
8772do
8773  # Extract the first word of "$ac_prog", so it can be a program name with args.
8774set dummy $ac_prog; ac_word=$2
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8776$as_echo_n "checking for $ac_word... " >&6; }
8777if ${ac_cv_path_MKTEMP+:} false; then :
8778  $as_echo_n "(cached) " >&6
8779else
8780  case $MKTEMP in
8781  [\\/]* | ?:[\\/]*)
8782  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8783  ;;
8784  *)
8785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8786for as_dir in $PATH
8787do
8788  IFS=$as_save_IFS
8789  test -z "$as_dir" && as_dir=.
8790    for ac_exec_ext in '' $ac_executable_extensions; do
8791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8792    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8794    break 2
8795  fi
8796done
8797  done
8798IFS=$as_save_IFS
8799
8800  ;;
8801esac
8802fi
8803MKTEMP=$ac_cv_path_MKTEMP
8804if test -n "$MKTEMP"; then
8805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8806$as_echo "$MKTEMP" >&6; }
8807else
8808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8809$as_echo "no" >&6; }
8810fi
8811
8812
8813  test -n "$MKTEMP" && break
8814done
8815
8816  else
8817    # The variable is set, but is it from the command line or the environment?
8818
8819    # Try to remove the string !MKTEMP! from our list.
8820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8822      # If it failed, the variable was not from the command line. Ignore it,
8823      # but warn the user (except for BASH, which is always set by the calling BASH).
8824      if test "xMKTEMP" != xBASH; then
8825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8826$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8827      fi
8828      # Try to locate tool using the code snippet
8829      for ac_prog in mktemp
8830do
8831  # Extract the first word of "$ac_prog", so it can be a program name with args.
8832set dummy $ac_prog; ac_word=$2
8833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8834$as_echo_n "checking for $ac_word... " >&6; }
8835if ${ac_cv_path_MKTEMP+:} false; then :
8836  $as_echo_n "(cached) " >&6
8837else
8838  case $MKTEMP in
8839  [\\/]* | ?:[\\/]*)
8840  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8841  ;;
8842  *)
8843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8844for as_dir in $PATH
8845do
8846  IFS=$as_save_IFS
8847  test -z "$as_dir" && as_dir=.
8848    for ac_exec_ext in '' $ac_executable_extensions; do
8849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8850    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8852    break 2
8853  fi
8854done
8855  done
8856IFS=$as_save_IFS
8857
8858  ;;
8859esac
8860fi
8861MKTEMP=$ac_cv_path_MKTEMP
8862if test -n "$MKTEMP"; then
8863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8864$as_echo "$MKTEMP" >&6; }
8865else
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
8868fi
8869
8870
8871  test -n "$MKTEMP" && break
8872done
8873
8874    else
8875      # If it succeeded, then it was overridden by the user. We will use it
8876      # for the tool.
8877
8878      # First remove it from the list of overridden variables, so we can test
8879      # for unknown variables in the end.
8880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8881
8882      # Check if we try to supply an empty value
8883      if test "x$MKTEMP" = x; then
8884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8885$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8887$as_echo_n "checking for MKTEMP... " >&6; }
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8889$as_echo "disabled" >&6; }
8890      else
8891        # Check if the provided tool contains a complete path.
8892        tool_specified="$MKTEMP"
8893        tool_basename="${tool_specified##*/}"
8894        if test "x$tool_basename" = "x$tool_specified"; then
8895          # A command without a complete path is provided, search $PATH.
8896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8897$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8898          # Extract the first word of "$tool_basename", so it can be a program name with args.
8899set dummy $tool_basename; ac_word=$2
8900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8901$as_echo_n "checking for $ac_word... " >&6; }
8902if ${ac_cv_path_MKTEMP+:} false; then :
8903  $as_echo_n "(cached) " >&6
8904else
8905  case $MKTEMP in
8906  [\\/]* | ?:[\\/]*)
8907  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8908  ;;
8909  *)
8910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8911for as_dir in $PATH
8912do
8913  IFS=$as_save_IFS
8914  test -z "$as_dir" && as_dir=.
8915    for ac_exec_ext in '' $ac_executable_extensions; do
8916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8917    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8919    break 2
8920  fi
8921done
8922  done
8923IFS=$as_save_IFS
8924
8925  ;;
8926esac
8927fi
8928MKTEMP=$ac_cv_path_MKTEMP
8929if test -n "$MKTEMP"; then
8930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8931$as_echo "$MKTEMP" >&6; }
8932else
8933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8934$as_echo "no" >&6; }
8935fi
8936
8937
8938          if test "x$MKTEMP" = x; then
8939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8940          fi
8941        else
8942          # Otherwise we believe it is a complete path. Use it as it is.
8943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8944$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8946$as_echo_n "checking for MKTEMP... " >&6; }
8947          if test ! -x "$tool_specified"; then
8948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8949$as_echo "not found" >&6; }
8950            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8951          fi
8952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8953$as_echo "$tool_specified" >&6; }
8954        fi
8955      fi
8956    fi
8957
8958  fi
8959
8960
8961
8962  if test "x$MKTEMP" = x; then
8963    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8964  fi
8965
8966
8967
8968
8969
8970  # Publish this variable in the help.
8971
8972
8973  if [ -z "${MV+x}" ]; then
8974    # The variable is not set by user, try to locate tool using the code snippet
8975    for ac_prog in mv
8976do
8977  # Extract the first word of "$ac_prog", so it can be a program name with args.
8978set dummy $ac_prog; ac_word=$2
8979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8980$as_echo_n "checking for $ac_word... " >&6; }
8981if ${ac_cv_path_MV+:} false; then :
8982  $as_echo_n "(cached) " >&6
8983else
8984  case $MV in
8985  [\\/]* | ?:[\\/]*)
8986  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8987  ;;
8988  *)
8989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8990for as_dir in $PATH
8991do
8992  IFS=$as_save_IFS
8993  test -z "$as_dir" && as_dir=.
8994    for ac_exec_ext in '' $ac_executable_extensions; do
8995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8996    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8998    break 2
8999  fi
9000done
9001  done
9002IFS=$as_save_IFS
9003
9004  ;;
9005esac
9006fi
9007MV=$ac_cv_path_MV
9008if test -n "$MV"; then
9009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9010$as_echo "$MV" >&6; }
9011else
9012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013$as_echo "no" >&6; }
9014fi
9015
9016
9017  test -n "$MV" && break
9018done
9019
9020  else
9021    # The variable is set, but is it from the command line or the environment?
9022
9023    # Try to remove the string !MV! from our list.
9024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9026      # If it failed, the variable was not from the command line. Ignore it,
9027      # but warn the user (except for BASH, which is always set by the calling BASH).
9028      if test "xMV" != xBASH; then
9029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9030$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9031      fi
9032      # Try to locate tool using the code snippet
9033      for ac_prog in mv
9034do
9035  # Extract the first word of "$ac_prog", so it can be a program name with args.
9036set dummy $ac_prog; ac_word=$2
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9038$as_echo_n "checking for $ac_word... " >&6; }
9039if ${ac_cv_path_MV+:} false; then :
9040  $as_echo_n "(cached) " >&6
9041else
9042  case $MV in
9043  [\\/]* | ?:[\\/]*)
9044  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9045  ;;
9046  *)
9047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9048for as_dir in $PATH
9049do
9050  IFS=$as_save_IFS
9051  test -z "$as_dir" && as_dir=.
9052    for ac_exec_ext in '' $ac_executable_extensions; do
9053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9054    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9056    break 2
9057  fi
9058done
9059  done
9060IFS=$as_save_IFS
9061
9062  ;;
9063esac
9064fi
9065MV=$ac_cv_path_MV
9066if test -n "$MV"; then
9067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9068$as_echo "$MV" >&6; }
9069else
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
9072fi
9073
9074
9075  test -n "$MV" && break
9076done
9077
9078    else
9079      # If it succeeded, then it was overridden by the user. We will use it
9080      # for the tool.
9081
9082      # First remove it from the list of overridden variables, so we can test
9083      # for unknown variables in the end.
9084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9085
9086      # Check if we try to supply an empty value
9087      if test "x$MV" = x; then
9088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9089$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9091$as_echo_n "checking for MV... " >&6; }
9092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9093$as_echo "disabled" >&6; }
9094      else
9095        # Check if the provided tool contains a complete path.
9096        tool_specified="$MV"
9097        tool_basename="${tool_specified##*/}"
9098        if test "x$tool_basename" = "x$tool_specified"; then
9099          # A command without a complete path is provided, search $PATH.
9100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9101$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9102          # Extract the first word of "$tool_basename", so it can be a program name with args.
9103set dummy $tool_basename; ac_word=$2
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9105$as_echo_n "checking for $ac_word... " >&6; }
9106if ${ac_cv_path_MV+:} false; then :
9107  $as_echo_n "(cached) " >&6
9108else
9109  case $MV in
9110  [\\/]* | ?:[\\/]*)
9111  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9112  ;;
9113  *)
9114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9115for as_dir in $PATH
9116do
9117  IFS=$as_save_IFS
9118  test -z "$as_dir" && as_dir=.
9119    for ac_exec_ext in '' $ac_executable_extensions; do
9120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9121    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9123    break 2
9124  fi
9125done
9126  done
9127IFS=$as_save_IFS
9128
9129  ;;
9130esac
9131fi
9132MV=$ac_cv_path_MV
9133if test -n "$MV"; then
9134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9135$as_echo "$MV" >&6; }
9136else
9137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9138$as_echo "no" >&6; }
9139fi
9140
9141
9142          if test "x$MV" = x; then
9143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9144          fi
9145        else
9146          # Otherwise we believe it is a complete path. Use it as it is.
9147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9148$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9150$as_echo_n "checking for MV... " >&6; }
9151          if test ! -x "$tool_specified"; then
9152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9153$as_echo "not found" >&6; }
9154            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9155          fi
9156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9157$as_echo "$tool_specified" >&6; }
9158        fi
9159      fi
9160    fi
9161
9162  fi
9163
9164
9165
9166  if test "x$MV" = x; then
9167    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9168  fi
9169
9170
9171
9172
9173
9174  # Publish this variable in the help.
9175
9176
9177  if [ -z "${NAWK+x}" ]; then
9178    # The variable is not set by user, try to locate tool using the code snippet
9179    for ac_prog in nawk gawk awk
9180do
9181  # Extract the first word of "$ac_prog", so it can be a program name with args.
9182set dummy $ac_prog; ac_word=$2
9183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9184$as_echo_n "checking for $ac_word... " >&6; }
9185if ${ac_cv_path_NAWK+:} false; then :
9186  $as_echo_n "(cached) " >&6
9187else
9188  case $NAWK in
9189  [\\/]* | ?:[\\/]*)
9190  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9191  ;;
9192  *)
9193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9194for as_dir in $PATH
9195do
9196  IFS=$as_save_IFS
9197  test -z "$as_dir" && as_dir=.
9198    for ac_exec_ext in '' $ac_executable_extensions; do
9199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9200    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9202    break 2
9203  fi
9204done
9205  done
9206IFS=$as_save_IFS
9207
9208  ;;
9209esac
9210fi
9211NAWK=$ac_cv_path_NAWK
9212if test -n "$NAWK"; then
9213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9214$as_echo "$NAWK" >&6; }
9215else
9216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
9218fi
9219
9220
9221  test -n "$NAWK" && break
9222done
9223
9224  else
9225    # The variable is set, but is it from the command line or the environment?
9226
9227    # Try to remove the string !NAWK! from our list.
9228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9230      # If it failed, the variable was not from the command line. Ignore it,
9231      # but warn the user (except for BASH, which is always set by the calling BASH).
9232      if test "xNAWK" != xBASH; then
9233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9234$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9235      fi
9236      # Try to locate tool using the code snippet
9237      for ac_prog in nawk gawk awk
9238do
9239  # Extract the first word of "$ac_prog", so it can be a program name with args.
9240set dummy $ac_prog; ac_word=$2
9241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9242$as_echo_n "checking for $ac_word... " >&6; }
9243if ${ac_cv_path_NAWK+:} false; then :
9244  $as_echo_n "(cached) " >&6
9245else
9246  case $NAWK in
9247  [\\/]* | ?:[\\/]*)
9248  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9249  ;;
9250  *)
9251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9252for as_dir in $PATH
9253do
9254  IFS=$as_save_IFS
9255  test -z "$as_dir" && as_dir=.
9256    for ac_exec_ext in '' $ac_executable_extensions; do
9257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9258    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9260    break 2
9261  fi
9262done
9263  done
9264IFS=$as_save_IFS
9265
9266  ;;
9267esac
9268fi
9269NAWK=$ac_cv_path_NAWK
9270if test -n "$NAWK"; then
9271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9272$as_echo "$NAWK" >&6; }
9273else
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
9276fi
9277
9278
9279  test -n "$NAWK" && break
9280done
9281
9282    else
9283      # If it succeeded, then it was overridden by the user. We will use it
9284      # for the tool.
9285
9286      # First remove it from the list of overridden variables, so we can test
9287      # for unknown variables in the end.
9288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9289
9290      # Check if we try to supply an empty value
9291      if test "x$NAWK" = x; then
9292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9293$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9295$as_echo_n "checking for NAWK... " >&6; }
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9297$as_echo "disabled" >&6; }
9298      else
9299        # Check if the provided tool contains a complete path.
9300        tool_specified="$NAWK"
9301        tool_basename="${tool_specified##*/}"
9302        if test "x$tool_basename" = "x$tool_specified"; then
9303          # A command without a complete path is provided, search $PATH.
9304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9305$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9306          # Extract the first word of "$tool_basename", so it can be a program name with args.
9307set dummy $tool_basename; ac_word=$2
9308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9309$as_echo_n "checking for $ac_word... " >&6; }
9310if ${ac_cv_path_NAWK+:} false; then :
9311  $as_echo_n "(cached) " >&6
9312else
9313  case $NAWK in
9314  [\\/]* | ?:[\\/]*)
9315  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9316  ;;
9317  *)
9318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319for as_dir in $PATH
9320do
9321  IFS=$as_save_IFS
9322  test -z "$as_dir" && as_dir=.
9323    for ac_exec_ext in '' $ac_executable_extensions; do
9324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327    break 2
9328  fi
9329done
9330  done
9331IFS=$as_save_IFS
9332
9333  ;;
9334esac
9335fi
9336NAWK=$ac_cv_path_NAWK
9337if test -n "$NAWK"; then
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9339$as_echo "$NAWK" >&6; }
9340else
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342$as_echo "no" >&6; }
9343fi
9344
9345
9346          if test "x$NAWK" = x; then
9347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9348          fi
9349        else
9350          # Otherwise we believe it is a complete path. Use it as it is.
9351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9352$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9354$as_echo_n "checking for NAWK... " >&6; }
9355          if test ! -x "$tool_specified"; then
9356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9357$as_echo "not found" >&6; }
9358            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9359          fi
9360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9361$as_echo "$tool_specified" >&6; }
9362        fi
9363      fi
9364    fi
9365
9366  fi
9367
9368
9369
9370  if test "x$NAWK" = x; then
9371    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9372  fi
9373
9374
9375
9376
9377
9378  # Publish this variable in the help.
9379
9380
9381  if [ -z "${PRINTF+x}" ]; then
9382    # The variable is not set by user, try to locate tool using the code snippet
9383    for ac_prog in printf
9384do
9385  # Extract the first word of "$ac_prog", so it can be a program name with args.
9386set dummy $ac_prog; ac_word=$2
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388$as_echo_n "checking for $ac_word... " >&6; }
9389if ${ac_cv_path_PRINTF+:} false; then :
9390  $as_echo_n "(cached) " >&6
9391else
9392  case $PRINTF in
9393  [\\/]* | ?:[\\/]*)
9394  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9395  ;;
9396  *)
9397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398for as_dir in $PATH
9399do
9400  IFS=$as_save_IFS
9401  test -z "$as_dir" && as_dir=.
9402    for ac_exec_ext in '' $ac_executable_extensions; do
9403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406    break 2
9407  fi
9408done
9409  done
9410IFS=$as_save_IFS
9411
9412  ;;
9413esac
9414fi
9415PRINTF=$ac_cv_path_PRINTF
9416if test -n "$PRINTF"; then
9417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9418$as_echo "$PRINTF" >&6; }
9419else
9420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
9422fi
9423
9424
9425  test -n "$PRINTF" && break
9426done
9427
9428  else
9429    # The variable is set, but is it from the command line or the environment?
9430
9431    # Try to remove the string !PRINTF! from our list.
9432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9434      # If it failed, the variable was not from the command line. Ignore it,
9435      # but warn the user (except for BASH, which is always set by the calling BASH).
9436      if test "xPRINTF" != xBASH; then
9437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9438$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9439      fi
9440      # Try to locate tool using the code snippet
9441      for ac_prog in printf
9442do
9443  # Extract the first word of "$ac_prog", so it can be a program name with args.
9444set dummy $ac_prog; ac_word=$2
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9446$as_echo_n "checking for $ac_word... " >&6; }
9447if ${ac_cv_path_PRINTF+:} false; then :
9448  $as_echo_n "(cached) " >&6
9449else
9450  case $PRINTF in
9451  [\\/]* | ?:[\\/]*)
9452  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9453  ;;
9454  *)
9455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9456for as_dir in $PATH
9457do
9458  IFS=$as_save_IFS
9459  test -z "$as_dir" && as_dir=.
9460    for ac_exec_ext in '' $ac_executable_extensions; do
9461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9462    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9464    break 2
9465  fi
9466done
9467  done
9468IFS=$as_save_IFS
9469
9470  ;;
9471esac
9472fi
9473PRINTF=$ac_cv_path_PRINTF
9474if test -n "$PRINTF"; then
9475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9476$as_echo "$PRINTF" >&6; }
9477else
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
9480fi
9481
9482
9483  test -n "$PRINTF" && break
9484done
9485
9486    else
9487      # If it succeeded, then it was overridden by the user. We will use it
9488      # for the tool.
9489
9490      # First remove it from the list of overridden variables, so we can test
9491      # for unknown variables in the end.
9492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9493
9494      # Check if we try to supply an empty value
9495      if test "x$PRINTF" = x; then
9496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9497$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9499$as_echo_n "checking for PRINTF... " >&6; }
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9501$as_echo "disabled" >&6; }
9502      else
9503        # Check if the provided tool contains a complete path.
9504        tool_specified="$PRINTF"
9505        tool_basename="${tool_specified##*/}"
9506        if test "x$tool_basename" = "x$tool_specified"; then
9507          # A command without a complete path is provided, search $PATH.
9508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9509$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9510          # Extract the first word of "$tool_basename", so it can be a program name with args.
9511set dummy $tool_basename; ac_word=$2
9512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9513$as_echo_n "checking for $ac_word... " >&6; }
9514if ${ac_cv_path_PRINTF+:} false; then :
9515  $as_echo_n "(cached) " >&6
9516else
9517  case $PRINTF in
9518  [\\/]* | ?:[\\/]*)
9519  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9520  ;;
9521  *)
9522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9523for as_dir in $PATH
9524do
9525  IFS=$as_save_IFS
9526  test -z "$as_dir" && as_dir=.
9527    for ac_exec_ext in '' $ac_executable_extensions; do
9528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9529    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9531    break 2
9532  fi
9533done
9534  done
9535IFS=$as_save_IFS
9536
9537  ;;
9538esac
9539fi
9540PRINTF=$ac_cv_path_PRINTF
9541if test -n "$PRINTF"; then
9542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9543$as_echo "$PRINTF" >&6; }
9544else
9545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9546$as_echo "no" >&6; }
9547fi
9548
9549
9550          if test "x$PRINTF" = x; then
9551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9552          fi
9553        else
9554          # Otherwise we believe it is a complete path. Use it as it is.
9555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9556$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9558$as_echo_n "checking for PRINTF... " >&6; }
9559          if test ! -x "$tool_specified"; then
9560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9561$as_echo "not found" >&6; }
9562            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9563          fi
9564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9565$as_echo "$tool_specified" >&6; }
9566        fi
9567      fi
9568    fi
9569
9570  fi
9571
9572
9573
9574  if test "x$PRINTF" = x; then
9575    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9576  fi
9577
9578
9579
9580
9581
9582  # Publish this variable in the help.
9583
9584
9585  if [ -z "${RM+x}" ]; then
9586    # The variable is not set by user, try to locate tool using the code snippet
9587    for ac_prog in rm
9588do
9589  # Extract the first word of "$ac_prog", so it can be a program name with args.
9590set dummy $ac_prog; ac_word=$2
9591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9592$as_echo_n "checking for $ac_word... " >&6; }
9593if ${ac_cv_path_RM+:} false; then :
9594  $as_echo_n "(cached) " >&6
9595else
9596  case $RM in
9597  [\\/]* | ?:[\\/]*)
9598  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9599  ;;
9600  *)
9601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602for as_dir in $PATH
9603do
9604  IFS=$as_save_IFS
9605  test -z "$as_dir" && as_dir=.
9606    for ac_exec_ext in '' $ac_executable_extensions; do
9607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9608    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610    break 2
9611  fi
9612done
9613  done
9614IFS=$as_save_IFS
9615
9616  ;;
9617esac
9618fi
9619RM=$ac_cv_path_RM
9620if test -n "$RM"; then
9621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9622$as_echo "$RM" >&6; }
9623else
9624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625$as_echo "no" >&6; }
9626fi
9627
9628
9629  test -n "$RM" && break
9630done
9631
9632  else
9633    # The variable is set, but is it from the command line or the environment?
9634
9635    # Try to remove the string !RM! from our list.
9636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9638      # If it failed, the variable was not from the command line. Ignore it,
9639      # but warn the user (except for BASH, which is always set by the calling BASH).
9640      if test "xRM" != xBASH; then
9641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9642$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9643      fi
9644      # Try to locate tool using the code snippet
9645      for ac_prog in rm
9646do
9647  # Extract the first word of "$ac_prog", so it can be a program name with args.
9648set dummy $ac_prog; ac_word=$2
9649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9650$as_echo_n "checking for $ac_word... " >&6; }
9651if ${ac_cv_path_RM+:} false; then :
9652  $as_echo_n "(cached) " >&6
9653else
9654  case $RM in
9655  [\\/]* | ?:[\\/]*)
9656  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9657  ;;
9658  *)
9659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9660for as_dir in $PATH
9661do
9662  IFS=$as_save_IFS
9663  test -z "$as_dir" && as_dir=.
9664    for ac_exec_ext in '' $ac_executable_extensions; do
9665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9666    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9668    break 2
9669  fi
9670done
9671  done
9672IFS=$as_save_IFS
9673
9674  ;;
9675esac
9676fi
9677RM=$ac_cv_path_RM
9678if test -n "$RM"; then
9679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9680$as_echo "$RM" >&6; }
9681else
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683$as_echo "no" >&6; }
9684fi
9685
9686
9687  test -n "$RM" && break
9688done
9689
9690    else
9691      # If it succeeded, then it was overridden by the user. We will use it
9692      # for the tool.
9693
9694      # First remove it from the list of overridden variables, so we can test
9695      # for unknown variables in the end.
9696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9697
9698      # Check if we try to supply an empty value
9699      if test "x$RM" = x; then
9700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9701$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9703$as_echo_n "checking for RM... " >&6; }
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9705$as_echo "disabled" >&6; }
9706      else
9707        # Check if the provided tool contains a complete path.
9708        tool_specified="$RM"
9709        tool_basename="${tool_specified##*/}"
9710        if test "x$tool_basename" = "x$tool_specified"; then
9711          # A command without a complete path is provided, search $PATH.
9712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9713$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9714          # Extract the first word of "$tool_basename", so it can be a program name with args.
9715set dummy $tool_basename; ac_word=$2
9716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9717$as_echo_n "checking for $ac_word... " >&6; }
9718if ${ac_cv_path_RM+:} false; then :
9719  $as_echo_n "(cached) " >&6
9720else
9721  case $RM in
9722  [\\/]* | ?:[\\/]*)
9723  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9724  ;;
9725  *)
9726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9727for as_dir in $PATH
9728do
9729  IFS=$as_save_IFS
9730  test -z "$as_dir" && as_dir=.
9731    for ac_exec_ext in '' $ac_executable_extensions; do
9732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9733    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9735    break 2
9736  fi
9737done
9738  done
9739IFS=$as_save_IFS
9740
9741  ;;
9742esac
9743fi
9744RM=$ac_cv_path_RM
9745if test -n "$RM"; then
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9747$as_echo "$RM" >&6; }
9748else
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750$as_echo "no" >&6; }
9751fi
9752
9753
9754          if test "x$RM" = x; then
9755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9756          fi
9757        else
9758          # Otherwise we believe it is a complete path. Use it as it is.
9759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9760$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9762$as_echo_n "checking for RM... " >&6; }
9763          if test ! -x "$tool_specified"; then
9764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9765$as_echo "not found" >&6; }
9766            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9767          fi
9768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9769$as_echo "$tool_specified" >&6; }
9770        fi
9771      fi
9772    fi
9773
9774  fi
9775
9776
9777
9778  if test "x$RM" = x; then
9779    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9780  fi
9781
9782
9783
9784
9785
9786  # Publish this variable in the help.
9787
9788
9789  if [ -z "${RMDIR+x}" ]; then
9790    # The variable is not set by user, try to locate tool using the code snippet
9791    for ac_prog in rmdir
9792do
9793  # Extract the first word of "$ac_prog", so it can be a program name with args.
9794set dummy $ac_prog; ac_word=$2
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796$as_echo_n "checking for $ac_word... " >&6; }
9797if ${ac_cv_path_RMDIR+:} false; then :
9798  $as_echo_n "(cached) " >&6
9799else
9800  case $RMDIR in
9801  [\\/]* | ?:[\\/]*)
9802  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9803  ;;
9804  *)
9805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806for as_dir in $PATH
9807do
9808  IFS=$as_save_IFS
9809  test -z "$as_dir" && as_dir=.
9810    for ac_exec_ext in '' $ac_executable_extensions; do
9811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9812    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814    break 2
9815  fi
9816done
9817  done
9818IFS=$as_save_IFS
9819
9820  ;;
9821esac
9822fi
9823RMDIR=$ac_cv_path_RMDIR
9824if test -n "$RMDIR"; then
9825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9826$as_echo "$RMDIR" >&6; }
9827else
9828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829$as_echo "no" >&6; }
9830fi
9831
9832
9833  test -n "$RMDIR" && break
9834done
9835
9836  else
9837    # The variable is set, but is it from the command line or the environment?
9838
9839    # Try to remove the string !RMDIR! from our list.
9840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9842      # If it failed, the variable was not from the command line. Ignore it,
9843      # but warn the user (except for BASH, which is always set by the calling BASH).
9844      if test "xRMDIR" != xBASH; then
9845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9846$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9847      fi
9848      # Try to locate tool using the code snippet
9849      for ac_prog in rmdir
9850do
9851  # Extract the first word of "$ac_prog", so it can be a program name with args.
9852set dummy $ac_prog; ac_word=$2
9853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9854$as_echo_n "checking for $ac_word... " >&6; }
9855if ${ac_cv_path_RMDIR+:} false; then :
9856  $as_echo_n "(cached) " >&6
9857else
9858  case $RMDIR in
9859  [\\/]* | ?:[\\/]*)
9860  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9861  ;;
9862  *)
9863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9864for as_dir in $PATH
9865do
9866  IFS=$as_save_IFS
9867  test -z "$as_dir" && as_dir=.
9868    for ac_exec_ext in '' $ac_executable_extensions; do
9869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9870    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9872    break 2
9873  fi
9874done
9875  done
9876IFS=$as_save_IFS
9877
9878  ;;
9879esac
9880fi
9881RMDIR=$ac_cv_path_RMDIR
9882if test -n "$RMDIR"; then
9883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9884$as_echo "$RMDIR" >&6; }
9885else
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887$as_echo "no" >&6; }
9888fi
9889
9890
9891  test -n "$RMDIR" && break
9892done
9893
9894    else
9895      # If it succeeded, then it was overridden by the user. We will use it
9896      # for the tool.
9897
9898      # First remove it from the list of overridden variables, so we can test
9899      # for unknown variables in the end.
9900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9901
9902      # Check if we try to supply an empty value
9903      if test "x$RMDIR" = x; then
9904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9905$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9907$as_echo_n "checking for RMDIR... " >&6; }
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9909$as_echo "disabled" >&6; }
9910      else
9911        # Check if the provided tool contains a complete path.
9912        tool_specified="$RMDIR"
9913        tool_basename="${tool_specified##*/}"
9914        if test "x$tool_basename" = "x$tool_specified"; then
9915          # A command without a complete path is provided, search $PATH.
9916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9917$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9918          # Extract the first word of "$tool_basename", so it can be a program name with args.
9919set dummy $tool_basename; ac_word=$2
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921$as_echo_n "checking for $ac_word... " >&6; }
9922if ${ac_cv_path_RMDIR+:} false; then :
9923  $as_echo_n "(cached) " >&6
9924else
9925  case $RMDIR in
9926  [\\/]* | ?:[\\/]*)
9927  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9928  ;;
9929  *)
9930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931for as_dir in $PATH
9932do
9933  IFS=$as_save_IFS
9934  test -z "$as_dir" && as_dir=.
9935    for ac_exec_ext in '' $ac_executable_extensions; do
9936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939    break 2
9940  fi
9941done
9942  done
9943IFS=$as_save_IFS
9944
9945  ;;
9946esac
9947fi
9948RMDIR=$ac_cv_path_RMDIR
9949if test -n "$RMDIR"; then
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9951$as_echo "$RMDIR" >&6; }
9952else
9953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954$as_echo "no" >&6; }
9955fi
9956
9957
9958          if test "x$RMDIR" = x; then
9959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9960          fi
9961        else
9962          # Otherwise we believe it is a complete path. Use it as it is.
9963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9964$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9966$as_echo_n "checking for RMDIR... " >&6; }
9967          if test ! -x "$tool_specified"; then
9968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9969$as_echo "not found" >&6; }
9970            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9971          fi
9972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9973$as_echo "$tool_specified" >&6; }
9974        fi
9975      fi
9976    fi
9977
9978  fi
9979
9980
9981
9982  if test "x$RMDIR" = x; then
9983    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9984  fi
9985
9986
9987
9988
9989
9990  # Publish this variable in the help.
9991
9992
9993  if [ -z "${SH+x}" ]; then
9994    # The variable is not set by user, try to locate tool using the code snippet
9995    for ac_prog in sh
9996do
9997  # Extract the first word of "$ac_prog", so it can be a program name with args.
9998set dummy $ac_prog; ac_word=$2
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10000$as_echo_n "checking for $ac_word... " >&6; }
10001if ${ac_cv_path_SH+:} false; then :
10002  $as_echo_n "(cached) " >&6
10003else
10004  case $SH in
10005  [\\/]* | ?:[\\/]*)
10006  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10007  ;;
10008  *)
10009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10010for as_dir in $PATH
10011do
10012  IFS=$as_save_IFS
10013  test -z "$as_dir" && as_dir=.
10014    for ac_exec_ext in '' $ac_executable_extensions; do
10015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10016    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10018    break 2
10019  fi
10020done
10021  done
10022IFS=$as_save_IFS
10023
10024  ;;
10025esac
10026fi
10027SH=$ac_cv_path_SH
10028if test -n "$SH"; then
10029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10030$as_echo "$SH" >&6; }
10031else
10032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033$as_echo "no" >&6; }
10034fi
10035
10036
10037  test -n "$SH" && break
10038done
10039
10040  else
10041    # The variable is set, but is it from the command line or the environment?
10042
10043    # Try to remove the string !SH! from our list.
10044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10046      # If it failed, the variable was not from the command line. Ignore it,
10047      # but warn the user (except for BASH, which is always set by the calling BASH).
10048      if test "xSH" != xBASH; then
10049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10050$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10051      fi
10052      # Try to locate tool using the code snippet
10053      for ac_prog in sh
10054do
10055  # Extract the first word of "$ac_prog", so it can be a program name with args.
10056set dummy $ac_prog; ac_word=$2
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10058$as_echo_n "checking for $ac_word... " >&6; }
10059if ${ac_cv_path_SH+:} false; then :
10060  $as_echo_n "(cached) " >&6
10061else
10062  case $SH in
10063  [\\/]* | ?:[\\/]*)
10064  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10065  ;;
10066  *)
10067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10068for as_dir in $PATH
10069do
10070  IFS=$as_save_IFS
10071  test -z "$as_dir" && as_dir=.
10072    for ac_exec_ext in '' $ac_executable_extensions; do
10073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10074    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10076    break 2
10077  fi
10078done
10079  done
10080IFS=$as_save_IFS
10081
10082  ;;
10083esac
10084fi
10085SH=$ac_cv_path_SH
10086if test -n "$SH"; then
10087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10088$as_echo "$SH" >&6; }
10089else
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
10092fi
10093
10094
10095  test -n "$SH" && break
10096done
10097
10098    else
10099      # If it succeeded, then it was overridden by the user. We will use it
10100      # for the tool.
10101
10102      # First remove it from the list of overridden variables, so we can test
10103      # for unknown variables in the end.
10104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10105
10106      # Check if we try to supply an empty value
10107      if test "x$SH" = x; then
10108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10109$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10111$as_echo_n "checking for SH... " >&6; }
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10113$as_echo "disabled" >&6; }
10114      else
10115        # Check if the provided tool contains a complete path.
10116        tool_specified="$SH"
10117        tool_basename="${tool_specified##*/}"
10118        if test "x$tool_basename" = "x$tool_specified"; then
10119          # A command without a complete path is provided, search $PATH.
10120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10121$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10122          # Extract the first word of "$tool_basename", so it can be a program name with args.
10123set dummy $tool_basename; ac_word=$2
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10125$as_echo_n "checking for $ac_word... " >&6; }
10126if ${ac_cv_path_SH+:} false; then :
10127  $as_echo_n "(cached) " >&6
10128else
10129  case $SH in
10130  [\\/]* | ?:[\\/]*)
10131  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10132  ;;
10133  *)
10134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10135for as_dir in $PATH
10136do
10137  IFS=$as_save_IFS
10138  test -z "$as_dir" && as_dir=.
10139    for ac_exec_ext in '' $ac_executable_extensions; do
10140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10141    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10143    break 2
10144  fi
10145done
10146  done
10147IFS=$as_save_IFS
10148
10149  ;;
10150esac
10151fi
10152SH=$ac_cv_path_SH
10153if test -n "$SH"; then
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10155$as_echo "$SH" >&6; }
10156else
10157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10158$as_echo "no" >&6; }
10159fi
10160
10161
10162          if test "x$SH" = x; then
10163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10164          fi
10165        else
10166          # Otherwise we believe it is a complete path. Use it as it is.
10167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10168$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10170$as_echo_n "checking for SH... " >&6; }
10171          if test ! -x "$tool_specified"; then
10172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10173$as_echo "not found" >&6; }
10174            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10175          fi
10176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10177$as_echo "$tool_specified" >&6; }
10178        fi
10179      fi
10180    fi
10181
10182  fi
10183
10184
10185
10186  if test "x$SH" = x; then
10187    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10188  fi
10189
10190
10191
10192
10193
10194  # Publish this variable in the help.
10195
10196
10197  if [ -z "${SORT+x}" ]; then
10198    # The variable is not set by user, try to locate tool using the code snippet
10199    for ac_prog in sort
10200do
10201  # Extract the first word of "$ac_prog", so it can be a program name with args.
10202set dummy $ac_prog; ac_word=$2
10203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10204$as_echo_n "checking for $ac_word... " >&6; }
10205if ${ac_cv_path_SORT+:} false; then :
10206  $as_echo_n "(cached) " >&6
10207else
10208  case $SORT in
10209  [\\/]* | ?:[\\/]*)
10210  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10211  ;;
10212  *)
10213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10214for as_dir in $PATH
10215do
10216  IFS=$as_save_IFS
10217  test -z "$as_dir" && as_dir=.
10218    for ac_exec_ext in '' $ac_executable_extensions; do
10219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10220    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10222    break 2
10223  fi
10224done
10225  done
10226IFS=$as_save_IFS
10227
10228  ;;
10229esac
10230fi
10231SORT=$ac_cv_path_SORT
10232if test -n "$SORT"; then
10233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10234$as_echo "$SORT" >&6; }
10235else
10236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237$as_echo "no" >&6; }
10238fi
10239
10240
10241  test -n "$SORT" && break
10242done
10243
10244  else
10245    # The variable is set, but is it from the command line or the environment?
10246
10247    # Try to remove the string !SORT! from our list.
10248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10250      # If it failed, the variable was not from the command line. Ignore it,
10251      # but warn the user (except for BASH, which is always set by the calling BASH).
10252      if test "xSORT" != xBASH; then
10253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10254$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10255      fi
10256      # Try to locate tool using the code snippet
10257      for ac_prog in sort
10258do
10259  # Extract the first word of "$ac_prog", so it can be a program name with args.
10260set dummy $ac_prog; ac_word=$2
10261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10262$as_echo_n "checking for $ac_word... " >&6; }
10263if ${ac_cv_path_SORT+:} false; then :
10264  $as_echo_n "(cached) " >&6
10265else
10266  case $SORT in
10267  [\\/]* | ?:[\\/]*)
10268  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10269  ;;
10270  *)
10271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10272for as_dir in $PATH
10273do
10274  IFS=$as_save_IFS
10275  test -z "$as_dir" && as_dir=.
10276    for ac_exec_ext in '' $ac_executable_extensions; do
10277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10278    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10280    break 2
10281  fi
10282done
10283  done
10284IFS=$as_save_IFS
10285
10286  ;;
10287esac
10288fi
10289SORT=$ac_cv_path_SORT
10290if test -n "$SORT"; then
10291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10292$as_echo "$SORT" >&6; }
10293else
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295$as_echo "no" >&6; }
10296fi
10297
10298
10299  test -n "$SORT" && break
10300done
10301
10302    else
10303      # If it succeeded, then it was overridden by the user. We will use it
10304      # for the tool.
10305
10306      # First remove it from the list of overridden variables, so we can test
10307      # for unknown variables in the end.
10308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10309
10310      # Check if we try to supply an empty value
10311      if test "x$SORT" = x; then
10312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10313$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10315$as_echo_n "checking for SORT... " >&6; }
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10317$as_echo "disabled" >&6; }
10318      else
10319        # Check if the provided tool contains a complete path.
10320        tool_specified="$SORT"
10321        tool_basename="${tool_specified##*/}"
10322        if test "x$tool_basename" = "x$tool_specified"; then
10323          # A command without a complete path is provided, search $PATH.
10324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10325$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10326          # Extract the first word of "$tool_basename", so it can be a program name with args.
10327set dummy $tool_basename; ac_word=$2
10328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10329$as_echo_n "checking for $ac_word... " >&6; }
10330if ${ac_cv_path_SORT+:} false; then :
10331  $as_echo_n "(cached) " >&6
10332else
10333  case $SORT in
10334  [\\/]* | ?:[\\/]*)
10335  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10336  ;;
10337  *)
10338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10339for as_dir in $PATH
10340do
10341  IFS=$as_save_IFS
10342  test -z "$as_dir" && as_dir=.
10343    for ac_exec_ext in '' $ac_executable_extensions; do
10344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10345    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10347    break 2
10348  fi
10349done
10350  done
10351IFS=$as_save_IFS
10352
10353  ;;
10354esac
10355fi
10356SORT=$ac_cv_path_SORT
10357if test -n "$SORT"; then
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10359$as_echo "$SORT" >&6; }
10360else
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10362$as_echo "no" >&6; }
10363fi
10364
10365
10366          if test "x$SORT" = x; then
10367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10368          fi
10369        else
10370          # Otherwise we believe it is a complete path. Use it as it is.
10371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10372$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10374$as_echo_n "checking for SORT... " >&6; }
10375          if test ! -x "$tool_specified"; then
10376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10377$as_echo "not found" >&6; }
10378            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10379          fi
10380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10381$as_echo "$tool_specified" >&6; }
10382        fi
10383      fi
10384    fi
10385
10386  fi
10387
10388
10389
10390  if test "x$SORT" = x; then
10391    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10392  fi
10393
10394
10395
10396
10397
10398  # Publish this variable in the help.
10399
10400
10401  if [ -z "${TAIL+x}" ]; then
10402    # The variable is not set by user, try to locate tool using the code snippet
10403    for ac_prog in tail
10404do
10405  # Extract the first word of "$ac_prog", so it can be a program name with args.
10406set dummy $ac_prog; ac_word=$2
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10408$as_echo_n "checking for $ac_word... " >&6; }
10409if ${ac_cv_path_TAIL+:} false; then :
10410  $as_echo_n "(cached) " >&6
10411else
10412  case $TAIL in
10413  [\\/]* | ?:[\\/]*)
10414  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10415  ;;
10416  *)
10417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10418for as_dir in $PATH
10419do
10420  IFS=$as_save_IFS
10421  test -z "$as_dir" && as_dir=.
10422    for ac_exec_ext in '' $ac_executable_extensions; do
10423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10424    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10426    break 2
10427  fi
10428done
10429  done
10430IFS=$as_save_IFS
10431
10432  ;;
10433esac
10434fi
10435TAIL=$ac_cv_path_TAIL
10436if test -n "$TAIL"; then
10437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10438$as_echo "$TAIL" >&6; }
10439else
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441$as_echo "no" >&6; }
10442fi
10443
10444
10445  test -n "$TAIL" && break
10446done
10447
10448  else
10449    # The variable is set, but is it from the command line or the environment?
10450
10451    # Try to remove the string !TAIL! from our list.
10452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10454      # If it failed, the variable was not from the command line. Ignore it,
10455      # but warn the user (except for BASH, which is always set by the calling BASH).
10456      if test "xTAIL" != xBASH; then
10457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10458$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10459      fi
10460      # Try to locate tool using the code snippet
10461      for ac_prog in tail
10462do
10463  # Extract the first word of "$ac_prog", so it can be a program name with args.
10464set dummy $ac_prog; ac_word=$2
10465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10466$as_echo_n "checking for $ac_word... " >&6; }
10467if ${ac_cv_path_TAIL+:} false; then :
10468  $as_echo_n "(cached) " >&6
10469else
10470  case $TAIL in
10471  [\\/]* | ?:[\\/]*)
10472  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10473  ;;
10474  *)
10475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10476for as_dir in $PATH
10477do
10478  IFS=$as_save_IFS
10479  test -z "$as_dir" && as_dir=.
10480    for ac_exec_ext in '' $ac_executable_extensions; do
10481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10482    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10484    break 2
10485  fi
10486done
10487  done
10488IFS=$as_save_IFS
10489
10490  ;;
10491esac
10492fi
10493TAIL=$ac_cv_path_TAIL
10494if test -n "$TAIL"; then
10495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10496$as_echo "$TAIL" >&6; }
10497else
10498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499$as_echo "no" >&6; }
10500fi
10501
10502
10503  test -n "$TAIL" && break
10504done
10505
10506    else
10507      # If it succeeded, then it was overridden by the user. We will use it
10508      # for the tool.
10509
10510      # First remove it from the list of overridden variables, so we can test
10511      # for unknown variables in the end.
10512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10513
10514      # Check if we try to supply an empty value
10515      if test "x$TAIL" = x; then
10516        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10517$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10519$as_echo_n "checking for TAIL... " >&6; }
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10521$as_echo "disabled" >&6; }
10522      else
10523        # Check if the provided tool contains a complete path.
10524        tool_specified="$TAIL"
10525        tool_basename="${tool_specified##*/}"
10526        if test "x$tool_basename" = "x$tool_specified"; then
10527          # A command without a complete path is provided, search $PATH.
10528          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10529$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10530          # Extract the first word of "$tool_basename", so it can be a program name with args.
10531set dummy $tool_basename; ac_word=$2
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10533$as_echo_n "checking for $ac_word... " >&6; }
10534if ${ac_cv_path_TAIL+:} false; then :
10535  $as_echo_n "(cached) " >&6
10536else
10537  case $TAIL in
10538  [\\/]* | ?:[\\/]*)
10539  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10540  ;;
10541  *)
10542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10543for as_dir in $PATH
10544do
10545  IFS=$as_save_IFS
10546  test -z "$as_dir" && as_dir=.
10547    for ac_exec_ext in '' $ac_executable_extensions; do
10548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10549    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10551    break 2
10552  fi
10553done
10554  done
10555IFS=$as_save_IFS
10556
10557  ;;
10558esac
10559fi
10560TAIL=$ac_cv_path_TAIL
10561if test -n "$TAIL"; then
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10563$as_echo "$TAIL" >&6; }
10564else
10565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10566$as_echo "no" >&6; }
10567fi
10568
10569
10570          if test "x$TAIL" = x; then
10571            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10572          fi
10573        else
10574          # Otherwise we believe it is a complete path. Use it as it is.
10575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10576$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10577          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10578$as_echo_n "checking for TAIL... " >&6; }
10579          if test ! -x "$tool_specified"; then
10580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10581$as_echo "not found" >&6; }
10582            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10583          fi
10584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10585$as_echo "$tool_specified" >&6; }
10586        fi
10587      fi
10588    fi
10589
10590  fi
10591
10592
10593
10594  if test "x$TAIL" = x; then
10595    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10596  fi
10597
10598
10599
10600
10601
10602  # Publish this variable in the help.
10603
10604
10605  if [ -z "${TAR+x}" ]; then
10606    # The variable is not set by user, try to locate tool using the code snippet
10607    for ac_prog in tar
10608do
10609  # Extract the first word of "$ac_prog", so it can be a program name with args.
10610set dummy $ac_prog; ac_word=$2
10611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10612$as_echo_n "checking for $ac_word... " >&6; }
10613if ${ac_cv_path_TAR+:} false; then :
10614  $as_echo_n "(cached) " >&6
10615else
10616  case $TAR in
10617  [\\/]* | ?:[\\/]*)
10618  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10619  ;;
10620  *)
10621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10622for as_dir in $PATH
10623do
10624  IFS=$as_save_IFS
10625  test -z "$as_dir" && as_dir=.
10626    for ac_exec_ext in '' $ac_executable_extensions; do
10627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10628    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10630    break 2
10631  fi
10632done
10633  done
10634IFS=$as_save_IFS
10635
10636  ;;
10637esac
10638fi
10639TAR=$ac_cv_path_TAR
10640if test -n "$TAR"; then
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10642$as_echo "$TAR" >&6; }
10643else
10644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10645$as_echo "no" >&6; }
10646fi
10647
10648
10649  test -n "$TAR" && break
10650done
10651
10652  else
10653    # The variable is set, but is it from the command line or the environment?
10654
10655    # Try to remove the string !TAR! from our list.
10656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10658      # If it failed, the variable was not from the command line. Ignore it,
10659      # but warn the user (except for BASH, which is always set by the calling BASH).
10660      if test "xTAR" != xBASH; then
10661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10662$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10663      fi
10664      # Try to locate tool using the code snippet
10665      for ac_prog in tar
10666do
10667  # Extract the first word of "$ac_prog", so it can be a program name with args.
10668set dummy $ac_prog; ac_word=$2
10669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10670$as_echo_n "checking for $ac_word... " >&6; }
10671if ${ac_cv_path_TAR+:} false; then :
10672  $as_echo_n "(cached) " >&6
10673else
10674  case $TAR in
10675  [\\/]* | ?:[\\/]*)
10676  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10677  ;;
10678  *)
10679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10680for as_dir in $PATH
10681do
10682  IFS=$as_save_IFS
10683  test -z "$as_dir" && as_dir=.
10684    for ac_exec_ext in '' $ac_executable_extensions; do
10685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10686    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10688    break 2
10689  fi
10690done
10691  done
10692IFS=$as_save_IFS
10693
10694  ;;
10695esac
10696fi
10697TAR=$ac_cv_path_TAR
10698if test -n "$TAR"; then
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10700$as_echo "$TAR" >&6; }
10701else
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
10704fi
10705
10706
10707  test -n "$TAR" && break
10708done
10709
10710    else
10711      # If it succeeded, then it was overridden by the user. We will use it
10712      # for the tool.
10713
10714      # First remove it from the list of overridden variables, so we can test
10715      # for unknown variables in the end.
10716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10717
10718      # Check if we try to supply an empty value
10719      if test "x$TAR" = x; then
10720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10721$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10723$as_echo_n "checking for TAR... " >&6; }
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10725$as_echo "disabled" >&6; }
10726      else
10727        # Check if the provided tool contains a complete path.
10728        tool_specified="$TAR"
10729        tool_basename="${tool_specified##*/}"
10730        if test "x$tool_basename" = "x$tool_specified"; then
10731          # A command without a complete path is provided, search $PATH.
10732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10733$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10734          # Extract the first word of "$tool_basename", so it can be a program name with args.
10735set dummy $tool_basename; ac_word=$2
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10737$as_echo_n "checking for $ac_word... " >&6; }
10738if ${ac_cv_path_TAR+:} false; then :
10739  $as_echo_n "(cached) " >&6
10740else
10741  case $TAR in
10742  [\\/]* | ?:[\\/]*)
10743  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10744  ;;
10745  *)
10746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10747for as_dir in $PATH
10748do
10749  IFS=$as_save_IFS
10750  test -z "$as_dir" && as_dir=.
10751    for ac_exec_ext in '' $ac_executable_extensions; do
10752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10753    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10755    break 2
10756  fi
10757done
10758  done
10759IFS=$as_save_IFS
10760
10761  ;;
10762esac
10763fi
10764TAR=$ac_cv_path_TAR
10765if test -n "$TAR"; then
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10767$as_echo "$TAR" >&6; }
10768else
10769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; }
10771fi
10772
10773
10774          if test "x$TAR" = x; then
10775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10776          fi
10777        else
10778          # Otherwise we believe it is a complete path. Use it as it is.
10779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10780$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10782$as_echo_n "checking for TAR... " >&6; }
10783          if test ! -x "$tool_specified"; then
10784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10785$as_echo "not found" >&6; }
10786            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10787          fi
10788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10789$as_echo "$tool_specified" >&6; }
10790        fi
10791      fi
10792    fi
10793
10794  fi
10795
10796
10797
10798  if test "x$TAR" = x; then
10799    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10800  fi
10801
10802
10803
10804
10805
10806  # Publish this variable in the help.
10807
10808
10809  if [ -z "${TEE+x}" ]; then
10810    # The variable is not set by user, try to locate tool using the code snippet
10811    for ac_prog in tee
10812do
10813  # Extract the first word of "$ac_prog", so it can be a program name with args.
10814set dummy $ac_prog; ac_word=$2
10815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10816$as_echo_n "checking for $ac_word... " >&6; }
10817if ${ac_cv_path_TEE+:} false; then :
10818  $as_echo_n "(cached) " >&6
10819else
10820  case $TEE in
10821  [\\/]* | ?:[\\/]*)
10822  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10823  ;;
10824  *)
10825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10826for as_dir in $PATH
10827do
10828  IFS=$as_save_IFS
10829  test -z "$as_dir" && as_dir=.
10830    for ac_exec_ext in '' $ac_executable_extensions; do
10831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10832    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10834    break 2
10835  fi
10836done
10837  done
10838IFS=$as_save_IFS
10839
10840  ;;
10841esac
10842fi
10843TEE=$ac_cv_path_TEE
10844if test -n "$TEE"; then
10845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10846$as_echo "$TEE" >&6; }
10847else
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849$as_echo "no" >&6; }
10850fi
10851
10852
10853  test -n "$TEE" && break
10854done
10855
10856  else
10857    # The variable is set, but is it from the command line or the environment?
10858
10859    # Try to remove the string !TEE! from our list.
10860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10862      # If it failed, the variable was not from the command line. Ignore it,
10863      # but warn the user (except for BASH, which is always set by the calling BASH).
10864      if test "xTEE" != xBASH; then
10865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10866$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10867      fi
10868      # Try to locate tool using the code snippet
10869      for ac_prog in tee
10870do
10871  # Extract the first word of "$ac_prog", so it can be a program name with args.
10872set dummy $ac_prog; ac_word=$2
10873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874$as_echo_n "checking for $ac_word... " >&6; }
10875if ${ac_cv_path_TEE+:} false; then :
10876  $as_echo_n "(cached) " >&6
10877else
10878  case $TEE in
10879  [\\/]* | ?:[\\/]*)
10880  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10881  ;;
10882  *)
10883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884for as_dir in $PATH
10885do
10886  IFS=$as_save_IFS
10887  test -z "$as_dir" && as_dir=.
10888    for ac_exec_ext in '' $ac_executable_extensions; do
10889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892    break 2
10893  fi
10894done
10895  done
10896IFS=$as_save_IFS
10897
10898  ;;
10899esac
10900fi
10901TEE=$ac_cv_path_TEE
10902if test -n "$TEE"; then
10903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10904$as_echo "$TEE" >&6; }
10905else
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908fi
10909
10910
10911  test -n "$TEE" && break
10912done
10913
10914    else
10915      # If it succeeded, then it was overridden by the user. We will use it
10916      # for the tool.
10917
10918      # First remove it from the list of overridden variables, so we can test
10919      # for unknown variables in the end.
10920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10921
10922      # Check if we try to supply an empty value
10923      if test "x$TEE" = x; then
10924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10925$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10927$as_echo_n "checking for TEE... " >&6; }
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10929$as_echo "disabled" >&6; }
10930      else
10931        # Check if the provided tool contains a complete path.
10932        tool_specified="$TEE"
10933        tool_basename="${tool_specified##*/}"
10934        if test "x$tool_basename" = "x$tool_specified"; then
10935          # A command without a complete path is provided, search $PATH.
10936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10937$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10938          # Extract the first word of "$tool_basename", so it can be a program name with args.
10939set dummy $tool_basename; ac_word=$2
10940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10941$as_echo_n "checking for $ac_word... " >&6; }
10942if ${ac_cv_path_TEE+:} false; then :
10943  $as_echo_n "(cached) " >&6
10944else
10945  case $TEE in
10946  [\\/]* | ?:[\\/]*)
10947  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10948  ;;
10949  *)
10950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10951for as_dir in $PATH
10952do
10953  IFS=$as_save_IFS
10954  test -z "$as_dir" && as_dir=.
10955    for ac_exec_ext in '' $ac_executable_extensions; do
10956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10957    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10959    break 2
10960  fi
10961done
10962  done
10963IFS=$as_save_IFS
10964
10965  ;;
10966esac
10967fi
10968TEE=$ac_cv_path_TEE
10969if test -n "$TEE"; then
10970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10971$as_echo "$TEE" >&6; }
10972else
10973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10974$as_echo "no" >&6; }
10975fi
10976
10977
10978          if test "x$TEE" = x; then
10979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10980          fi
10981        else
10982          # Otherwise we believe it is a complete path. Use it as it is.
10983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10984$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10986$as_echo_n "checking for TEE... " >&6; }
10987          if test ! -x "$tool_specified"; then
10988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10989$as_echo "not found" >&6; }
10990            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10991          fi
10992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10993$as_echo "$tool_specified" >&6; }
10994        fi
10995      fi
10996    fi
10997
10998  fi
10999
11000
11001
11002  if test "x$TEE" = x; then
11003    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11004  fi
11005
11006
11007
11008
11009
11010  # Publish this variable in the help.
11011
11012
11013  if [ -z "${TOUCH+x}" ]; then
11014    # The variable is not set by user, try to locate tool using the code snippet
11015    for ac_prog in touch
11016do
11017  # Extract the first word of "$ac_prog", so it can be a program name with args.
11018set dummy $ac_prog; ac_word=$2
11019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11020$as_echo_n "checking for $ac_word... " >&6; }
11021if ${ac_cv_path_TOUCH+:} false; then :
11022  $as_echo_n "(cached) " >&6
11023else
11024  case $TOUCH in
11025  [\\/]* | ?:[\\/]*)
11026  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11027  ;;
11028  *)
11029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11030for as_dir in $PATH
11031do
11032  IFS=$as_save_IFS
11033  test -z "$as_dir" && as_dir=.
11034    for ac_exec_ext in '' $ac_executable_extensions; do
11035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11036    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11038    break 2
11039  fi
11040done
11041  done
11042IFS=$as_save_IFS
11043
11044  ;;
11045esac
11046fi
11047TOUCH=$ac_cv_path_TOUCH
11048if test -n "$TOUCH"; then
11049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11050$as_echo "$TOUCH" >&6; }
11051else
11052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11053$as_echo "no" >&6; }
11054fi
11055
11056
11057  test -n "$TOUCH" && break
11058done
11059
11060  else
11061    # The variable is set, but is it from the command line or the environment?
11062
11063    # Try to remove the string !TOUCH! from our list.
11064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11066      # If it failed, the variable was not from the command line. Ignore it,
11067      # but warn the user (except for BASH, which is always set by the calling BASH).
11068      if test "xTOUCH" != xBASH; then
11069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11070$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11071      fi
11072      # Try to locate tool using the code snippet
11073      for ac_prog in touch
11074do
11075  # Extract the first word of "$ac_prog", so it can be a program name with args.
11076set dummy $ac_prog; ac_word=$2
11077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11078$as_echo_n "checking for $ac_word... " >&6; }
11079if ${ac_cv_path_TOUCH+:} false; then :
11080  $as_echo_n "(cached) " >&6
11081else
11082  case $TOUCH in
11083  [\\/]* | ?:[\\/]*)
11084  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11085  ;;
11086  *)
11087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11088for as_dir in $PATH
11089do
11090  IFS=$as_save_IFS
11091  test -z "$as_dir" && as_dir=.
11092    for ac_exec_ext in '' $ac_executable_extensions; do
11093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11094    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11096    break 2
11097  fi
11098done
11099  done
11100IFS=$as_save_IFS
11101
11102  ;;
11103esac
11104fi
11105TOUCH=$ac_cv_path_TOUCH
11106if test -n "$TOUCH"; then
11107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11108$as_echo "$TOUCH" >&6; }
11109else
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11111$as_echo "no" >&6; }
11112fi
11113
11114
11115  test -n "$TOUCH" && break
11116done
11117
11118    else
11119      # If it succeeded, then it was overridden by the user. We will use it
11120      # for the tool.
11121
11122      # First remove it from the list of overridden variables, so we can test
11123      # for unknown variables in the end.
11124      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11125
11126      # Check if we try to supply an empty value
11127      if test "x$TOUCH" = x; then
11128        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11129$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11131$as_echo_n "checking for TOUCH... " >&6; }
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11133$as_echo "disabled" >&6; }
11134      else
11135        # Check if the provided tool contains a complete path.
11136        tool_specified="$TOUCH"
11137        tool_basename="${tool_specified##*/}"
11138        if test "x$tool_basename" = "x$tool_specified"; then
11139          # A command without a complete path is provided, search $PATH.
11140          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11141$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11142          # Extract the first word of "$tool_basename", so it can be a program name with args.
11143set dummy $tool_basename; ac_word=$2
11144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11145$as_echo_n "checking for $ac_word... " >&6; }
11146if ${ac_cv_path_TOUCH+:} false; then :
11147  $as_echo_n "(cached) " >&6
11148else
11149  case $TOUCH in
11150  [\\/]* | ?:[\\/]*)
11151  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11152  ;;
11153  *)
11154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11155for as_dir in $PATH
11156do
11157  IFS=$as_save_IFS
11158  test -z "$as_dir" && as_dir=.
11159    for ac_exec_ext in '' $ac_executable_extensions; do
11160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11161    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11163    break 2
11164  fi
11165done
11166  done
11167IFS=$as_save_IFS
11168
11169  ;;
11170esac
11171fi
11172TOUCH=$ac_cv_path_TOUCH
11173if test -n "$TOUCH"; then
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11175$as_echo "$TOUCH" >&6; }
11176else
11177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11178$as_echo "no" >&6; }
11179fi
11180
11181
11182          if test "x$TOUCH" = x; then
11183            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11184          fi
11185        else
11186          # Otherwise we believe it is a complete path. Use it as it is.
11187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11188$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11189          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11190$as_echo_n "checking for TOUCH... " >&6; }
11191          if test ! -x "$tool_specified"; then
11192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11193$as_echo "not found" >&6; }
11194            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11195          fi
11196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11197$as_echo "$tool_specified" >&6; }
11198        fi
11199      fi
11200    fi
11201
11202  fi
11203
11204
11205
11206  if test "x$TOUCH" = x; then
11207    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11208  fi
11209
11210
11211
11212
11213
11214  # Publish this variable in the help.
11215
11216
11217  if [ -z "${TR+x}" ]; then
11218    # The variable is not set by user, try to locate tool using the code snippet
11219    for ac_prog in tr
11220do
11221  # Extract the first word of "$ac_prog", so it can be a program name with args.
11222set dummy $ac_prog; ac_word=$2
11223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11224$as_echo_n "checking for $ac_word... " >&6; }
11225if ${ac_cv_path_TR+:} false; then :
11226  $as_echo_n "(cached) " >&6
11227else
11228  case $TR in
11229  [\\/]* | ?:[\\/]*)
11230  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11231  ;;
11232  *)
11233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11234for as_dir in $PATH
11235do
11236  IFS=$as_save_IFS
11237  test -z "$as_dir" && as_dir=.
11238    for ac_exec_ext in '' $ac_executable_extensions; do
11239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11240    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11242    break 2
11243  fi
11244done
11245  done
11246IFS=$as_save_IFS
11247
11248  ;;
11249esac
11250fi
11251TR=$ac_cv_path_TR
11252if test -n "$TR"; then
11253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11254$as_echo "$TR" >&6; }
11255else
11256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11257$as_echo "no" >&6; }
11258fi
11259
11260
11261  test -n "$TR" && break
11262done
11263
11264  else
11265    # The variable is set, but is it from the command line or the environment?
11266
11267    # Try to remove the string !TR! from our list.
11268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11270      # If it failed, the variable was not from the command line. Ignore it,
11271      # but warn the user (except for BASH, which is always set by the calling BASH).
11272      if test "xTR" != xBASH; then
11273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11274$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11275      fi
11276      # Try to locate tool using the code snippet
11277      for ac_prog in tr
11278do
11279  # Extract the first word of "$ac_prog", so it can be a program name with args.
11280set dummy $ac_prog; ac_word=$2
11281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11282$as_echo_n "checking for $ac_word... " >&6; }
11283if ${ac_cv_path_TR+:} false; then :
11284  $as_echo_n "(cached) " >&6
11285else
11286  case $TR in
11287  [\\/]* | ?:[\\/]*)
11288  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11289  ;;
11290  *)
11291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11292for as_dir in $PATH
11293do
11294  IFS=$as_save_IFS
11295  test -z "$as_dir" && as_dir=.
11296    for ac_exec_ext in '' $ac_executable_extensions; do
11297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11298    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11300    break 2
11301  fi
11302done
11303  done
11304IFS=$as_save_IFS
11305
11306  ;;
11307esac
11308fi
11309TR=$ac_cv_path_TR
11310if test -n "$TR"; then
11311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11312$as_echo "$TR" >&6; }
11313else
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
11316fi
11317
11318
11319  test -n "$TR" && break
11320done
11321
11322    else
11323      # If it succeeded, then it was overridden by the user. We will use it
11324      # for the tool.
11325
11326      # First remove it from the list of overridden variables, so we can test
11327      # for unknown variables in the end.
11328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11329
11330      # Check if we try to supply an empty value
11331      if test "x$TR" = x; then
11332        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11333$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11335$as_echo_n "checking for TR... " >&6; }
11336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11337$as_echo "disabled" >&6; }
11338      else
11339        # Check if the provided tool contains a complete path.
11340        tool_specified="$TR"
11341        tool_basename="${tool_specified##*/}"
11342        if test "x$tool_basename" = "x$tool_specified"; then
11343          # A command without a complete path is provided, search $PATH.
11344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11345$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11346          # Extract the first word of "$tool_basename", so it can be a program name with args.
11347set dummy $tool_basename; ac_word=$2
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11349$as_echo_n "checking for $ac_word... " >&6; }
11350if ${ac_cv_path_TR+:} false; then :
11351  $as_echo_n "(cached) " >&6
11352else
11353  case $TR in
11354  [\\/]* | ?:[\\/]*)
11355  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11356  ;;
11357  *)
11358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11359for as_dir in $PATH
11360do
11361  IFS=$as_save_IFS
11362  test -z "$as_dir" && as_dir=.
11363    for ac_exec_ext in '' $ac_executable_extensions; do
11364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11365    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11367    break 2
11368  fi
11369done
11370  done
11371IFS=$as_save_IFS
11372
11373  ;;
11374esac
11375fi
11376TR=$ac_cv_path_TR
11377if test -n "$TR"; then
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11379$as_echo "$TR" >&6; }
11380else
11381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
11383fi
11384
11385
11386          if test "x$TR" = x; then
11387            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11388          fi
11389        else
11390          # Otherwise we believe it is a complete path. Use it as it is.
11391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11392$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11393          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11394$as_echo_n "checking for TR... " >&6; }
11395          if test ! -x "$tool_specified"; then
11396            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11397$as_echo "not found" >&6; }
11398            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11399          fi
11400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11401$as_echo "$tool_specified" >&6; }
11402        fi
11403      fi
11404    fi
11405
11406  fi
11407
11408
11409
11410  if test "x$TR" = x; then
11411    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11412  fi
11413
11414
11415
11416
11417
11418  # Publish this variable in the help.
11419
11420
11421  if [ -z "${UNAME+x}" ]; then
11422    # The variable is not set by user, try to locate tool using the code snippet
11423    for ac_prog in uname
11424do
11425  # Extract the first word of "$ac_prog", so it can be a program name with args.
11426set dummy $ac_prog; ac_word=$2
11427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11428$as_echo_n "checking for $ac_word... " >&6; }
11429if ${ac_cv_path_UNAME+:} false; then :
11430  $as_echo_n "(cached) " >&6
11431else
11432  case $UNAME in
11433  [\\/]* | ?:[\\/]*)
11434  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11435  ;;
11436  *)
11437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11438for as_dir in $PATH
11439do
11440  IFS=$as_save_IFS
11441  test -z "$as_dir" && as_dir=.
11442    for ac_exec_ext in '' $ac_executable_extensions; do
11443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11444    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11446    break 2
11447  fi
11448done
11449  done
11450IFS=$as_save_IFS
11451
11452  ;;
11453esac
11454fi
11455UNAME=$ac_cv_path_UNAME
11456if test -n "$UNAME"; then
11457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11458$as_echo "$UNAME" >&6; }
11459else
11460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461$as_echo "no" >&6; }
11462fi
11463
11464
11465  test -n "$UNAME" && break
11466done
11467
11468  else
11469    # The variable is set, but is it from the command line or the environment?
11470
11471    # Try to remove the string !UNAME! from our list.
11472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11474      # If it failed, the variable was not from the command line. Ignore it,
11475      # but warn the user (except for BASH, which is always set by the calling BASH).
11476      if test "xUNAME" != xBASH; then
11477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11478$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11479      fi
11480      # Try to locate tool using the code snippet
11481      for ac_prog in uname
11482do
11483  # Extract the first word of "$ac_prog", so it can be a program name with args.
11484set dummy $ac_prog; ac_word=$2
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11486$as_echo_n "checking for $ac_word... " >&6; }
11487if ${ac_cv_path_UNAME+:} false; then :
11488  $as_echo_n "(cached) " >&6
11489else
11490  case $UNAME in
11491  [\\/]* | ?:[\\/]*)
11492  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11493  ;;
11494  *)
11495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11496for as_dir in $PATH
11497do
11498  IFS=$as_save_IFS
11499  test -z "$as_dir" && as_dir=.
11500    for ac_exec_ext in '' $ac_executable_extensions; do
11501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11502    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11504    break 2
11505  fi
11506done
11507  done
11508IFS=$as_save_IFS
11509
11510  ;;
11511esac
11512fi
11513UNAME=$ac_cv_path_UNAME
11514if test -n "$UNAME"; then
11515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11516$as_echo "$UNAME" >&6; }
11517else
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11519$as_echo "no" >&6; }
11520fi
11521
11522
11523  test -n "$UNAME" && break
11524done
11525
11526    else
11527      # If it succeeded, then it was overridden by the user. We will use it
11528      # for the tool.
11529
11530      # First remove it from the list of overridden variables, so we can test
11531      # for unknown variables in the end.
11532      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11533
11534      # Check if we try to supply an empty value
11535      if test "x$UNAME" = x; then
11536        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11537$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11539$as_echo_n "checking for UNAME... " >&6; }
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11541$as_echo "disabled" >&6; }
11542      else
11543        # Check if the provided tool contains a complete path.
11544        tool_specified="$UNAME"
11545        tool_basename="${tool_specified##*/}"
11546        if test "x$tool_basename" = "x$tool_specified"; then
11547          # A command without a complete path is provided, search $PATH.
11548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11549$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11550          # Extract the first word of "$tool_basename", so it can be a program name with args.
11551set dummy $tool_basename; ac_word=$2
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11553$as_echo_n "checking for $ac_word... " >&6; }
11554if ${ac_cv_path_UNAME+:} false; then :
11555  $as_echo_n "(cached) " >&6
11556else
11557  case $UNAME in
11558  [\\/]* | ?:[\\/]*)
11559  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11560  ;;
11561  *)
11562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11563for as_dir in $PATH
11564do
11565  IFS=$as_save_IFS
11566  test -z "$as_dir" && as_dir=.
11567    for ac_exec_ext in '' $ac_executable_extensions; do
11568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11569    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11571    break 2
11572  fi
11573done
11574  done
11575IFS=$as_save_IFS
11576
11577  ;;
11578esac
11579fi
11580UNAME=$ac_cv_path_UNAME
11581if test -n "$UNAME"; then
11582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11583$as_echo "$UNAME" >&6; }
11584else
11585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11586$as_echo "no" >&6; }
11587fi
11588
11589
11590          if test "x$UNAME" = x; then
11591            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11592          fi
11593        else
11594          # Otherwise we believe it is a complete path. Use it as it is.
11595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11596$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11597          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11598$as_echo_n "checking for UNAME... " >&6; }
11599          if test ! -x "$tool_specified"; then
11600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11601$as_echo "not found" >&6; }
11602            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11603          fi
11604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11605$as_echo "$tool_specified" >&6; }
11606        fi
11607      fi
11608    fi
11609
11610  fi
11611
11612
11613
11614  if test "x$UNAME" = x; then
11615    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11616  fi
11617
11618
11619
11620
11621
11622  # Publish this variable in the help.
11623
11624
11625  if [ -z "${UNIQ+x}" ]; then
11626    # The variable is not set by user, try to locate tool using the code snippet
11627    for ac_prog in uniq
11628do
11629  # Extract the first word of "$ac_prog", so it can be a program name with args.
11630set dummy $ac_prog; ac_word=$2
11631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11632$as_echo_n "checking for $ac_word... " >&6; }
11633if ${ac_cv_path_UNIQ+:} false; then :
11634  $as_echo_n "(cached) " >&6
11635else
11636  case $UNIQ in
11637  [\\/]* | ?:[\\/]*)
11638  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11639  ;;
11640  *)
11641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11642for as_dir in $PATH
11643do
11644  IFS=$as_save_IFS
11645  test -z "$as_dir" && as_dir=.
11646    for ac_exec_ext in '' $ac_executable_extensions; do
11647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11648    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11650    break 2
11651  fi
11652done
11653  done
11654IFS=$as_save_IFS
11655
11656  ;;
11657esac
11658fi
11659UNIQ=$ac_cv_path_UNIQ
11660if test -n "$UNIQ"; then
11661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11662$as_echo "$UNIQ" >&6; }
11663else
11664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11665$as_echo "no" >&6; }
11666fi
11667
11668
11669  test -n "$UNIQ" && break
11670done
11671
11672  else
11673    # The variable is set, but is it from the command line or the environment?
11674
11675    # Try to remove the string !UNIQ! from our list.
11676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11678      # If it failed, the variable was not from the command line. Ignore it,
11679      # but warn the user (except for BASH, which is always set by the calling BASH).
11680      if test "xUNIQ" != xBASH; then
11681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11682$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11683      fi
11684      # Try to locate tool using the code snippet
11685      for ac_prog in uniq
11686do
11687  # Extract the first word of "$ac_prog", so it can be a program name with args.
11688set dummy $ac_prog; ac_word=$2
11689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11690$as_echo_n "checking for $ac_word... " >&6; }
11691if ${ac_cv_path_UNIQ+:} false; then :
11692  $as_echo_n "(cached) " >&6
11693else
11694  case $UNIQ in
11695  [\\/]* | ?:[\\/]*)
11696  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11697  ;;
11698  *)
11699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11700for as_dir in $PATH
11701do
11702  IFS=$as_save_IFS
11703  test -z "$as_dir" && as_dir=.
11704    for ac_exec_ext in '' $ac_executable_extensions; do
11705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11706    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11708    break 2
11709  fi
11710done
11711  done
11712IFS=$as_save_IFS
11713
11714  ;;
11715esac
11716fi
11717UNIQ=$ac_cv_path_UNIQ
11718if test -n "$UNIQ"; then
11719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11720$as_echo "$UNIQ" >&6; }
11721else
11722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723$as_echo "no" >&6; }
11724fi
11725
11726
11727  test -n "$UNIQ" && break
11728done
11729
11730    else
11731      # If it succeeded, then it was overridden by the user. We will use it
11732      # for the tool.
11733
11734      # First remove it from the list of overridden variables, so we can test
11735      # for unknown variables in the end.
11736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11737
11738      # Check if we try to supply an empty value
11739      if test "x$UNIQ" = x; then
11740        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11741$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11743$as_echo_n "checking for UNIQ... " >&6; }
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11745$as_echo "disabled" >&6; }
11746      else
11747        # Check if the provided tool contains a complete path.
11748        tool_specified="$UNIQ"
11749        tool_basename="${tool_specified##*/}"
11750        if test "x$tool_basename" = "x$tool_specified"; then
11751          # A command without a complete path is provided, search $PATH.
11752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11753$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11754          # Extract the first word of "$tool_basename", so it can be a program name with args.
11755set dummy $tool_basename; ac_word=$2
11756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11757$as_echo_n "checking for $ac_word... " >&6; }
11758if ${ac_cv_path_UNIQ+:} false; then :
11759  $as_echo_n "(cached) " >&6
11760else
11761  case $UNIQ in
11762  [\\/]* | ?:[\\/]*)
11763  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11764  ;;
11765  *)
11766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11767for as_dir in $PATH
11768do
11769  IFS=$as_save_IFS
11770  test -z "$as_dir" && as_dir=.
11771    for ac_exec_ext in '' $ac_executable_extensions; do
11772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11773    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11775    break 2
11776  fi
11777done
11778  done
11779IFS=$as_save_IFS
11780
11781  ;;
11782esac
11783fi
11784UNIQ=$ac_cv_path_UNIQ
11785if test -n "$UNIQ"; then
11786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11787$as_echo "$UNIQ" >&6; }
11788else
11789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
11791fi
11792
11793
11794          if test "x$UNIQ" = x; then
11795            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11796          fi
11797        else
11798          # Otherwise we believe it is a complete path. Use it as it is.
11799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11800$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11801          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11802$as_echo_n "checking for UNIQ... " >&6; }
11803          if test ! -x "$tool_specified"; then
11804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11805$as_echo "not found" >&6; }
11806            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11807          fi
11808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11809$as_echo "$tool_specified" >&6; }
11810        fi
11811      fi
11812    fi
11813
11814  fi
11815
11816
11817
11818  if test "x$UNIQ" = x; then
11819    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11820  fi
11821
11822
11823
11824
11825
11826  # Publish this variable in the help.
11827
11828
11829  if [ -z "${WC+x}" ]; then
11830    # The variable is not set by user, try to locate tool using the code snippet
11831    for ac_prog in wc
11832do
11833  # Extract the first word of "$ac_prog", so it can be a program name with args.
11834set dummy $ac_prog; ac_word=$2
11835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11836$as_echo_n "checking for $ac_word... " >&6; }
11837if ${ac_cv_path_WC+:} false; then :
11838  $as_echo_n "(cached) " >&6
11839else
11840  case $WC in
11841  [\\/]* | ?:[\\/]*)
11842  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11843  ;;
11844  *)
11845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11846for as_dir in $PATH
11847do
11848  IFS=$as_save_IFS
11849  test -z "$as_dir" && as_dir=.
11850    for ac_exec_ext in '' $ac_executable_extensions; do
11851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11852    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11854    break 2
11855  fi
11856done
11857  done
11858IFS=$as_save_IFS
11859
11860  ;;
11861esac
11862fi
11863WC=$ac_cv_path_WC
11864if test -n "$WC"; then
11865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11866$as_echo "$WC" >&6; }
11867else
11868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11869$as_echo "no" >&6; }
11870fi
11871
11872
11873  test -n "$WC" && break
11874done
11875
11876  else
11877    # The variable is set, but is it from the command line or the environment?
11878
11879    # Try to remove the string !WC! from our list.
11880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11882      # If it failed, the variable was not from the command line. Ignore it,
11883      # but warn the user (except for BASH, which is always set by the calling BASH).
11884      if test "xWC" != xBASH; then
11885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11886$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11887      fi
11888      # Try to locate tool using the code snippet
11889      for ac_prog in wc
11890do
11891  # Extract the first word of "$ac_prog", so it can be a program name with args.
11892set dummy $ac_prog; ac_word=$2
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11894$as_echo_n "checking for $ac_word... " >&6; }
11895if ${ac_cv_path_WC+:} false; then :
11896  $as_echo_n "(cached) " >&6
11897else
11898  case $WC in
11899  [\\/]* | ?:[\\/]*)
11900  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11901  ;;
11902  *)
11903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11904for as_dir in $PATH
11905do
11906  IFS=$as_save_IFS
11907  test -z "$as_dir" && as_dir=.
11908    for ac_exec_ext in '' $ac_executable_extensions; do
11909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11910    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11912    break 2
11913  fi
11914done
11915  done
11916IFS=$as_save_IFS
11917
11918  ;;
11919esac
11920fi
11921WC=$ac_cv_path_WC
11922if test -n "$WC"; then
11923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11924$as_echo "$WC" >&6; }
11925else
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11927$as_echo "no" >&6; }
11928fi
11929
11930
11931  test -n "$WC" && break
11932done
11933
11934    else
11935      # If it succeeded, then it was overridden by the user. We will use it
11936      # for the tool.
11937
11938      # First remove it from the list of overridden variables, so we can test
11939      # for unknown variables in the end.
11940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11941
11942      # Check if we try to supply an empty value
11943      if test "x$WC" = x; then
11944        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11945$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11947$as_echo_n "checking for WC... " >&6; }
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11949$as_echo "disabled" >&6; }
11950      else
11951        # Check if the provided tool contains a complete path.
11952        tool_specified="$WC"
11953        tool_basename="${tool_specified##*/}"
11954        if test "x$tool_basename" = "x$tool_specified"; then
11955          # A command without a complete path is provided, search $PATH.
11956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11957$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11958          # Extract the first word of "$tool_basename", so it can be a program name with args.
11959set dummy $tool_basename; ac_word=$2
11960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11961$as_echo_n "checking for $ac_word... " >&6; }
11962if ${ac_cv_path_WC+:} false; then :
11963  $as_echo_n "(cached) " >&6
11964else
11965  case $WC in
11966  [\\/]* | ?:[\\/]*)
11967  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11968  ;;
11969  *)
11970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11971for as_dir in $PATH
11972do
11973  IFS=$as_save_IFS
11974  test -z "$as_dir" && as_dir=.
11975    for ac_exec_ext in '' $ac_executable_extensions; do
11976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11977    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11979    break 2
11980  fi
11981done
11982  done
11983IFS=$as_save_IFS
11984
11985  ;;
11986esac
11987fi
11988WC=$ac_cv_path_WC
11989if test -n "$WC"; then
11990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11991$as_echo "$WC" >&6; }
11992else
11993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
11995fi
11996
11997
11998          if test "x$WC" = x; then
11999            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12000          fi
12001        else
12002          # Otherwise we believe it is a complete path. Use it as it is.
12003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12004$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12005          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12006$as_echo_n "checking for WC... " >&6; }
12007          if test ! -x "$tool_specified"; then
12008            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12009$as_echo "not found" >&6; }
12010            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12011          fi
12012          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12013$as_echo "$tool_specified" >&6; }
12014        fi
12015      fi
12016    fi
12017
12018  fi
12019
12020
12021
12022  if test "x$WC" = x; then
12023    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12024  fi
12025
12026
12027
12028
12029
12030  # Publish this variable in the help.
12031
12032
12033  if [ -z "${WHICH+x}" ]; then
12034    # The variable is not set by user, try to locate tool using the code snippet
12035    for ac_prog in which
12036do
12037  # Extract the first word of "$ac_prog", so it can be a program name with args.
12038set dummy $ac_prog; ac_word=$2
12039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12040$as_echo_n "checking for $ac_word... " >&6; }
12041if ${ac_cv_path_WHICH+:} false; then :
12042  $as_echo_n "(cached) " >&6
12043else
12044  case $WHICH in
12045  [\\/]* | ?:[\\/]*)
12046  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12047  ;;
12048  *)
12049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12050for as_dir in $PATH
12051do
12052  IFS=$as_save_IFS
12053  test -z "$as_dir" && as_dir=.
12054    for ac_exec_ext in '' $ac_executable_extensions; do
12055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12056    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12058    break 2
12059  fi
12060done
12061  done
12062IFS=$as_save_IFS
12063
12064  ;;
12065esac
12066fi
12067WHICH=$ac_cv_path_WHICH
12068if test -n "$WHICH"; then
12069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12070$as_echo "$WHICH" >&6; }
12071else
12072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12073$as_echo "no" >&6; }
12074fi
12075
12076
12077  test -n "$WHICH" && break
12078done
12079
12080  else
12081    # The variable is set, but is it from the command line or the environment?
12082
12083    # Try to remove the string !WHICH! from our list.
12084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12086      # If it failed, the variable was not from the command line. Ignore it,
12087      # but warn the user (except for BASH, which is always set by the calling BASH).
12088      if test "xWHICH" != xBASH; then
12089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12090$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12091      fi
12092      # Try to locate tool using the code snippet
12093      for ac_prog in which
12094do
12095  # Extract the first word of "$ac_prog", so it can be a program name with args.
12096set dummy $ac_prog; ac_word=$2
12097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12098$as_echo_n "checking for $ac_word... " >&6; }
12099if ${ac_cv_path_WHICH+:} false; then :
12100  $as_echo_n "(cached) " >&6
12101else
12102  case $WHICH in
12103  [\\/]* | ?:[\\/]*)
12104  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12105  ;;
12106  *)
12107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12108for as_dir in $PATH
12109do
12110  IFS=$as_save_IFS
12111  test -z "$as_dir" && as_dir=.
12112    for ac_exec_ext in '' $ac_executable_extensions; do
12113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12114    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12116    break 2
12117  fi
12118done
12119  done
12120IFS=$as_save_IFS
12121
12122  ;;
12123esac
12124fi
12125WHICH=$ac_cv_path_WHICH
12126if test -n "$WHICH"; then
12127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12128$as_echo "$WHICH" >&6; }
12129else
12130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12131$as_echo "no" >&6; }
12132fi
12133
12134
12135  test -n "$WHICH" && break
12136done
12137
12138    else
12139      # If it succeeded, then it was overridden by the user. We will use it
12140      # for the tool.
12141
12142      # First remove it from the list of overridden variables, so we can test
12143      # for unknown variables in the end.
12144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12145
12146      # Check if we try to supply an empty value
12147      if test "x$WHICH" = x; then
12148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12149$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12151$as_echo_n "checking for WHICH... " >&6; }
12152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12153$as_echo "disabled" >&6; }
12154      else
12155        # Check if the provided tool contains a complete path.
12156        tool_specified="$WHICH"
12157        tool_basename="${tool_specified##*/}"
12158        if test "x$tool_basename" = "x$tool_specified"; then
12159          # A command without a complete path is provided, search $PATH.
12160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12161$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12162          # Extract the first word of "$tool_basename", so it can be a program name with args.
12163set dummy $tool_basename; ac_word=$2
12164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12165$as_echo_n "checking for $ac_word... " >&6; }
12166if ${ac_cv_path_WHICH+:} false; then :
12167  $as_echo_n "(cached) " >&6
12168else
12169  case $WHICH in
12170  [\\/]* | ?:[\\/]*)
12171  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12172  ;;
12173  *)
12174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12175for as_dir in $PATH
12176do
12177  IFS=$as_save_IFS
12178  test -z "$as_dir" && as_dir=.
12179    for ac_exec_ext in '' $ac_executable_extensions; do
12180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12181    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12183    break 2
12184  fi
12185done
12186  done
12187IFS=$as_save_IFS
12188
12189  ;;
12190esac
12191fi
12192WHICH=$ac_cv_path_WHICH
12193if test -n "$WHICH"; then
12194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12195$as_echo "$WHICH" >&6; }
12196else
12197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12198$as_echo "no" >&6; }
12199fi
12200
12201
12202          if test "x$WHICH" = x; then
12203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12204          fi
12205        else
12206          # Otherwise we believe it is a complete path. Use it as it is.
12207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12208$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12210$as_echo_n "checking for WHICH... " >&6; }
12211          if test ! -x "$tool_specified"; then
12212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12213$as_echo "not found" >&6; }
12214            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12215          fi
12216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12217$as_echo "$tool_specified" >&6; }
12218        fi
12219      fi
12220    fi
12221
12222  fi
12223
12224
12225
12226  if test "x$WHICH" = x; then
12227    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12228  fi
12229
12230
12231
12232
12233
12234  # Publish this variable in the help.
12235
12236
12237  if [ -z "${XARGS+x}" ]; then
12238    # The variable is not set by user, try to locate tool using the code snippet
12239    for ac_prog in xargs
12240do
12241  # Extract the first word of "$ac_prog", so it can be a program name with args.
12242set dummy $ac_prog; ac_word=$2
12243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12244$as_echo_n "checking for $ac_word... " >&6; }
12245if ${ac_cv_path_XARGS+:} false; then :
12246  $as_echo_n "(cached) " >&6
12247else
12248  case $XARGS in
12249  [\\/]* | ?:[\\/]*)
12250  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12251  ;;
12252  *)
12253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12254for as_dir in $PATH
12255do
12256  IFS=$as_save_IFS
12257  test -z "$as_dir" && as_dir=.
12258    for ac_exec_ext in '' $ac_executable_extensions; do
12259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12260    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12262    break 2
12263  fi
12264done
12265  done
12266IFS=$as_save_IFS
12267
12268  ;;
12269esac
12270fi
12271XARGS=$ac_cv_path_XARGS
12272if test -n "$XARGS"; then
12273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12274$as_echo "$XARGS" >&6; }
12275else
12276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12277$as_echo "no" >&6; }
12278fi
12279
12280
12281  test -n "$XARGS" && break
12282done
12283
12284  else
12285    # The variable is set, but is it from the command line or the environment?
12286
12287    # Try to remove the string !XARGS! from our list.
12288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12290      # If it failed, the variable was not from the command line. Ignore it,
12291      # but warn the user (except for BASH, which is always set by the calling BASH).
12292      if test "xXARGS" != xBASH; then
12293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12294$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12295      fi
12296      # Try to locate tool using the code snippet
12297      for ac_prog in xargs
12298do
12299  # Extract the first word of "$ac_prog", so it can be a program name with args.
12300set dummy $ac_prog; ac_word=$2
12301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12302$as_echo_n "checking for $ac_word... " >&6; }
12303if ${ac_cv_path_XARGS+:} false; then :
12304  $as_echo_n "(cached) " >&6
12305else
12306  case $XARGS in
12307  [\\/]* | ?:[\\/]*)
12308  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12309  ;;
12310  *)
12311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12312for as_dir in $PATH
12313do
12314  IFS=$as_save_IFS
12315  test -z "$as_dir" && as_dir=.
12316    for ac_exec_ext in '' $ac_executable_extensions; do
12317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12318    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12320    break 2
12321  fi
12322done
12323  done
12324IFS=$as_save_IFS
12325
12326  ;;
12327esac
12328fi
12329XARGS=$ac_cv_path_XARGS
12330if test -n "$XARGS"; then
12331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12332$as_echo "$XARGS" >&6; }
12333else
12334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335$as_echo "no" >&6; }
12336fi
12337
12338
12339  test -n "$XARGS" && break
12340done
12341
12342    else
12343      # If it succeeded, then it was overridden by the user. We will use it
12344      # for the tool.
12345
12346      # First remove it from the list of overridden variables, so we can test
12347      # for unknown variables in the end.
12348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12349
12350      # Check if we try to supply an empty value
12351      if test "x$XARGS" = x; then
12352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12353$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12355$as_echo_n "checking for XARGS... " >&6; }
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12357$as_echo "disabled" >&6; }
12358      else
12359        # Check if the provided tool contains a complete path.
12360        tool_specified="$XARGS"
12361        tool_basename="${tool_specified##*/}"
12362        if test "x$tool_basename" = "x$tool_specified"; then
12363          # A command without a complete path is provided, search $PATH.
12364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12365$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12366          # Extract the first word of "$tool_basename", so it can be a program name with args.
12367set dummy $tool_basename; ac_word=$2
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12369$as_echo_n "checking for $ac_word... " >&6; }
12370if ${ac_cv_path_XARGS+:} false; then :
12371  $as_echo_n "(cached) " >&6
12372else
12373  case $XARGS in
12374  [\\/]* | ?:[\\/]*)
12375  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12376  ;;
12377  *)
12378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12379for as_dir in $PATH
12380do
12381  IFS=$as_save_IFS
12382  test -z "$as_dir" && as_dir=.
12383    for ac_exec_ext in '' $ac_executable_extensions; do
12384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12385    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12387    break 2
12388  fi
12389done
12390  done
12391IFS=$as_save_IFS
12392
12393  ;;
12394esac
12395fi
12396XARGS=$ac_cv_path_XARGS
12397if test -n "$XARGS"; then
12398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12399$as_echo "$XARGS" >&6; }
12400else
12401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12402$as_echo "no" >&6; }
12403fi
12404
12405
12406          if test "x$XARGS" = x; then
12407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12408          fi
12409        else
12410          # Otherwise we believe it is a complete path. Use it as it is.
12411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12412$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12414$as_echo_n "checking for XARGS... " >&6; }
12415          if test ! -x "$tool_specified"; then
12416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12417$as_echo "not found" >&6; }
12418            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12419          fi
12420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12421$as_echo "$tool_specified" >&6; }
12422        fi
12423      fi
12424    fi
12425
12426  fi
12427
12428
12429
12430  if test "x$XARGS" = x; then
12431    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12432  fi
12433
12434
12435
12436  # Then required tools that require some special treatment.
12437
12438
12439  # Publish this variable in the help.
12440
12441
12442  if [ -z "${AWK+x}" ]; then
12443    # The variable is not set by user, try to locate tool using the code snippet
12444    for ac_prog in gawk mawk nawk awk
12445do
12446  # Extract the first word of "$ac_prog", so it can be a program name with args.
12447set dummy $ac_prog; ac_word=$2
12448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12449$as_echo_n "checking for $ac_word... " >&6; }
12450if ${ac_cv_prog_AWK+:} false; then :
12451  $as_echo_n "(cached) " >&6
12452else
12453  if test -n "$AWK"; then
12454  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12455else
12456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12457for as_dir in $PATH
12458do
12459  IFS=$as_save_IFS
12460  test -z "$as_dir" && as_dir=.
12461    for ac_exec_ext in '' $ac_executable_extensions; do
12462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12463    ac_cv_prog_AWK="$ac_prog"
12464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12465    break 2
12466  fi
12467done
12468  done
12469IFS=$as_save_IFS
12470
12471fi
12472fi
12473AWK=$ac_cv_prog_AWK
12474if test -n "$AWK"; then
12475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12476$as_echo "$AWK" >&6; }
12477else
12478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12479$as_echo "no" >&6; }
12480fi
12481
12482
12483  test -n "$AWK" && break
12484done
12485
12486  else
12487    # The variable is set, but is it from the command line or the environment?
12488
12489    # Try to remove the string !AWK! from our list.
12490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12492      # If it failed, the variable was not from the command line. Ignore it,
12493      # but warn the user (except for BASH, which is always set by the calling BASH).
12494      if test "xAWK" != xBASH; then
12495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12496$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12497      fi
12498      # Try to locate tool using the code snippet
12499      for ac_prog in gawk mawk nawk awk
12500do
12501  # Extract the first word of "$ac_prog", so it can be a program name with args.
12502set dummy $ac_prog; ac_word=$2
12503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12504$as_echo_n "checking for $ac_word... " >&6; }
12505if ${ac_cv_prog_AWK+:} false; then :
12506  $as_echo_n "(cached) " >&6
12507else
12508  if test -n "$AWK"; then
12509  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12510else
12511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12512for as_dir in $PATH
12513do
12514  IFS=$as_save_IFS
12515  test -z "$as_dir" && as_dir=.
12516    for ac_exec_ext in '' $ac_executable_extensions; do
12517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12518    ac_cv_prog_AWK="$ac_prog"
12519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12520    break 2
12521  fi
12522done
12523  done
12524IFS=$as_save_IFS
12525
12526fi
12527fi
12528AWK=$ac_cv_prog_AWK
12529if test -n "$AWK"; then
12530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12531$as_echo "$AWK" >&6; }
12532else
12533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12534$as_echo "no" >&6; }
12535fi
12536
12537
12538  test -n "$AWK" && break
12539done
12540
12541    else
12542      # If it succeeded, then it was overridden by the user. We will use it
12543      # for the tool.
12544
12545      # First remove it from the list of overridden variables, so we can test
12546      # for unknown variables in the end.
12547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12548
12549      # Check if we try to supply an empty value
12550      if test "x$AWK" = x; then
12551        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12552$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12554$as_echo_n "checking for AWK... " >&6; }
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12556$as_echo "disabled" >&6; }
12557      else
12558        # Check if the provided tool contains a complete path.
12559        tool_specified="$AWK"
12560        tool_basename="${tool_specified##*/}"
12561        if test "x$tool_basename" = "x$tool_specified"; then
12562          # A command without a complete path is provided, search $PATH.
12563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12564$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12565          # Extract the first word of "$tool_basename", so it can be a program name with args.
12566set dummy $tool_basename; ac_word=$2
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12568$as_echo_n "checking for $ac_word... " >&6; }
12569if ${ac_cv_path_AWK+:} false; then :
12570  $as_echo_n "(cached) " >&6
12571else
12572  case $AWK in
12573  [\\/]* | ?:[\\/]*)
12574  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12575  ;;
12576  *)
12577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12578for as_dir in $PATH
12579do
12580  IFS=$as_save_IFS
12581  test -z "$as_dir" && as_dir=.
12582    for ac_exec_ext in '' $ac_executable_extensions; do
12583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12584    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12586    break 2
12587  fi
12588done
12589  done
12590IFS=$as_save_IFS
12591
12592  ;;
12593esac
12594fi
12595AWK=$ac_cv_path_AWK
12596if test -n "$AWK"; then
12597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12598$as_echo "$AWK" >&6; }
12599else
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
12602fi
12603
12604
12605          if test "x$AWK" = x; then
12606            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12607          fi
12608        else
12609          # Otherwise we believe it is a complete path. Use it as it is.
12610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12611$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12612          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12613$as_echo_n "checking for AWK... " >&6; }
12614          if test ! -x "$tool_specified"; then
12615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12616$as_echo "not found" >&6; }
12617            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12618          fi
12619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12620$as_echo "$tool_specified" >&6; }
12621        fi
12622      fi
12623    fi
12624
12625  fi
12626
12627
12628  if test "x$AWK" = x; then
12629    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12630  fi
12631
12632
12633
12634
12635  # Publish this variable in the help.
12636
12637
12638  if [ -z "${GREP+x}" ]; then
12639    # The variable is not set by user, try to locate tool using the code snippet
12640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12641$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12642if ${ac_cv_path_GREP+:} false; then :
12643  $as_echo_n "(cached) " >&6
12644else
12645  if test -z "$GREP"; then
12646  ac_path_GREP_found=false
12647  # Loop through the user's path and test for each of PROGNAME-LIST
12648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12649for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12650do
12651  IFS=$as_save_IFS
12652  test -z "$as_dir" && as_dir=.
12653    for ac_prog in grep ggrep; do
12654    for ac_exec_ext in '' $ac_executable_extensions; do
12655      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12656      as_fn_executable_p "$ac_path_GREP" || continue
12657# Check for GNU ac_path_GREP and select it if it is found.
12658  # Check for GNU $ac_path_GREP
12659case `"$ac_path_GREP" --version 2>&1` in
12660*GNU*)
12661  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12662*)
12663  ac_count=0
12664  $as_echo_n 0123456789 >"conftest.in"
12665  while :
12666  do
12667    cat "conftest.in" "conftest.in" >"conftest.tmp"
12668    mv "conftest.tmp" "conftest.in"
12669    cp "conftest.in" "conftest.nl"
12670    $as_echo 'GREP' >> "conftest.nl"
12671    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12672    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12673    as_fn_arith $ac_count + 1 && ac_count=$as_val
12674    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12675      # Best one so far, save it but keep looking for a better one
12676      ac_cv_path_GREP="$ac_path_GREP"
12677      ac_path_GREP_max=$ac_count
12678    fi
12679    # 10*(2^10) chars as input seems more than enough
12680    test $ac_count -gt 10 && break
12681  done
12682  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12683esac
12684
12685      $ac_path_GREP_found && break 3
12686    done
12687  done
12688  done
12689IFS=$as_save_IFS
12690  if test -z "$ac_cv_path_GREP"; then
12691    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12692  fi
12693else
12694  ac_cv_path_GREP=$GREP
12695fi
12696
12697fi
12698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12699$as_echo "$ac_cv_path_GREP" >&6; }
12700 GREP="$ac_cv_path_GREP"
12701
12702
12703  else
12704    # The variable is set, but is it from the command line or the environment?
12705
12706    # Try to remove the string !GREP! from our list.
12707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12709      # If it failed, the variable was not from the command line. Ignore it,
12710      # but warn the user (except for BASH, which is always set by the calling BASH).
12711      if test "xGREP" != xBASH; then
12712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12713$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12714      fi
12715      # Try to locate tool using the code snippet
12716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12717$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12718if ${ac_cv_path_GREP+:} false; then :
12719  $as_echo_n "(cached) " >&6
12720else
12721  if test -z "$GREP"; then
12722  ac_path_GREP_found=false
12723  # Loop through the user's path and test for each of PROGNAME-LIST
12724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12725for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12726do
12727  IFS=$as_save_IFS
12728  test -z "$as_dir" && as_dir=.
12729    for ac_prog in grep ggrep; do
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12732      as_fn_executable_p "$ac_path_GREP" || continue
12733# Check for GNU ac_path_GREP and select it if it is found.
12734  # Check for GNU $ac_path_GREP
12735case `"$ac_path_GREP" --version 2>&1` in
12736*GNU*)
12737  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12738*)
12739  ac_count=0
12740  $as_echo_n 0123456789 >"conftest.in"
12741  while :
12742  do
12743    cat "conftest.in" "conftest.in" >"conftest.tmp"
12744    mv "conftest.tmp" "conftest.in"
12745    cp "conftest.in" "conftest.nl"
12746    $as_echo 'GREP' >> "conftest.nl"
12747    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12748    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12749    as_fn_arith $ac_count + 1 && ac_count=$as_val
12750    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12751      # Best one so far, save it but keep looking for a better one
12752      ac_cv_path_GREP="$ac_path_GREP"
12753      ac_path_GREP_max=$ac_count
12754    fi
12755    # 10*(2^10) chars as input seems more than enough
12756    test $ac_count -gt 10 && break
12757  done
12758  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12759esac
12760
12761      $ac_path_GREP_found && break 3
12762    done
12763  done
12764  done
12765IFS=$as_save_IFS
12766  if test -z "$ac_cv_path_GREP"; then
12767    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12768  fi
12769else
12770  ac_cv_path_GREP=$GREP
12771fi
12772
12773fi
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12775$as_echo "$ac_cv_path_GREP" >&6; }
12776 GREP="$ac_cv_path_GREP"
12777
12778
12779    else
12780      # If it succeeded, then it was overridden by the user. We will use it
12781      # for the tool.
12782
12783      # First remove it from the list of overridden variables, so we can test
12784      # for unknown variables in the end.
12785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12786
12787      # Check if we try to supply an empty value
12788      if test "x$GREP" = x; then
12789        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12790$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12792$as_echo_n "checking for GREP... " >&6; }
12793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12794$as_echo "disabled" >&6; }
12795      else
12796        # Check if the provided tool contains a complete path.
12797        tool_specified="$GREP"
12798        tool_basename="${tool_specified##*/}"
12799        if test "x$tool_basename" = "x$tool_specified"; then
12800          # A command without a complete path is provided, search $PATH.
12801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12802$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12803          # Extract the first word of "$tool_basename", so it can be a program name with args.
12804set dummy $tool_basename; ac_word=$2
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12806$as_echo_n "checking for $ac_word... " >&6; }
12807if ${ac_cv_path_GREP+:} false; then :
12808  $as_echo_n "(cached) " >&6
12809else
12810  case $GREP in
12811  [\\/]* | ?:[\\/]*)
12812  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12813  ;;
12814  *)
12815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12816for as_dir in $PATH
12817do
12818  IFS=$as_save_IFS
12819  test -z "$as_dir" && as_dir=.
12820    for ac_exec_ext in '' $ac_executable_extensions; do
12821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12822    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12824    break 2
12825  fi
12826done
12827  done
12828IFS=$as_save_IFS
12829
12830  ;;
12831esac
12832fi
12833GREP=$ac_cv_path_GREP
12834if test -n "$GREP"; then
12835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12836$as_echo "$GREP" >&6; }
12837else
12838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12839$as_echo "no" >&6; }
12840fi
12841
12842
12843          if test "x$GREP" = x; then
12844            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12845          fi
12846        else
12847          # Otherwise we believe it is a complete path. Use it as it is.
12848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12849$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12850          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12851$as_echo_n "checking for GREP... " >&6; }
12852          if test ! -x "$tool_specified"; then
12853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12854$as_echo "not found" >&6; }
12855            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12856          fi
12857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12858$as_echo "$tool_specified" >&6; }
12859        fi
12860      fi
12861    fi
12862
12863  fi
12864
12865
12866  if test "x$GREP" = x; then
12867    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12868  fi
12869
12870
12871
12872
12873  # Publish this variable in the help.
12874
12875
12876  if [ -z "${EGREP+x}" ]; then
12877    # The variable is not set by user, try to locate tool using the code snippet
12878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12879$as_echo_n "checking for egrep... " >&6; }
12880if ${ac_cv_path_EGREP+:} false; then :
12881  $as_echo_n "(cached) " >&6
12882else
12883  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12884   then ac_cv_path_EGREP="$GREP -E"
12885   else
12886     if test -z "$EGREP"; then
12887  ac_path_EGREP_found=false
12888  # Loop through the user's path and test for each of PROGNAME-LIST
12889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12890for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12891do
12892  IFS=$as_save_IFS
12893  test -z "$as_dir" && as_dir=.
12894    for ac_prog in egrep; do
12895    for ac_exec_ext in '' $ac_executable_extensions; do
12896      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12897      as_fn_executable_p "$ac_path_EGREP" || continue
12898# Check for GNU ac_path_EGREP and select it if it is found.
12899  # Check for GNU $ac_path_EGREP
12900case `"$ac_path_EGREP" --version 2>&1` in
12901*GNU*)
12902  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12903*)
12904  ac_count=0
12905  $as_echo_n 0123456789 >"conftest.in"
12906  while :
12907  do
12908    cat "conftest.in" "conftest.in" >"conftest.tmp"
12909    mv "conftest.tmp" "conftest.in"
12910    cp "conftest.in" "conftest.nl"
12911    $as_echo 'EGREP' >> "conftest.nl"
12912    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12913    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12914    as_fn_arith $ac_count + 1 && ac_count=$as_val
12915    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12916      # Best one so far, save it but keep looking for a better one
12917      ac_cv_path_EGREP="$ac_path_EGREP"
12918      ac_path_EGREP_max=$ac_count
12919    fi
12920    # 10*(2^10) chars as input seems more than enough
12921    test $ac_count -gt 10 && break
12922  done
12923  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12924esac
12925
12926      $ac_path_EGREP_found && break 3
12927    done
12928  done
12929  done
12930IFS=$as_save_IFS
12931  if test -z "$ac_cv_path_EGREP"; then
12932    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12933  fi
12934else
12935  ac_cv_path_EGREP=$EGREP
12936fi
12937
12938   fi
12939fi
12940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12941$as_echo "$ac_cv_path_EGREP" >&6; }
12942 EGREP="$ac_cv_path_EGREP"
12943
12944
12945  else
12946    # The variable is set, but is it from the command line or the environment?
12947
12948    # Try to remove the string !EGREP! from our list.
12949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12951      # If it failed, the variable was not from the command line. Ignore it,
12952      # but warn the user (except for BASH, which is always set by the calling BASH).
12953      if test "xEGREP" != xBASH; then
12954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12955$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12956      fi
12957      # Try to locate tool using the code snippet
12958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12959$as_echo_n "checking for egrep... " >&6; }
12960if ${ac_cv_path_EGREP+:} false; then :
12961  $as_echo_n "(cached) " >&6
12962else
12963  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12964   then ac_cv_path_EGREP="$GREP -E"
12965   else
12966     if test -z "$EGREP"; then
12967  ac_path_EGREP_found=false
12968  # Loop through the user's path and test for each of PROGNAME-LIST
12969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12970for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12971do
12972  IFS=$as_save_IFS
12973  test -z "$as_dir" && as_dir=.
12974    for ac_prog in egrep; do
12975    for ac_exec_ext in '' $ac_executable_extensions; do
12976      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12977      as_fn_executable_p "$ac_path_EGREP" || continue
12978# Check for GNU ac_path_EGREP and select it if it is found.
12979  # Check for GNU $ac_path_EGREP
12980case `"$ac_path_EGREP" --version 2>&1` in
12981*GNU*)
12982  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12983*)
12984  ac_count=0
12985  $as_echo_n 0123456789 >"conftest.in"
12986  while :
12987  do
12988    cat "conftest.in" "conftest.in" >"conftest.tmp"
12989    mv "conftest.tmp" "conftest.in"
12990    cp "conftest.in" "conftest.nl"
12991    $as_echo 'EGREP' >> "conftest.nl"
12992    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12993    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12994    as_fn_arith $ac_count + 1 && ac_count=$as_val
12995    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12996      # Best one so far, save it but keep looking for a better one
12997      ac_cv_path_EGREP="$ac_path_EGREP"
12998      ac_path_EGREP_max=$ac_count
12999    fi
13000    # 10*(2^10) chars as input seems more than enough
13001    test $ac_count -gt 10 && break
13002  done
13003  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13004esac
13005
13006      $ac_path_EGREP_found && break 3
13007    done
13008  done
13009  done
13010IFS=$as_save_IFS
13011  if test -z "$ac_cv_path_EGREP"; then
13012    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13013  fi
13014else
13015  ac_cv_path_EGREP=$EGREP
13016fi
13017
13018   fi
13019fi
13020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13021$as_echo "$ac_cv_path_EGREP" >&6; }
13022 EGREP="$ac_cv_path_EGREP"
13023
13024
13025    else
13026      # If it succeeded, then it was overridden by the user. We will use it
13027      # for the tool.
13028
13029      # First remove it from the list of overridden variables, so we can test
13030      # for unknown variables in the end.
13031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13032
13033      # Check if we try to supply an empty value
13034      if test "x$EGREP" = x; then
13035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13036$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13038$as_echo_n "checking for EGREP... " >&6; }
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13040$as_echo "disabled" >&6; }
13041      else
13042        # Check if the provided tool contains a complete path.
13043        tool_specified="$EGREP"
13044        tool_basename="${tool_specified##*/}"
13045        if test "x$tool_basename" = "x$tool_specified"; then
13046          # A command without a complete path is provided, search $PATH.
13047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13048$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13049          # Extract the first word of "$tool_basename", so it can be a program name with args.
13050set dummy $tool_basename; ac_word=$2
13051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13052$as_echo_n "checking for $ac_word... " >&6; }
13053if ${ac_cv_path_EGREP+:} false; then :
13054  $as_echo_n "(cached) " >&6
13055else
13056  case $EGREP in
13057  [\\/]* | ?:[\\/]*)
13058  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13059  ;;
13060  *)
13061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13062for as_dir in $PATH
13063do
13064  IFS=$as_save_IFS
13065  test -z "$as_dir" && as_dir=.
13066    for ac_exec_ext in '' $ac_executable_extensions; do
13067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13068    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13070    break 2
13071  fi
13072done
13073  done
13074IFS=$as_save_IFS
13075
13076  ;;
13077esac
13078fi
13079EGREP=$ac_cv_path_EGREP
13080if test -n "$EGREP"; then
13081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13082$as_echo "$EGREP" >&6; }
13083else
13084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13085$as_echo "no" >&6; }
13086fi
13087
13088
13089          if test "x$EGREP" = x; then
13090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13091          fi
13092        else
13093          # Otherwise we believe it is a complete path. Use it as it is.
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13095$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13097$as_echo_n "checking for EGREP... " >&6; }
13098          if test ! -x "$tool_specified"; then
13099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13100$as_echo "not found" >&6; }
13101            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13102          fi
13103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13104$as_echo "$tool_specified" >&6; }
13105        fi
13106      fi
13107    fi
13108
13109  fi
13110
13111
13112  if test "x$EGREP" = x; then
13113    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13114  fi
13115
13116
13117
13118
13119  # Publish this variable in the help.
13120
13121
13122  if [ -z "${FGREP+x}" ]; then
13123    # The variable is not set by user, try to locate tool using the code snippet
13124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13125$as_echo_n "checking for fgrep... " >&6; }
13126if ${ac_cv_path_FGREP+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13130   then ac_cv_path_FGREP="$GREP -F"
13131   else
13132     if test -z "$FGREP"; then
13133  ac_path_FGREP_found=false
13134  # Loop through the user's path and test for each of PROGNAME-LIST
13135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13136for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13137do
13138  IFS=$as_save_IFS
13139  test -z "$as_dir" && as_dir=.
13140    for ac_prog in fgrep; do
13141    for ac_exec_ext in '' $ac_executable_extensions; do
13142      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13143      as_fn_executable_p "$ac_path_FGREP" || continue
13144# Check for GNU ac_path_FGREP and select it if it is found.
13145  # Check for GNU $ac_path_FGREP
13146case `"$ac_path_FGREP" --version 2>&1` in
13147*GNU*)
13148  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13149*)
13150  ac_count=0
13151  $as_echo_n 0123456789 >"conftest.in"
13152  while :
13153  do
13154    cat "conftest.in" "conftest.in" >"conftest.tmp"
13155    mv "conftest.tmp" "conftest.in"
13156    cp "conftest.in" "conftest.nl"
13157    $as_echo 'FGREP' >> "conftest.nl"
13158    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13159    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13160    as_fn_arith $ac_count + 1 && ac_count=$as_val
13161    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13162      # Best one so far, save it but keep looking for a better one
13163      ac_cv_path_FGREP="$ac_path_FGREP"
13164      ac_path_FGREP_max=$ac_count
13165    fi
13166    # 10*(2^10) chars as input seems more than enough
13167    test $ac_count -gt 10 && break
13168  done
13169  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13170esac
13171
13172      $ac_path_FGREP_found && break 3
13173    done
13174  done
13175  done
13176IFS=$as_save_IFS
13177  if test -z "$ac_cv_path_FGREP"; then
13178    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13179  fi
13180else
13181  ac_cv_path_FGREP=$FGREP
13182fi
13183
13184   fi
13185fi
13186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13187$as_echo "$ac_cv_path_FGREP" >&6; }
13188 FGREP="$ac_cv_path_FGREP"
13189
13190
13191  else
13192    # The variable is set, but is it from the command line or the environment?
13193
13194    # Try to remove the string !FGREP! from our list.
13195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13197      # If it failed, the variable was not from the command line. Ignore it,
13198      # but warn the user (except for BASH, which is always set by the calling BASH).
13199      if test "xFGREP" != xBASH; then
13200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13201$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13202      fi
13203      # Try to locate tool using the code snippet
13204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13205$as_echo_n "checking for fgrep... " >&6; }
13206if ${ac_cv_path_FGREP+:} false; then :
13207  $as_echo_n "(cached) " >&6
13208else
13209  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13210   then ac_cv_path_FGREP="$GREP -F"
13211   else
13212     if test -z "$FGREP"; then
13213  ac_path_FGREP_found=false
13214  # Loop through the user's path and test for each of PROGNAME-LIST
13215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13216for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13217do
13218  IFS=$as_save_IFS
13219  test -z "$as_dir" && as_dir=.
13220    for ac_prog in fgrep; do
13221    for ac_exec_ext in '' $ac_executable_extensions; do
13222      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13223      as_fn_executable_p "$ac_path_FGREP" || continue
13224# Check for GNU ac_path_FGREP and select it if it is found.
13225  # Check for GNU $ac_path_FGREP
13226case `"$ac_path_FGREP" --version 2>&1` in
13227*GNU*)
13228  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13229*)
13230  ac_count=0
13231  $as_echo_n 0123456789 >"conftest.in"
13232  while :
13233  do
13234    cat "conftest.in" "conftest.in" >"conftest.tmp"
13235    mv "conftest.tmp" "conftest.in"
13236    cp "conftest.in" "conftest.nl"
13237    $as_echo 'FGREP' >> "conftest.nl"
13238    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13239    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13240    as_fn_arith $ac_count + 1 && ac_count=$as_val
13241    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13242      # Best one so far, save it but keep looking for a better one
13243      ac_cv_path_FGREP="$ac_path_FGREP"
13244      ac_path_FGREP_max=$ac_count
13245    fi
13246    # 10*(2^10) chars as input seems more than enough
13247    test $ac_count -gt 10 && break
13248  done
13249  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13250esac
13251
13252      $ac_path_FGREP_found && break 3
13253    done
13254  done
13255  done
13256IFS=$as_save_IFS
13257  if test -z "$ac_cv_path_FGREP"; then
13258    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13259  fi
13260else
13261  ac_cv_path_FGREP=$FGREP
13262fi
13263
13264   fi
13265fi
13266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13267$as_echo "$ac_cv_path_FGREP" >&6; }
13268 FGREP="$ac_cv_path_FGREP"
13269
13270
13271    else
13272      # If it succeeded, then it was overridden by the user. We will use it
13273      # for the tool.
13274
13275      # First remove it from the list of overridden variables, so we can test
13276      # for unknown variables in the end.
13277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13278
13279      # Check if we try to supply an empty value
13280      if test "x$FGREP" = x; then
13281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13282$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13284$as_echo_n "checking for FGREP... " >&6; }
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13286$as_echo "disabled" >&6; }
13287      else
13288        # Check if the provided tool contains a complete path.
13289        tool_specified="$FGREP"
13290        tool_basename="${tool_specified##*/}"
13291        if test "x$tool_basename" = "x$tool_specified"; then
13292          # A command without a complete path is provided, search $PATH.
13293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13294$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13295          # Extract the first word of "$tool_basename", so it can be a program name with args.
13296set dummy $tool_basename; ac_word=$2
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13298$as_echo_n "checking for $ac_word... " >&6; }
13299if ${ac_cv_path_FGREP+:} false; then :
13300  $as_echo_n "(cached) " >&6
13301else
13302  case $FGREP in
13303  [\\/]* | ?:[\\/]*)
13304  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13305  ;;
13306  *)
13307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13308for as_dir in $PATH
13309do
13310  IFS=$as_save_IFS
13311  test -z "$as_dir" && as_dir=.
13312    for ac_exec_ext in '' $ac_executable_extensions; do
13313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13314    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13316    break 2
13317  fi
13318done
13319  done
13320IFS=$as_save_IFS
13321
13322  ;;
13323esac
13324fi
13325FGREP=$ac_cv_path_FGREP
13326if test -n "$FGREP"; then
13327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13328$as_echo "$FGREP" >&6; }
13329else
13330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13331$as_echo "no" >&6; }
13332fi
13333
13334
13335          if test "x$FGREP" = x; then
13336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13337          fi
13338        else
13339          # Otherwise we believe it is a complete path. Use it as it is.
13340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13341$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13343$as_echo_n "checking for FGREP... " >&6; }
13344          if test ! -x "$tool_specified"; then
13345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13346$as_echo "not found" >&6; }
13347            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13348          fi
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13350$as_echo "$tool_specified" >&6; }
13351        fi
13352      fi
13353    fi
13354
13355  fi
13356
13357
13358  if test "x$FGREP" = x; then
13359    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13360  fi
13361
13362
13363
13364
13365  # Publish this variable in the help.
13366
13367
13368  if [ -z "${SED+x}" ]; then
13369    # The variable is not set by user, try to locate tool using the code snippet
13370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13371$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13372if ${ac_cv_path_SED+:} false; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13376     for ac_i in 1 2 3 4 5 6 7; do
13377       ac_script="$ac_script$as_nl$ac_script"
13378     done
13379     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13380     { ac_script=; unset ac_script;}
13381     if test -z "$SED"; then
13382  ac_path_SED_found=false
13383  # Loop through the user's path and test for each of PROGNAME-LIST
13384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13385for as_dir in $PATH
13386do
13387  IFS=$as_save_IFS
13388  test -z "$as_dir" && as_dir=.
13389    for ac_prog in sed gsed; do
13390    for ac_exec_ext in '' $ac_executable_extensions; do
13391      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13392      as_fn_executable_p "$ac_path_SED" || continue
13393# Check for GNU ac_path_SED and select it if it is found.
13394  # Check for GNU $ac_path_SED
13395case `"$ac_path_SED" --version 2>&1` in
13396*GNU*)
13397  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13398*)
13399  ac_count=0
13400  $as_echo_n 0123456789 >"conftest.in"
13401  while :
13402  do
13403    cat "conftest.in" "conftest.in" >"conftest.tmp"
13404    mv "conftest.tmp" "conftest.in"
13405    cp "conftest.in" "conftest.nl"
13406    $as_echo '' >> "conftest.nl"
13407    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13408    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13409    as_fn_arith $ac_count + 1 && ac_count=$as_val
13410    if test $ac_count -gt ${ac_path_SED_max-0}; then
13411      # Best one so far, save it but keep looking for a better one
13412      ac_cv_path_SED="$ac_path_SED"
13413      ac_path_SED_max=$ac_count
13414    fi
13415    # 10*(2^10) chars as input seems more than enough
13416    test $ac_count -gt 10 && break
13417  done
13418  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13419esac
13420
13421      $ac_path_SED_found && break 3
13422    done
13423  done
13424  done
13425IFS=$as_save_IFS
13426  if test -z "$ac_cv_path_SED"; then
13427    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13428  fi
13429else
13430  ac_cv_path_SED=$SED
13431fi
13432
13433fi
13434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13435$as_echo "$ac_cv_path_SED" >&6; }
13436 SED="$ac_cv_path_SED"
13437  rm -f conftest.sed
13438
13439  else
13440    # The variable is set, but is it from the command line or the environment?
13441
13442    # Try to remove the string !SED! from our list.
13443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13445      # If it failed, the variable was not from the command line. Ignore it,
13446      # but warn the user (except for BASH, which is always set by the calling BASH).
13447      if test "xSED" != xBASH; then
13448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13449$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13450      fi
13451      # Try to locate tool using the code snippet
13452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13453$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13454if ${ac_cv_path_SED+:} false; then :
13455  $as_echo_n "(cached) " >&6
13456else
13457            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13458     for ac_i in 1 2 3 4 5 6 7; do
13459       ac_script="$ac_script$as_nl$ac_script"
13460     done
13461     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13462     { ac_script=; unset ac_script;}
13463     if test -z "$SED"; then
13464  ac_path_SED_found=false
13465  # Loop through the user's path and test for each of PROGNAME-LIST
13466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13467for as_dir in $PATH
13468do
13469  IFS=$as_save_IFS
13470  test -z "$as_dir" && as_dir=.
13471    for ac_prog in sed gsed; do
13472    for ac_exec_ext in '' $ac_executable_extensions; do
13473      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13474      as_fn_executable_p "$ac_path_SED" || continue
13475# Check for GNU ac_path_SED and select it if it is found.
13476  # Check for GNU $ac_path_SED
13477case `"$ac_path_SED" --version 2>&1` in
13478*GNU*)
13479  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13480*)
13481  ac_count=0
13482  $as_echo_n 0123456789 >"conftest.in"
13483  while :
13484  do
13485    cat "conftest.in" "conftest.in" >"conftest.tmp"
13486    mv "conftest.tmp" "conftest.in"
13487    cp "conftest.in" "conftest.nl"
13488    $as_echo '' >> "conftest.nl"
13489    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13490    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13491    as_fn_arith $ac_count + 1 && ac_count=$as_val
13492    if test $ac_count -gt ${ac_path_SED_max-0}; then
13493      # Best one so far, save it but keep looking for a better one
13494      ac_cv_path_SED="$ac_path_SED"
13495      ac_path_SED_max=$ac_count
13496    fi
13497    # 10*(2^10) chars as input seems more than enough
13498    test $ac_count -gt 10 && break
13499  done
13500  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13501esac
13502
13503      $ac_path_SED_found && break 3
13504    done
13505  done
13506  done
13507IFS=$as_save_IFS
13508  if test -z "$ac_cv_path_SED"; then
13509    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13510  fi
13511else
13512  ac_cv_path_SED=$SED
13513fi
13514
13515fi
13516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13517$as_echo "$ac_cv_path_SED" >&6; }
13518 SED="$ac_cv_path_SED"
13519  rm -f conftest.sed
13520
13521    else
13522      # If it succeeded, then it was overridden by the user. We will use it
13523      # for the tool.
13524
13525      # First remove it from the list of overridden variables, so we can test
13526      # for unknown variables in the end.
13527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13528
13529      # Check if we try to supply an empty value
13530      if test "x$SED" = x; then
13531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13532$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13534$as_echo_n "checking for SED... " >&6; }
13535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13536$as_echo "disabled" >&6; }
13537      else
13538        # Check if the provided tool contains a complete path.
13539        tool_specified="$SED"
13540        tool_basename="${tool_specified##*/}"
13541        if test "x$tool_basename" = "x$tool_specified"; then
13542          # A command without a complete path is provided, search $PATH.
13543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13544$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13545          # Extract the first word of "$tool_basename", so it can be a program name with args.
13546set dummy $tool_basename; ac_word=$2
13547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13548$as_echo_n "checking for $ac_word... " >&6; }
13549if ${ac_cv_path_SED+:} false; then :
13550  $as_echo_n "(cached) " >&6
13551else
13552  case $SED in
13553  [\\/]* | ?:[\\/]*)
13554  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13555  ;;
13556  *)
13557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13558for as_dir in $PATH
13559do
13560  IFS=$as_save_IFS
13561  test -z "$as_dir" && as_dir=.
13562    for ac_exec_ext in '' $ac_executable_extensions; do
13563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13564    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13566    break 2
13567  fi
13568done
13569  done
13570IFS=$as_save_IFS
13571
13572  ;;
13573esac
13574fi
13575SED=$ac_cv_path_SED
13576if test -n "$SED"; then
13577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13578$as_echo "$SED" >&6; }
13579else
13580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13581$as_echo "no" >&6; }
13582fi
13583
13584
13585          if test "x$SED" = x; then
13586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13587          fi
13588        else
13589          # Otherwise we believe it is a complete path. Use it as it is.
13590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13591$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13593$as_echo_n "checking for SED... " >&6; }
13594          if test ! -x "$tool_specified"; then
13595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13596$as_echo "not found" >&6; }
13597            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13598          fi
13599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13600$as_echo "$tool_specified" >&6; }
13601        fi
13602      fi
13603    fi
13604
13605  fi
13606
13607
13608  if test "x$SED" = x; then
13609    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13610  fi
13611
13612
13613
13614  # Always force rm.
13615  RM="$RM -f"
13616
13617  # pwd behaves differently on various platforms and some don't support the -L flag.
13618  # Always use the bash builtin pwd to get uniform behavior.
13619  THEPWDCMD=pwd
13620
13621  # These are not required on all platforms
13622
13623
13624  # Publish this variable in the help.
13625
13626
13627  if [ -z "${CYGPATH+x}" ]; then
13628    # The variable is not set by user, try to locate tool using the code snippet
13629    for ac_prog in cygpath
13630do
13631  # Extract the first word of "$ac_prog", so it can be a program name with args.
13632set dummy $ac_prog; ac_word=$2
13633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13634$as_echo_n "checking for $ac_word... " >&6; }
13635if ${ac_cv_path_CYGPATH+:} false; then :
13636  $as_echo_n "(cached) " >&6
13637else
13638  case $CYGPATH in
13639  [\\/]* | ?:[\\/]*)
13640  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13641  ;;
13642  *)
13643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13644for as_dir in $PATH
13645do
13646  IFS=$as_save_IFS
13647  test -z "$as_dir" && as_dir=.
13648    for ac_exec_ext in '' $ac_executable_extensions; do
13649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13650    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13652    break 2
13653  fi
13654done
13655  done
13656IFS=$as_save_IFS
13657
13658  ;;
13659esac
13660fi
13661CYGPATH=$ac_cv_path_CYGPATH
13662if test -n "$CYGPATH"; then
13663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13664$as_echo "$CYGPATH" >&6; }
13665else
13666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13667$as_echo "no" >&6; }
13668fi
13669
13670
13671  test -n "$CYGPATH" && break
13672done
13673
13674  else
13675    # The variable is set, but is it from the command line or the environment?
13676
13677    # Try to remove the string !CYGPATH! from our list.
13678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13680      # If it failed, the variable was not from the command line. Ignore it,
13681      # but warn the user (except for BASH, which is always set by the calling BASH).
13682      if test "xCYGPATH" != xBASH; then
13683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13684$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13685      fi
13686      # Try to locate tool using the code snippet
13687      for ac_prog in cygpath
13688do
13689  # Extract the first word of "$ac_prog", so it can be a program name with args.
13690set dummy $ac_prog; ac_word=$2
13691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13692$as_echo_n "checking for $ac_word... " >&6; }
13693if ${ac_cv_path_CYGPATH+:} false; then :
13694  $as_echo_n "(cached) " >&6
13695else
13696  case $CYGPATH in
13697  [\\/]* | ?:[\\/]*)
13698  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13699  ;;
13700  *)
13701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13702for as_dir in $PATH
13703do
13704  IFS=$as_save_IFS
13705  test -z "$as_dir" && as_dir=.
13706    for ac_exec_ext in '' $ac_executable_extensions; do
13707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13708    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13710    break 2
13711  fi
13712done
13713  done
13714IFS=$as_save_IFS
13715
13716  ;;
13717esac
13718fi
13719CYGPATH=$ac_cv_path_CYGPATH
13720if test -n "$CYGPATH"; then
13721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13722$as_echo "$CYGPATH" >&6; }
13723else
13724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13725$as_echo "no" >&6; }
13726fi
13727
13728
13729  test -n "$CYGPATH" && break
13730done
13731
13732    else
13733      # If it succeeded, then it was overridden by the user. We will use it
13734      # for the tool.
13735
13736      # First remove it from the list of overridden variables, so we can test
13737      # for unknown variables in the end.
13738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13739
13740      # Check if we try to supply an empty value
13741      if test "x$CYGPATH" = x; then
13742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13743$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13745$as_echo_n "checking for CYGPATH... " >&6; }
13746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13747$as_echo "disabled" >&6; }
13748      else
13749        # Check if the provided tool contains a complete path.
13750        tool_specified="$CYGPATH"
13751        tool_basename="${tool_specified##*/}"
13752        if test "x$tool_basename" = "x$tool_specified"; then
13753          # A command without a complete path is provided, search $PATH.
13754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13755$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13756          # Extract the first word of "$tool_basename", so it can be a program name with args.
13757set dummy $tool_basename; ac_word=$2
13758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13759$as_echo_n "checking for $ac_word... " >&6; }
13760if ${ac_cv_path_CYGPATH+:} false; then :
13761  $as_echo_n "(cached) " >&6
13762else
13763  case $CYGPATH in
13764  [\\/]* | ?:[\\/]*)
13765  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13766  ;;
13767  *)
13768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13769for as_dir in $PATH
13770do
13771  IFS=$as_save_IFS
13772  test -z "$as_dir" && as_dir=.
13773    for ac_exec_ext in '' $ac_executable_extensions; do
13774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13775    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13777    break 2
13778  fi
13779done
13780  done
13781IFS=$as_save_IFS
13782
13783  ;;
13784esac
13785fi
13786CYGPATH=$ac_cv_path_CYGPATH
13787if test -n "$CYGPATH"; then
13788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13789$as_echo "$CYGPATH" >&6; }
13790else
13791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13792$as_echo "no" >&6; }
13793fi
13794
13795
13796          if test "x$CYGPATH" = x; then
13797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13798          fi
13799        else
13800          # Otherwise we believe it is a complete path. Use it as it is.
13801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13802$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13804$as_echo_n "checking for CYGPATH... " >&6; }
13805          if test ! -x "$tool_specified"; then
13806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13807$as_echo "not found" >&6; }
13808            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13809          fi
13810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13811$as_echo "$tool_specified" >&6; }
13812        fi
13813      fi
13814    fi
13815
13816  fi
13817
13818
13819
13820
13821  # Publish this variable in the help.
13822
13823
13824  if [ -z "${READLINK+x}" ]; then
13825    # The variable is not set by user, try to locate tool using the code snippet
13826    for ac_prog in greadlink readlink
13827do
13828  # Extract the first word of "$ac_prog", so it can be a program name with args.
13829set dummy $ac_prog; ac_word=$2
13830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13831$as_echo_n "checking for $ac_word... " >&6; }
13832if ${ac_cv_path_READLINK+:} false; then :
13833  $as_echo_n "(cached) " >&6
13834else
13835  case $READLINK in
13836  [\\/]* | ?:[\\/]*)
13837  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13838  ;;
13839  *)
13840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13841for as_dir in $PATH
13842do
13843  IFS=$as_save_IFS
13844  test -z "$as_dir" && as_dir=.
13845    for ac_exec_ext in '' $ac_executable_extensions; do
13846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13847    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13849    break 2
13850  fi
13851done
13852  done
13853IFS=$as_save_IFS
13854
13855  ;;
13856esac
13857fi
13858READLINK=$ac_cv_path_READLINK
13859if test -n "$READLINK"; then
13860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13861$as_echo "$READLINK" >&6; }
13862else
13863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13864$as_echo "no" >&6; }
13865fi
13866
13867
13868  test -n "$READLINK" && break
13869done
13870
13871  else
13872    # The variable is set, but is it from the command line or the environment?
13873
13874    # Try to remove the string !READLINK! from our list.
13875    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13876    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13877      # If it failed, the variable was not from the command line. Ignore it,
13878      # but warn the user (except for BASH, which is always set by the calling BASH).
13879      if test "xREADLINK" != xBASH; then
13880        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13881$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13882      fi
13883      # Try to locate tool using the code snippet
13884      for ac_prog in greadlink readlink
13885do
13886  # Extract the first word of "$ac_prog", so it can be a program name with args.
13887set dummy $ac_prog; ac_word=$2
13888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13889$as_echo_n "checking for $ac_word... " >&6; }
13890if ${ac_cv_path_READLINK+:} false; then :
13891  $as_echo_n "(cached) " >&6
13892else
13893  case $READLINK in
13894  [\\/]* | ?:[\\/]*)
13895  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13896  ;;
13897  *)
13898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13899for as_dir in $PATH
13900do
13901  IFS=$as_save_IFS
13902  test -z "$as_dir" && as_dir=.
13903    for ac_exec_ext in '' $ac_executable_extensions; do
13904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13905    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13907    break 2
13908  fi
13909done
13910  done
13911IFS=$as_save_IFS
13912
13913  ;;
13914esac
13915fi
13916READLINK=$ac_cv_path_READLINK
13917if test -n "$READLINK"; then
13918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13919$as_echo "$READLINK" >&6; }
13920else
13921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13922$as_echo "no" >&6; }
13923fi
13924
13925
13926  test -n "$READLINK" && break
13927done
13928
13929    else
13930      # If it succeeded, then it was overridden by the user. We will use it
13931      # for the tool.
13932
13933      # First remove it from the list of overridden variables, so we can test
13934      # for unknown variables in the end.
13935      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13936
13937      # Check if we try to supply an empty value
13938      if test "x$READLINK" = x; then
13939        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13940$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13942$as_echo_n "checking for READLINK... " >&6; }
13943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13944$as_echo "disabled" >&6; }
13945      else
13946        # Check if the provided tool contains a complete path.
13947        tool_specified="$READLINK"
13948        tool_basename="${tool_specified##*/}"
13949        if test "x$tool_basename" = "x$tool_specified"; then
13950          # A command without a complete path is provided, search $PATH.
13951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13952$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13953          # Extract the first word of "$tool_basename", so it can be a program name with args.
13954set dummy $tool_basename; ac_word=$2
13955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13956$as_echo_n "checking for $ac_word... " >&6; }
13957if ${ac_cv_path_READLINK+:} false; then :
13958  $as_echo_n "(cached) " >&6
13959else
13960  case $READLINK in
13961  [\\/]* | ?:[\\/]*)
13962  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13963  ;;
13964  *)
13965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13966for as_dir in $PATH
13967do
13968  IFS=$as_save_IFS
13969  test -z "$as_dir" && as_dir=.
13970    for ac_exec_ext in '' $ac_executable_extensions; do
13971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13972    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13974    break 2
13975  fi
13976done
13977  done
13978IFS=$as_save_IFS
13979
13980  ;;
13981esac
13982fi
13983READLINK=$ac_cv_path_READLINK
13984if test -n "$READLINK"; then
13985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13986$as_echo "$READLINK" >&6; }
13987else
13988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13989$as_echo "no" >&6; }
13990fi
13991
13992
13993          if test "x$READLINK" = x; then
13994            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13995          fi
13996        else
13997          # Otherwise we believe it is a complete path. Use it as it is.
13998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13999$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14000          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14001$as_echo_n "checking for READLINK... " >&6; }
14002          if test ! -x "$tool_specified"; then
14003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14004$as_echo "not found" >&6; }
14005            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14006          fi
14007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14008$as_echo "$tool_specified" >&6; }
14009        fi
14010      fi
14011    fi
14012
14013  fi
14014
14015
14016
14017
14018  # Publish this variable in the help.
14019
14020
14021  if [ -z "${DF+x}" ]; then
14022    # The variable is not set by user, try to locate tool using the code snippet
14023    for ac_prog in df
14024do
14025  # Extract the first word of "$ac_prog", so it can be a program name with args.
14026set dummy $ac_prog; ac_word=$2
14027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14028$as_echo_n "checking for $ac_word... " >&6; }
14029if ${ac_cv_path_DF+:} false; then :
14030  $as_echo_n "(cached) " >&6
14031else
14032  case $DF in
14033  [\\/]* | ?:[\\/]*)
14034  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14035  ;;
14036  *)
14037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14038for as_dir in $PATH
14039do
14040  IFS=$as_save_IFS
14041  test -z "$as_dir" && as_dir=.
14042    for ac_exec_ext in '' $ac_executable_extensions; do
14043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14044    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14046    break 2
14047  fi
14048done
14049  done
14050IFS=$as_save_IFS
14051
14052  ;;
14053esac
14054fi
14055DF=$ac_cv_path_DF
14056if test -n "$DF"; then
14057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14058$as_echo "$DF" >&6; }
14059else
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14061$as_echo "no" >&6; }
14062fi
14063
14064
14065  test -n "$DF" && break
14066done
14067
14068  else
14069    # The variable is set, but is it from the command line or the environment?
14070
14071    # Try to remove the string !DF! from our list.
14072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14074      # If it failed, the variable was not from the command line. Ignore it,
14075      # but warn the user (except for BASH, which is always set by the calling BASH).
14076      if test "xDF" != xBASH; then
14077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14078$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14079      fi
14080      # Try to locate tool using the code snippet
14081      for ac_prog in df
14082do
14083  # Extract the first word of "$ac_prog", so it can be a program name with args.
14084set dummy $ac_prog; ac_word=$2
14085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14086$as_echo_n "checking for $ac_word... " >&6; }
14087if ${ac_cv_path_DF+:} false; then :
14088  $as_echo_n "(cached) " >&6
14089else
14090  case $DF in
14091  [\\/]* | ?:[\\/]*)
14092  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14093  ;;
14094  *)
14095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14096for as_dir in $PATH
14097do
14098  IFS=$as_save_IFS
14099  test -z "$as_dir" && as_dir=.
14100    for ac_exec_ext in '' $ac_executable_extensions; do
14101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14102    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14104    break 2
14105  fi
14106done
14107  done
14108IFS=$as_save_IFS
14109
14110  ;;
14111esac
14112fi
14113DF=$ac_cv_path_DF
14114if test -n "$DF"; then
14115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14116$as_echo "$DF" >&6; }
14117else
14118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14119$as_echo "no" >&6; }
14120fi
14121
14122
14123  test -n "$DF" && break
14124done
14125
14126    else
14127      # If it succeeded, then it was overridden by the user. We will use it
14128      # for the tool.
14129
14130      # First remove it from the list of overridden variables, so we can test
14131      # for unknown variables in the end.
14132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14133
14134      # Check if we try to supply an empty value
14135      if test "x$DF" = x; then
14136        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14137$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14139$as_echo_n "checking for DF... " >&6; }
14140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14141$as_echo "disabled" >&6; }
14142      else
14143        # Check if the provided tool contains a complete path.
14144        tool_specified="$DF"
14145        tool_basename="${tool_specified##*/}"
14146        if test "x$tool_basename" = "x$tool_specified"; then
14147          # A command without a complete path is provided, search $PATH.
14148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14149$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14150          # Extract the first word of "$tool_basename", so it can be a program name with args.
14151set dummy $tool_basename; ac_word=$2
14152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14153$as_echo_n "checking for $ac_word... " >&6; }
14154if ${ac_cv_path_DF+:} false; then :
14155  $as_echo_n "(cached) " >&6
14156else
14157  case $DF in
14158  [\\/]* | ?:[\\/]*)
14159  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14160  ;;
14161  *)
14162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14163for as_dir in $PATH
14164do
14165  IFS=$as_save_IFS
14166  test -z "$as_dir" && as_dir=.
14167    for ac_exec_ext in '' $ac_executable_extensions; do
14168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14169    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14171    break 2
14172  fi
14173done
14174  done
14175IFS=$as_save_IFS
14176
14177  ;;
14178esac
14179fi
14180DF=$ac_cv_path_DF
14181if test -n "$DF"; then
14182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14183$as_echo "$DF" >&6; }
14184else
14185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14186$as_echo "no" >&6; }
14187fi
14188
14189
14190          if test "x$DF" = x; then
14191            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14192          fi
14193        else
14194          # Otherwise we believe it is a complete path. Use it as it is.
14195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14196$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14198$as_echo_n "checking for DF... " >&6; }
14199          if test ! -x "$tool_specified"; then
14200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14201$as_echo "not found" >&6; }
14202            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14203          fi
14204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14205$as_echo "$tool_specified" >&6; }
14206        fi
14207      fi
14208    fi
14209
14210  fi
14211
14212
14213
14214
14215  # Publish this variable in the help.
14216
14217
14218  if [ -z "${CPIO+x}" ]; then
14219    # The variable is not set by user, try to locate tool using the code snippet
14220    for ac_prog in cpio bsdcpio
14221do
14222  # Extract the first word of "$ac_prog", so it can be a program name with args.
14223set dummy $ac_prog; ac_word=$2
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14225$as_echo_n "checking for $ac_word... " >&6; }
14226if ${ac_cv_path_CPIO+:} false; then :
14227  $as_echo_n "(cached) " >&6
14228else
14229  case $CPIO in
14230  [\\/]* | ?:[\\/]*)
14231  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14232  ;;
14233  *)
14234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14235for as_dir in $PATH
14236do
14237  IFS=$as_save_IFS
14238  test -z "$as_dir" && as_dir=.
14239    for ac_exec_ext in '' $ac_executable_extensions; do
14240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14241    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14243    break 2
14244  fi
14245done
14246  done
14247IFS=$as_save_IFS
14248
14249  ;;
14250esac
14251fi
14252CPIO=$ac_cv_path_CPIO
14253if test -n "$CPIO"; then
14254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14255$as_echo "$CPIO" >&6; }
14256else
14257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14258$as_echo "no" >&6; }
14259fi
14260
14261
14262  test -n "$CPIO" && break
14263done
14264
14265  else
14266    # The variable is set, but is it from the command line or the environment?
14267
14268    # Try to remove the string !CPIO! from our list.
14269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14271      # If it failed, the variable was not from the command line. Ignore it,
14272      # but warn the user (except for BASH, which is always set by the calling BASH).
14273      if test "xCPIO" != xBASH; then
14274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14275$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14276      fi
14277      # Try to locate tool using the code snippet
14278      for ac_prog in cpio bsdcpio
14279do
14280  # Extract the first word of "$ac_prog", so it can be a program name with args.
14281set dummy $ac_prog; ac_word=$2
14282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14283$as_echo_n "checking for $ac_word... " >&6; }
14284if ${ac_cv_path_CPIO+:} false; then :
14285  $as_echo_n "(cached) " >&6
14286else
14287  case $CPIO in
14288  [\\/]* | ?:[\\/]*)
14289  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14290  ;;
14291  *)
14292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14293for as_dir in $PATH
14294do
14295  IFS=$as_save_IFS
14296  test -z "$as_dir" && as_dir=.
14297    for ac_exec_ext in '' $ac_executable_extensions; do
14298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14299    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14301    break 2
14302  fi
14303done
14304  done
14305IFS=$as_save_IFS
14306
14307  ;;
14308esac
14309fi
14310CPIO=$ac_cv_path_CPIO
14311if test -n "$CPIO"; then
14312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14313$as_echo "$CPIO" >&6; }
14314else
14315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14316$as_echo "no" >&6; }
14317fi
14318
14319
14320  test -n "$CPIO" && break
14321done
14322
14323    else
14324      # If it succeeded, then it was overridden by the user. We will use it
14325      # for the tool.
14326
14327      # First remove it from the list of overridden variables, so we can test
14328      # for unknown variables in the end.
14329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14330
14331      # Check if we try to supply an empty value
14332      if test "x$CPIO" = x; then
14333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14334$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14336$as_echo_n "checking for CPIO... " >&6; }
14337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14338$as_echo "disabled" >&6; }
14339      else
14340        # Check if the provided tool contains a complete path.
14341        tool_specified="$CPIO"
14342        tool_basename="${tool_specified##*/}"
14343        if test "x$tool_basename" = "x$tool_specified"; then
14344          # A command without a complete path is provided, search $PATH.
14345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14346$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14347          # Extract the first word of "$tool_basename", so it can be a program name with args.
14348set dummy $tool_basename; ac_word=$2
14349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14350$as_echo_n "checking for $ac_word... " >&6; }
14351if ${ac_cv_path_CPIO+:} false; then :
14352  $as_echo_n "(cached) " >&6
14353else
14354  case $CPIO in
14355  [\\/]* | ?:[\\/]*)
14356  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14357  ;;
14358  *)
14359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14360for as_dir in $PATH
14361do
14362  IFS=$as_save_IFS
14363  test -z "$as_dir" && as_dir=.
14364    for ac_exec_ext in '' $ac_executable_extensions; do
14365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14366    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14368    break 2
14369  fi
14370done
14371  done
14372IFS=$as_save_IFS
14373
14374  ;;
14375esac
14376fi
14377CPIO=$ac_cv_path_CPIO
14378if test -n "$CPIO"; then
14379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14380$as_echo "$CPIO" >&6; }
14381else
14382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14383$as_echo "no" >&6; }
14384fi
14385
14386
14387          if test "x$CPIO" = x; then
14388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14389          fi
14390        else
14391          # Otherwise we believe it is a complete path. Use it as it is.
14392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14393$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14395$as_echo_n "checking for CPIO... " >&6; }
14396          if test ! -x "$tool_specified"; then
14397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14398$as_echo "not found" >&6; }
14399            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14400          fi
14401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14402$as_echo "$tool_specified" >&6; }
14403        fi
14404      fi
14405    fi
14406
14407  fi
14408
14409
14410
14411
14412  # Publish this variable in the help.
14413
14414
14415  if [ -z "${NICE+x}" ]; then
14416    # The variable is not set by user, try to locate tool using the code snippet
14417    for ac_prog in nice
14418do
14419  # Extract the first word of "$ac_prog", so it can be a program name with args.
14420set dummy $ac_prog; ac_word=$2
14421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14422$as_echo_n "checking for $ac_word... " >&6; }
14423if ${ac_cv_path_NICE+:} false; then :
14424  $as_echo_n "(cached) " >&6
14425else
14426  case $NICE in
14427  [\\/]* | ?:[\\/]*)
14428  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14429  ;;
14430  *)
14431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14432for as_dir in $PATH
14433do
14434  IFS=$as_save_IFS
14435  test -z "$as_dir" && as_dir=.
14436    for ac_exec_ext in '' $ac_executable_extensions; do
14437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14438    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14440    break 2
14441  fi
14442done
14443  done
14444IFS=$as_save_IFS
14445
14446  ;;
14447esac
14448fi
14449NICE=$ac_cv_path_NICE
14450if test -n "$NICE"; then
14451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14452$as_echo "$NICE" >&6; }
14453else
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14455$as_echo "no" >&6; }
14456fi
14457
14458
14459  test -n "$NICE" && break
14460done
14461
14462  else
14463    # The variable is set, but is it from the command line or the environment?
14464
14465    # Try to remove the string !NICE! from our list.
14466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14468      # If it failed, the variable was not from the command line. Ignore it,
14469      # but warn the user (except for BASH, which is always set by the calling BASH).
14470      if test "xNICE" != xBASH; then
14471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14472$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14473      fi
14474      # Try to locate tool using the code snippet
14475      for ac_prog in nice
14476do
14477  # Extract the first word of "$ac_prog", so it can be a program name with args.
14478set dummy $ac_prog; ac_word=$2
14479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14480$as_echo_n "checking for $ac_word... " >&6; }
14481if ${ac_cv_path_NICE+:} false; then :
14482  $as_echo_n "(cached) " >&6
14483else
14484  case $NICE in
14485  [\\/]* | ?:[\\/]*)
14486  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14487  ;;
14488  *)
14489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14490for as_dir in $PATH
14491do
14492  IFS=$as_save_IFS
14493  test -z "$as_dir" && as_dir=.
14494    for ac_exec_ext in '' $ac_executable_extensions; do
14495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14496    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14498    break 2
14499  fi
14500done
14501  done
14502IFS=$as_save_IFS
14503
14504  ;;
14505esac
14506fi
14507NICE=$ac_cv_path_NICE
14508if test -n "$NICE"; then
14509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14510$as_echo "$NICE" >&6; }
14511else
14512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14513$as_echo "no" >&6; }
14514fi
14515
14516
14517  test -n "$NICE" && break
14518done
14519
14520    else
14521      # If it succeeded, then it was overridden by the user. We will use it
14522      # for the tool.
14523
14524      # First remove it from the list of overridden variables, so we can test
14525      # for unknown variables in the end.
14526      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14527
14528      # Check if we try to supply an empty value
14529      if test "x$NICE" = x; then
14530        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14531$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14533$as_echo_n "checking for NICE... " >&6; }
14534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14535$as_echo "disabled" >&6; }
14536      else
14537        # Check if the provided tool contains a complete path.
14538        tool_specified="$NICE"
14539        tool_basename="${tool_specified##*/}"
14540        if test "x$tool_basename" = "x$tool_specified"; then
14541          # A command without a complete path is provided, search $PATH.
14542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14543$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14544          # Extract the first word of "$tool_basename", so it can be a program name with args.
14545set dummy $tool_basename; ac_word=$2
14546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14547$as_echo_n "checking for $ac_word... " >&6; }
14548if ${ac_cv_path_NICE+:} false; then :
14549  $as_echo_n "(cached) " >&6
14550else
14551  case $NICE in
14552  [\\/]* | ?:[\\/]*)
14553  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14554  ;;
14555  *)
14556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14557for as_dir in $PATH
14558do
14559  IFS=$as_save_IFS
14560  test -z "$as_dir" && as_dir=.
14561    for ac_exec_ext in '' $ac_executable_extensions; do
14562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14563    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14565    break 2
14566  fi
14567done
14568  done
14569IFS=$as_save_IFS
14570
14571  ;;
14572esac
14573fi
14574NICE=$ac_cv_path_NICE
14575if test -n "$NICE"; then
14576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14577$as_echo "$NICE" >&6; }
14578else
14579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14580$as_echo "no" >&6; }
14581fi
14582
14583
14584          if test "x$NICE" = x; then
14585            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14586          fi
14587        else
14588          # Otherwise we believe it is a complete path. Use it as it is.
14589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14590$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14591          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14592$as_echo_n "checking for NICE... " >&6; }
14593          if test ! -x "$tool_specified"; then
14594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14595$as_echo "not found" >&6; }
14596            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14597          fi
14598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14599$as_echo "$tool_specified" >&6; }
14600        fi
14601      fi
14602    fi
14603
14604  fi
14605
14606
14607
14608
14609# Now we can determine OpenJDK build and target platforms. This is required to
14610# have early on.
14611# Make sure we can run config.sub.
14612$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14613  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14614
14615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14616$as_echo_n "checking build system type... " >&6; }
14617if ${ac_cv_build+:} false; then :
14618  $as_echo_n "(cached) " >&6
14619else
14620  ac_build_alias=$build_alias
14621test "x$ac_build_alias" = x &&
14622  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14623test "x$ac_build_alias" = x &&
14624  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14625ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14626  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14627
14628fi
14629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14630$as_echo "$ac_cv_build" >&6; }
14631case $ac_cv_build in
14632*-*-*) ;;
14633*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14634esac
14635build=$ac_cv_build
14636ac_save_IFS=$IFS; IFS='-'
14637set x $ac_cv_build
14638shift
14639build_cpu=$1
14640build_vendor=$2
14641shift; shift
14642# Remember, the first character of IFS is used to create $*,
14643# except with old shells:
14644build_os=$*
14645IFS=$ac_save_IFS
14646case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14647
14648
14649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14650$as_echo_n "checking host system type... " >&6; }
14651if ${ac_cv_host+:} false; then :
14652  $as_echo_n "(cached) " >&6
14653else
14654  if test "x$host_alias" = x; then
14655  ac_cv_host=$ac_cv_build
14656else
14657  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14658    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14659fi
14660
14661fi
14662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14663$as_echo "$ac_cv_host" >&6; }
14664case $ac_cv_host in
14665*-*-*) ;;
14666*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14667esac
14668host=$ac_cv_host
14669ac_save_IFS=$IFS; IFS='-'
14670set x $ac_cv_host
14671shift
14672host_cpu=$1
14673host_vendor=$2
14674shift; shift
14675# Remember, the first character of IFS is used to create $*,
14676# except with old shells:
14677host_os=$*
14678IFS=$ac_save_IFS
14679case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14680
14681
14682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14683$as_echo_n "checking target system type... " >&6; }
14684if ${ac_cv_target+:} false; then :
14685  $as_echo_n "(cached) " >&6
14686else
14687  if test "x$target_alias" = x; then
14688  ac_cv_target=$ac_cv_host
14689else
14690  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14691    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14692fi
14693
14694fi
14695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14696$as_echo "$ac_cv_target" >&6; }
14697case $ac_cv_target in
14698*-*-*) ;;
14699*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14700esac
14701target=$ac_cv_target
14702ac_save_IFS=$IFS; IFS='-'
14703set x $ac_cv_target
14704shift
14705target_cpu=$1
14706target_vendor=$2
14707shift; shift
14708# Remember, the first character of IFS is used to create $*,
14709# except with old shells:
14710target_os=$*
14711IFS=$ac_save_IFS
14712case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14713
14714
14715# The aliases save the names the user supplied, while $host etc.
14716# will get canonicalized.
14717test -n "$target_alias" &&
14718  test "$program_prefix$program_suffix$program_transform_name" = \
14719    NONENONEs,x,x, &&
14720  program_prefix=${target_alias}-
14721
14722  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14723  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14724  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14725  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14726  # to use the configure naming style.
14727
14728
14729
14730
14731
14732  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14733  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14734  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14735  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14736  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14737  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14738
14739
14740
14741  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14742
14743  case "$build_os" in
14744    *linux*)
14745      VAR_OS=linux
14746      VAR_OS_TYPE=unix
14747      ;;
14748    *solaris*)
14749      VAR_OS=solaris
14750      VAR_OS_TYPE=unix
14751      ;;
14752    *darwin*)
14753      VAR_OS=macosx
14754      VAR_OS_TYPE=unix
14755      ;;
14756    *bsd*)
14757      VAR_OS=bsd
14758      VAR_OS_TYPE=unix
14759      ;;
14760    *cygwin*)
14761      VAR_OS=windows
14762      VAR_OS_ENV=windows.cygwin
14763      ;;
14764    *mingw*)
14765      VAR_OS=windows
14766      VAR_OS_ENV=windows.msys
14767      ;;
14768    *aix*)
14769      VAR_OS=aix
14770      VAR_OS_TYPE=unix
14771      ;;
14772    *)
14773      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14774      ;;
14775  esac
14776
14777
14778  # First argument is the cpu name from the trip/quad
14779  case "$build_cpu" in
14780    x86_64)
14781      VAR_CPU=x86_64
14782      VAR_CPU_ARCH=x86
14783      VAR_CPU_BITS=64
14784      VAR_CPU_ENDIAN=little
14785      ;;
14786    i?86)
14787      VAR_CPU=x86
14788      VAR_CPU_ARCH=x86
14789      VAR_CPU_BITS=32
14790      VAR_CPU_ENDIAN=little
14791      ;;
14792    arm*)
14793      VAR_CPU=arm
14794      VAR_CPU_ARCH=arm
14795      VAR_CPU_BITS=32
14796      VAR_CPU_ENDIAN=little
14797      ;;
14798    aarch64)
14799      VAR_CPU=aarch64
14800      VAR_CPU_ARCH=aarch64
14801      VAR_CPU_BITS=64
14802      VAR_CPU_ENDIAN=little
14803      ;;
14804    powerpc)
14805      VAR_CPU=ppc
14806      VAR_CPU_ARCH=ppc
14807      VAR_CPU_BITS=32
14808      VAR_CPU_ENDIAN=big
14809      ;;
14810    powerpc64)
14811      VAR_CPU=ppc64
14812      VAR_CPU_ARCH=ppc
14813      VAR_CPU_BITS=64
14814      VAR_CPU_ENDIAN=big
14815      ;;
14816    powerpc64le)
14817      VAR_CPU=ppc64le
14818      VAR_CPU_ARCH=ppc
14819      VAR_CPU_BITS=64
14820      VAR_CPU_ENDIAN=little
14821      ;;
14822    s390)
14823      VAR_CPU=s390
14824      VAR_CPU_ARCH=s390
14825      VAR_CPU_BITS=32
14826      VAR_CPU_ENDIAN=big
14827      ;;
14828    s390x)
14829      VAR_CPU=s390x
14830      VAR_CPU_ARCH=s390
14831      VAR_CPU_BITS=64
14832      VAR_CPU_ENDIAN=big
14833      ;;
14834    sparc)
14835      VAR_CPU=sparc
14836      VAR_CPU_ARCH=sparc
14837      VAR_CPU_BITS=32
14838      VAR_CPU_ENDIAN=big
14839      ;;
14840    sparcv9|sparc64)
14841      VAR_CPU=sparcv9
14842      VAR_CPU_ARCH=sparc
14843      VAR_CPU_BITS=64
14844      VAR_CPU_ENDIAN=big
14845      ;;
14846    *)
14847      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14848      ;;
14849  esac
14850
14851  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14852  OPENJDK_BUILD_OS="$VAR_OS"
14853  if test "x$VAR_OS_TYPE" != x; then
14854    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14855  else
14856    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14857  fi
14858  if test "x$VAR_OS_ENV" != x; then
14859    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14860  else
14861    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14862  fi
14863  OPENJDK_BUILD_CPU="$VAR_CPU"
14864  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14865  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14866  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14867
14868
14869
14870
14871
14872
14873
14874
14875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14876$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14878$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14879
14880  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14881
14882  case "$host_os" in
14883    *linux*)
14884      VAR_OS=linux
14885      VAR_OS_TYPE=unix
14886      ;;
14887    *solaris*)
14888      VAR_OS=solaris
14889      VAR_OS_TYPE=unix
14890      ;;
14891    *darwin*)
14892      VAR_OS=macosx
14893      VAR_OS_TYPE=unix
14894      ;;
14895    *bsd*)
14896      VAR_OS=bsd
14897      VAR_OS_TYPE=unix
14898      ;;
14899    *cygwin*)
14900      VAR_OS=windows
14901      VAR_OS_ENV=windows.cygwin
14902      ;;
14903    *mingw*)
14904      VAR_OS=windows
14905      VAR_OS_ENV=windows.msys
14906      ;;
14907    *aix*)
14908      VAR_OS=aix
14909      VAR_OS_TYPE=unix
14910      ;;
14911    *)
14912      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14913      ;;
14914  esac
14915
14916
14917  # First argument is the cpu name from the trip/quad
14918  case "$host_cpu" in
14919    x86_64)
14920      VAR_CPU=x86_64
14921      VAR_CPU_ARCH=x86
14922      VAR_CPU_BITS=64
14923      VAR_CPU_ENDIAN=little
14924      ;;
14925    i?86)
14926      VAR_CPU=x86
14927      VAR_CPU_ARCH=x86
14928      VAR_CPU_BITS=32
14929      VAR_CPU_ENDIAN=little
14930      ;;
14931    arm*)
14932      VAR_CPU=arm
14933      VAR_CPU_ARCH=arm
14934      VAR_CPU_BITS=32
14935      VAR_CPU_ENDIAN=little
14936      ;;
14937    aarch64)
14938      VAR_CPU=aarch64
14939      VAR_CPU_ARCH=aarch64
14940      VAR_CPU_BITS=64
14941      VAR_CPU_ENDIAN=little
14942      ;;
14943    powerpc)
14944      VAR_CPU=ppc
14945      VAR_CPU_ARCH=ppc
14946      VAR_CPU_BITS=32
14947      VAR_CPU_ENDIAN=big
14948      ;;
14949    powerpc64)
14950      VAR_CPU=ppc64
14951      VAR_CPU_ARCH=ppc
14952      VAR_CPU_BITS=64
14953      VAR_CPU_ENDIAN=big
14954      ;;
14955    powerpc64le)
14956      VAR_CPU=ppc64le
14957      VAR_CPU_ARCH=ppc
14958      VAR_CPU_BITS=64
14959      VAR_CPU_ENDIAN=little
14960      ;;
14961    s390)
14962      VAR_CPU=s390
14963      VAR_CPU_ARCH=s390
14964      VAR_CPU_BITS=32
14965      VAR_CPU_ENDIAN=big
14966      ;;
14967    s390x)
14968      VAR_CPU=s390x
14969      VAR_CPU_ARCH=s390
14970      VAR_CPU_BITS=64
14971      VAR_CPU_ENDIAN=big
14972      ;;
14973    sparc)
14974      VAR_CPU=sparc
14975      VAR_CPU_ARCH=sparc
14976      VAR_CPU_BITS=32
14977      VAR_CPU_ENDIAN=big
14978      ;;
14979    sparcv9|sparc64)
14980      VAR_CPU=sparcv9
14981      VAR_CPU_ARCH=sparc
14982      VAR_CPU_BITS=64
14983      VAR_CPU_ENDIAN=big
14984      ;;
14985    *)
14986      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14987      ;;
14988  esac
14989
14990  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14991  OPENJDK_TARGET_OS="$VAR_OS"
14992  if test "x$VAR_OS_TYPE" != x; then
14993    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14994  else
14995    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14996  fi
14997  if test "x$VAR_OS_ENV" != x; then
14998    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14999  else
15000    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15001  fi
15002  OPENJDK_TARGET_CPU="$VAR_CPU"
15003  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15004  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15005  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15006
15007
15008
15009
15010
15011
15012
15013
15014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15015$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15017$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15018
15019
15020
15021# Check whether --with-target-bits was given.
15022if test "${with_target_bits+set}" = set; then :
15023  withval=$with_target_bits;
15024fi
15025
15026
15027  # We have three types of compiles:
15028  # native  == normal compilation, target system == build system
15029  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15030  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15031  #
15032  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15033    # We're doing a proper cross-compilation
15034    COMPILE_TYPE="cross"
15035  else
15036    COMPILE_TYPE="native"
15037  fi
15038
15039  if test "x$with_target_bits" != x; then
15040    if test "x$COMPILE_TYPE" = "xcross"; then
15041      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15042    fi
15043
15044    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15045      # A reduced build is requested
15046      COMPILE_TYPE="reduced"
15047      OPENJDK_TARGET_CPU_BITS=32
15048      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15049        OPENJDK_TARGET_CPU=x86
15050      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15051        OPENJDK_TARGET_CPU=sparc
15052      else
15053        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15054      fi
15055    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15056      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
15057    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15058      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15059$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15060    else
15061      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15062    fi
15063  fi
15064
15065
15066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15067$as_echo_n "checking compilation type... " >&6; }
15068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15069$as_echo "$COMPILE_TYPE" >&6; }
15070
15071
15072  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15073    REQUIRED_OS_NAME=SunOS
15074    REQUIRED_OS_VERSION=5.10
15075  fi
15076  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15077    REQUIRED_OS_NAME=Linux
15078    REQUIRED_OS_VERSION=2.6
15079  fi
15080  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15081    REQUIRED_OS_NAME=Windows
15082    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15083      REQUIRED_OS_VERSION=5.2
15084    else
15085      REQUIRED_OS_VERSION=5.1
15086    fi
15087  fi
15088  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15089    REQUIRED_OS_NAME=Darwin
15090    REQUIRED_OS_VERSION=11.2
15091  fi
15092
15093
15094
15095
15096
15097  # Also store the legacy naming of the cpu.
15098  # Ie i586 and amd64 instead of x86 and x86_64
15099  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15100  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15101    OPENJDK_TARGET_CPU_LEGACY="i586"
15102  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15103    # On all platforms except MacOSX replace x86_64 with amd64.
15104    OPENJDK_TARGET_CPU_LEGACY="amd64"
15105  fi
15106
15107
15108  # And the second legacy naming of the cpu.
15109  # Ie i386 and amd64 instead of x86 and x86_64.
15110  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15111  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15112    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15113  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15114    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15115  fi
15116
15117
15118  # This is the name of the cpu (but using i386 and amd64 instead of
15119  # x86 and x86_64, respectively), preceeded by a /, to be used when
15120  # locating libraries. On macosx, it's empty, though.
15121  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15122  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15123    OPENJDK_TARGET_CPU_LIBDIR=""
15124  fi
15125
15126
15127  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15128  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15129  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15130  OPENJDK_TARGET_CPU_ISADIR=""
15131  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15132    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15133      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15134    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15135      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15136    fi
15137  fi
15138
15139
15140  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15141  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15142  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15143    # On linux only, we replace x86 with i386.
15144    OPENJDK_TARGET_CPU_OSARCH="i386"
15145  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15146    # On all platforms except macosx, we replace x86_64 with amd64.
15147    OPENJDK_TARGET_CPU_OSARCH="amd64"
15148  fi
15149
15150
15151  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15152  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15153    OPENJDK_TARGET_CPU_JLI="i386"
15154  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15155    # On all platforms except macosx, we replace x86_64 with amd64.
15156    OPENJDK_TARGET_CPU_JLI="amd64"
15157  fi
15158  # Now setup the -D flags for building libjli.
15159  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15160  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15161    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15162      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15163    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15164      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15165    fi
15166  fi
15167
15168
15169  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15170      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15171  else
15172      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15173  fi
15174
15175
15176  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15177    A_LP64="LP64:="
15178    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15179    # unpack200.exe
15180    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15181      ADD_LP64="-D_LP64=1"
15182    fi
15183  fi
15184  LP64=$A_LP64
15185
15186
15187  if test "x$COMPILE_TYPE" = "xcross"; then
15188    # FIXME: ... or should this include reduced builds..?
15189    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15190  else
15191    DEFINE_CROSS_COMPILE_ARCH=""
15192  fi
15193
15194
15195  # ZERO_ARCHDEF is used to enable architecture-specific code
15196  case "${OPENJDK_TARGET_CPU}" in
15197    ppc)     ZERO_ARCHDEF=PPC32 ;;
15198    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15199    s390*)   ZERO_ARCHDEF=S390  ;;
15200    sparc*)  ZERO_ARCHDEF=SPARC ;;
15201    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15202    x86)     ZERO_ARCHDEF=IA32  ;;
15203    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15204  esac
15205
15206
15207
15208
15209# Continue setting up basic stuff. Most remaining code require fundamental tools.
15210
15211  # Save the current directory this script was started from
15212  CURDIR="$PWD"
15213
15214  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15215  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15216  # was not available at that time.
15217  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15218  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15219    ORIGINAL_PATH="$REWRITTEN_PATH"
15220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15221$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15222  fi
15223
15224  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15225    PATH_SEP=";"
15226
15227  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15228  if test $SRC_ROOT_LENGTH -gt 100; then
15229    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15230  fi
15231
15232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15234$as_echo_n "checking cygwin release... " >&6; }
15235    CYGWIN_VERSION=`$UNAME -r`
15236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15237$as_echo "$CYGWIN_VERSION" >&6; }
15238    WINDOWS_ENV_VENDOR='cygwin'
15239    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15240
15241    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15242    if test "x$CYGWIN_VERSION_OLD" != x; then
15243      { $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
15244$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;}
15245      as_fn_error $? "Cannot continue" "$LINENO" 5
15246    fi
15247    if test "x$CYGPATH" = x; then
15248      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15249    fi
15250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15251$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15252    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15253    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15254    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15255    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15257$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15258    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15259    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15260    if test "x$test_cygdrive_prefix" = x; then
15261      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15262    fi
15263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15265$as_echo_n "checking msys release... " >&6; }
15266    MSYS_VERSION=`$UNAME -r`
15267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15268$as_echo "$MSYS_VERSION" >&6; }
15269
15270    WINDOWS_ENV_VENDOR='msys'
15271    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15272
15273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15274$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15275    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15276    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15277
15278  windows_path="$MSYS_ROOT_PATH"
15279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15280    unix_path=`$CYGPATH -u "$windows_path"`
15281    MSYS_ROOT_PATH="$unix_path"
15282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15284    MSYS_ROOT_PATH="$unix_path"
15285  fi
15286
15287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15288$as_echo "$MSYS_ROOT_PATH" >&6; }
15289    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15290  else
15291    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15292  fi
15293
15294  # Test if windows or unix (cygwin/msys) find is first in path.
15295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15296$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15297  FIND_BINARY_OUTPUT=`find --version 2>&1`
15298  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15300$as_echo "unix style" >&6; }
15301  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15303$as_echo "Windows" >&6; }
15304    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15305$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15306    { $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
15307$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15308    as_fn_error $? "Cannot continue" "$LINENO" 5
15309  else
15310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15311$as_echo "unknown" >&6; }
15312    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15313$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15314  fi
15315
15316  else
15317    PATH_SEP=":"
15318  fi
15319
15320
15321  # We get the top-level directory from the supporting wrappers.
15322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15323$as_echo_n "checking for top-level directory... " >&6; }
15324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15325$as_echo "$TOPDIR" >&6; }
15326
15327
15328  # Save the original version of TOPDIR for string comparisons
15329  ORIGINAL_TOPDIR="$TOPDIR"
15330
15331
15332  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15333
15334  # Only process if variable expands to non-empty
15335
15336  if test "x$CURDIR" != x; then
15337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15338
15339  # Input might be given as Windows format, start by converting to
15340  # unix format.
15341  path="$CURDIR"
15342  new_path=`$CYGPATH -u "$path"`
15343
15344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15347  # "foo.exe" is OK but "foo" is an error.
15348  #
15349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15350  # It is also a way to make sure we got the proper file name for the real test later on.
15351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15352  if test "x$test_shortpath" = x; then
15353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15354$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15355    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15356  fi
15357
15358  # Call helper function which possibly converts this using DOS-style short mode.
15359  # If so, the updated path is stored in $new_path.
15360
15361  input_path="$new_path"
15362  # Check if we need to convert this using DOS-style short mode. If the path
15363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15364  # take no chances and rewrite it.
15365  # Note: m4 eats our [], so we need to use [ and ] instead.
15366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15367  if test "x$has_forbidden_chars" != x; then
15368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15372      # Going to short mode and back again did indeed matter. Since short mode is
15373      # case insensitive, let's make it lowercase to improve readability.
15374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15375      # Now convert it back to Unix-style (cygpath)
15376      input_path=`$CYGPATH -u "$shortmode_path"`
15377      new_path="$input_path"
15378    fi
15379  fi
15380
15381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15382  if test "x$test_cygdrive_prefix" = x; then
15383    # As a simple fix, exclude /usr/bin since it's not a real path.
15384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15386      # a path prefixed by /cygdrive for fixpath to work.
15387      new_path="$CYGWIN_ROOT_PATH$input_path"
15388    fi
15389  fi
15390
15391
15392  if test "x$path" != "x$new_path"; then
15393    CURDIR="$new_path"
15394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15395$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15396  fi
15397
15398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15399
15400  path="$CURDIR"
15401  has_colon=`$ECHO $path | $GREP ^.:`
15402  new_path="$path"
15403  if test "x$has_colon" = x; then
15404    # Not in mixed or Windows style, start by that.
15405    new_path=`cmd //c echo $path`
15406  fi
15407
15408
15409  input_path="$new_path"
15410  # Check if we need to convert this using DOS-style short mode. If the path
15411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412  # take no chances and rewrite it.
15413  # Note: m4 eats our [], so we need to use [ and ] instead.
15414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15415  if test "x$has_forbidden_chars" != x; then
15416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15418  fi
15419
15420
15421  windows_path="$new_path"
15422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15423    unix_path=`$CYGPATH -u "$windows_path"`
15424    new_path="$unix_path"
15425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15427    new_path="$unix_path"
15428  fi
15429
15430  if test "x$path" != "x$new_path"; then
15431    CURDIR="$new_path"
15432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15433$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15434  fi
15435
15436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15438
15439    else
15440      # We're on a unix platform. Hooray! :)
15441      path="$CURDIR"
15442      has_space=`$ECHO "$path" | $GREP " "`
15443      if test "x$has_space" != x; then
15444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15445$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15447      fi
15448
15449      # Use eval to expand a potential ~
15450      eval path="$path"
15451      if test ! -f "$path" && test ! -d "$path"; then
15452        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15453      fi
15454
15455      if test -d "$path"; then
15456        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15457      else
15458        dir="`$DIRNAME "$path"`"
15459        base="`$BASENAME "$path"`"
15460        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15461      fi
15462    fi
15463  fi
15464
15465
15466  # Only process if variable expands to non-empty
15467
15468  if test "x$TOPDIR" != x; then
15469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15470
15471  # Input might be given as Windows format, start by converting to
15472  # unix format.
15473  path="$TOPDIR"
15474  new_path=`$CYGPATH -u "$path"`
15475
15476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15479  # "foo.exe" is OK but "foo" is an error.
15480  #
15481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15482  # It is also a way to make sure we got the proper file name for the real test later on.
15483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15484  if test "x$test_shortpath" = x; then
15485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15486$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15487    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15488  fi
15489
15490  # Call helper function which possibly converts this using DOS-style short mode.
15491  # If so, the updated path is stored in $new_path.
15492
15493  input_path="$new_path"
15494  # Check if we need to convert this using DOS-style short mode. If the path
15495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15496  # take no chances and rewrite it.
15497  # Note: m4 eats our [], so we need to use [ and ] instead.
15498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15499  if test "x$has_forbidden_chars" != x; then
15500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15504      # Going to short mode and back again did indeed matter. Since short mode is
15505      # case insensitive, let's make it lowercase to improve readability.
15506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15507      # Now convert it back to Unix-style (cygpath)
15508      input_path=`$CYGPATH -u "$shortmode_path"`
15509      new_path="$input_path"
15510    fi
15511  fi
15512
15513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15514  if test "x$test_cygdrive_prefix" = x; then
15515    # As a simple fix, exclude /usr/bin since it's not a real path.
15516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15518      # a path prefixed by /cygdrive for fixpath to work.
15519      new_path="$CYGWIN_ROOT_PATH$input_path"
15520    fi
15521  fi
15522
15523
15524  if test "x$path" != "x$new_path"; then
15525    TOPDIR="$new_path"
15526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15527$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15528  fi
15529
15530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15531
15532  path="$TOPDIR"
15533  has_colon=`$ECHO $path | $GREP ^.:`
15534  new_path="$path"
15535  if test "x$has_colon" = x; then
15536    # Not in mixed or Windows style, start by that.
15537    new_path=`cmd //c echo $path`
15538  fi
15539
15540
15541  input_path="$new_path"
15542  # Check if we need to convert this using DOS-style short mode. If the path
15543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15544  # take no chances and rewrite it.
15545  # Note: m4 eats our [], so we need to use [ and ] instead.
15546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15547  if test "x$has_forbidden_chars" != x; then
15548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15550  fi
15551
15552
15553  windows_path="$new_path"
15554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15555    unix_path=`$CYGPATH -u "$windows_path"`
15556    new_path="$unix_path"
15557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15559    new_path="$unix_path"
15560  fi
15561
15562  if test "x$path" != "x$new_path"; then
15563    TOPDIR="$new_path"
15564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15565$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15566  fi
15567
15568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15570
15571    else
15572      # We're on a unix platform. Hooray! :)
15573      path="$TOPDIR"
15574      has_space=`$ECHO "$path" | $GREP " "`
15575      if test "x$has_space" != x; then
15576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15577$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15579      fi
15580
15581      # Use eval to expand a potential ~
15582      eval path="$path"
15583      if test ! -f "$path" && test ! -d "$path"; then
15584        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15585      fi
15586
15587      if test -d "$path"; then
15588        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15589      else
15590        dir="`$DIRNAME "$path"`"
15591        base="`$BASENAME "$path"`"
15592        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15593      fi
15594    fi
15595  fi
15596
15597  # SRC_ROOT is a traditional alias for TOPDIR.
15598  SRC_ROOT=$TOPDIR
15599
15600  # Calculate a canonical version of TOPDIR for string comparisons
15601  CANONICAL_TOPDIR=$TOPDIR
15602
15603  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15604    # Follow a chain of symbolic links. Use readlink
15605    # where it exists, else fall back to horribly
15606    # complicated shell code.
15607    if test "x$READLINK_TESTED" != yes; then
15608      # On MacOSX there is a readlink tool with a different
15609      # purpose than the GNU readlink tool. Check the found readlink.
15610      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15611      if test "x$ISGNU" = x; then
15612        # A readlink that we do not know how to use.
15613        # Are there other non-GNU readlinks out there?
15614        READLINK_TESTED=yes
15615        READLINK=
15616      fi
15617    fi
15618
15619    if test "x$READLINK" != x; then
15620      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15621    else
15622      # Save the current directory for restoring afterwards
15623      STARTDIR=$PWD
15624      COUNTER=0
15625      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15626      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15627      cd $sym_link_dir
15628      # Use -P flag to resolve symlinks in directories.
15629      cd `$THEPWDCMD -P`
15630      sym_link_dir=`$THEPWDCMD -P`
15631      # Resolve file symlinks
15632      while test $COUNTER -lt 20; do
15633        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15634        if test "x$ISLINK" == x; then
15635          # This is not a symbolic link! We are done!
15636          break
15637        fi
15638        # Again resolve directory symlinks since the target of the just found
15639        # link could be in a different directory
15640        cd `$DIRNAME $ISLINK`
15641        sym_link_dir=`$THEPWDCMD -P`
15642        sym_link_file=`$BASENAME $ISLINK`
15643        let COUNTER=COUNTER+1
15644      done
15645      cd $STARTDIR
15646      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15647    fi
15648  fi
15649
15650
15651
15652  # Locate the directory of this script.
15653  AUTOCONF_DIR=$TOPDIR/common/autoconf
15654
15655
15656# Check if it's a pure open build or if custom sources are to be used.
15657
15658  # Check whether --enable-openjdk-only was given.
15659if test "${enable_openjdk_only+set}" = set; then :
15660  enableval=$enable_openjdk_only;
15661else
15662  enable_openjdk_only="no"
15663fi
15664
15665
15666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15667$as_echo_n "checking for presence of closed sources... " >&6; }
15668  if test -d "$SRC_ROOT/jdk/src/closed"; then
15669    CLOSED_SOURCE_PRESENT=yes
15670  else
15671    CLOSED_SOURCE_PRESENT=no
15672  fi
15673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15674$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15675
15676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15677$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15678  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15680$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15681
15682  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15683    OPENJDK=true
15684    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15685      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15686$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15687    fi
15688  else
15689    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15690      OPENJDK=true
15691    else
15692      OPENJDK=false
15693    fi
15694  fi
15695
15696  if test "x$OPENJDK" = "xtrue"; then
15697    SET_OPENJDK="OPENJDK=true"
15698  fi
15699
15700
15701
15702  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15703  # the IncludeCustomExtension macro.
15704
15705
15706# Check whether --with-custom-make-dir was given.
15707if test "${with_custom_make_dir+set}" = set; then :
15708  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
15709$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15710fi
15711
15712
15713
15714
15715# These are needed to be able to create a configuration name (and thus the output directory)
15716
15717  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15718$as_echo_n "checking which variant of the JDK to build... " >&6; }
15719
15720# Check whether --with-jdk-variant was given.
15721if test "${with_jdk_variant+set}" = set; then :
15722  withval=$with_jdk_variant;
15723fi
15724
15725
15726  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15727    JDK_VARIANT="normal"
15728  else
15729    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15730  fi
15731
15732
15733
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15735$as_echo "$JDK_VARIANT" >&6; }
15736
15737
15738
15739# Check whether --with-jvm-interpreter was given.
15740if test "${with_jvm_interpreter+set}" = set; then :
15741  withval=$with_jvm_interpreter;
15742fi
15743
15744
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15746$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15747  if test "x$with_jvm_interpreter" = x; then
15748    JVM_INTERPRETER="template"
15749  else
15750    JVM_INTERPRETER="$with_jvm_interpreter"
15751  fi
15752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15753$as_echo "$JVM_INTERPRETER" >&6; }
15754
15755  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15756    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15757  fi
15758
15759
15760
15761
15762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15763$as_echo_n "checking which variants of the JVM to build... " >&6; }
15764
15765# Check whether --with-jvm-variants was given.
15766if test "${with_jvm_variants+set}" = set; then :
15767  withval=$with_jvm_variants;
15768fi
15769
15770
15771  if test "x$with_jvm_variants" = x; then
15772    with_jvm_variants="server"
15773  fi
15774
15775  JVM_VARIANTS=",$with_jvm_variants,"
15776  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15777
15778  if test "x$TEST_VARIANTS" != "x,"; then
15779    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15780  fi
15781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15782$as_echo "$with_jvm_variants" >&6; }
15783
15784  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15785  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15786  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15787  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15788  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15789  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15790
15791  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15792    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15793      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15794    fi
15795  fi
15796  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15797    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15798      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15799    fi
15800  fi
15801
15802  # Replace the commas with AND for use in the build directory name.
15803  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15804  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15805  if test "x$COUNT_VARIANTS" != "x,1"; then
15806    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15807  else
15808    BUILDING_MULTIPLE_JVM_VARIANTS=no
15809  fi
15810
15811  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15812    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15813  fi
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823  INCLUDE_SA=true
15824  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15825    INCLUDE_SA=false
15826  fi
15827  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15828    INCLUDE_SA=false
15829  fi
15830  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15831    INCLUDE_SA=false
15832  fi
15833  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15834    INCLUDE_SA=false
15835  fi
15836
15837
15838  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15839    MACOSX_UNIVERSAL="true"
15840  fi
15841
15842
15843
15844
15845  DEBUG_LEVEL="release"
15846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15847$as_echo_n "checking which debug level to use... " >&6; }
15848  # Check whether --enable-debug was given.
15849if test "${enable_debug+set}" = set; then :
15850  enableval=$enable_debug;
15851        ENABLE_DEBUG="${enableval}"
15852        DEBUG_LEVEL="fastdebug"
15853
15854else
15855  ENABLE_DEBUG="no"
15856fi
15857
15858
15859
15860# Check whether --with-debug-level was given.
15861if test "${with_debug_level+set}" = set; then :
15862  withval=$with_debug_level;
15863        DEBUG_LEVEL="${withval}"
15864        if test "x$ENABLE_DEBUG" = xyes; then
15865          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15866        fi
15867
15868fi
15869
15870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15871$as_echo "$DEBUG_LEVEL" >&6; }
15872
15873  if test "x$DEBUG_LEVEL" != xrelease && \
15874      test "x$DEBUG_LEVEL" != xoptimized && \
15875      test "x$DEBUG_LEVEL" != xfastdebug && \
15876      test "x$DEBUG_LEVEL" != xslowdebug; then
15877    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15878  fi
15879
15880
15881  case $DEBUG_LEVEL in
15882    release )
15883      VARIANT="OPT"
15884      FASTDEBUG="false"
15885      DEBUG_CLASSFILES="false"
15886      BUILD_VARIANT_RELEASE=""
15887      HOTSPOT_DEBUG_LEVEL="product"
15888      HOTSPOT_EXPORT="product"
15889      ;;
15890    fastdebug )
15891      VARIANT="DBG"
15892      FASTDEBUG="true"
15893      DEBUG_CLASSFILES="true"
15894      BUILD_VARIANT_RELEASE="-fastdebug"
15895      HOTSPOT_DEBUG_LEVEL="fastdebug"
15896      HOTSPOT_EXPORT="fastdebug"
15897      ;;
15898    slowdebug )
15899      VARIANT="DBG"
15900      FASTDEBUG="false"
15901      DEBUG_CLASSFILES="true"
15902      BUILD_VARIANT_RELEASE="-debug"
15903      HOTSPOT_DEBUG_LEVEL="debug"
15904      HOTSPOT_EXPORT="debug"
15905      ;;
15906    optimized )
15907      VARIANT="OPT"
15908      FASTDEBUG="false"
15909      DEBUG_CLASSFILES="false"
15910      BUILD_VARIANT_RELEASE="-optimized"
15911      HOTSPOT_DEBUG_LEVEL="optimized"
15912      HOTSPOT_EXPORT="optimized"
15913      ;;
15914  esac
15915
15916  # The debug level 'optimized' is a little special because it is currently only
15917  # applicable to the HotSpot build where it means to build a completely
15918  # optimized version of the VM without any debugging code (like for the
15919  # 'release' debug level which is called 'product' in the HotSpot build) but
15920  # with the exception that it can contain additional code which is otherwise
15921  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15922  # test new and/or experimental features which are not intended for customer
15923  # shipment. Because these new features need to be tested and benchmarked in
15924  # real world scenarios, we want to build the containing JDK at the 'release'
15925  # debug level.
15926  if test "x$DEBUG_LEVEL" = xoptimized; then
15927    DEBUG_LEVEL="release"
15928  fi
15929
15930  #####
15931  # Generate the legacy makefile targets for hotspot.
15932  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15933  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15934  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15935  # But until then ...
15936  HOTSPOT_TARGET=""
15937
15938  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15939    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15940  fi
15941
15942  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15943    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15944  fi
15945
15946  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15947    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15948  fi
15949
15950  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15951    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15952  fi
15953
15954  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15955    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15956  fi
15957
15958  if test "x$JVM_VARIANT_CORE" = xtrue; then
15959    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15960  fi
15961
15962  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15963
15964  # On Macosx universal binaries are produced, but they only contain
15965  # 64 bit intel. This invalidates control of which jvms are built
15966  # from configure, but only server is valid anyway. Fix this
15967  # when hotspot makefiles are rewritten.
15968  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15969    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15970  fi
15971
15972  #####
15973
15974
15975
15976
15977
15978
15979
15980
15981# With basic setup done, call the custom early hook.
15982
15983
15984# Check if we have devkits, extra paths or sysroot set.
15985
15986
15987# Check whether --with-devkit was given.
15988if test "${with_devkit+set}" = set; then :
15989  withval=$with_devkit;
15990
15991  # Only process if variable expands to non-empty
15992
15993  if test "x$with_devkit" != x; then
15994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15995
15996  # Input might be given as Windows format, start by converting to
15997  # unix format.
15998  path="$with_devkit"
15999  new_path=`$CYGPATH -u "$path"`
16000
16001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16004  # "foo.exe" is OK but "foo" is an error.
16005  #
16006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16007  # It is also a way to make sure we got the proper file name for the real test later on.
16008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16009  if test "x$test_shortpath" = x; then
16010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16011$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16012    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16013  fi
16014
16015  # Call helper function which possibly converts this using DOS-style short mode.
16016  # If so, the updated path is stored in $new_path.
16017
16018  input_path="$new_path"
16019  # Check if we need to convert this using DOS-style short mode. If the path
16020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16021  # take no chances and rewrite it.
16022  # Note: m4 eats our [], so we need to use [ and ] instead.
16023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16024  if test "x$has_forbidden_chars" != x; then
16025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16029      # Going to short mode and back again did indeed matter. Since short mode is
16030      # case insensitive, let's make it lowercase to improve readability.
16031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16032      # Now convert it back to Unix-style (cygpath)
16033      input_path=`$CYGPATH -u "$shortmode_path"`
16034      new_path="$input_path"
16035    fi
16036  fi
16037
16038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16039  if test "x$test_cygdrive_prefix" = x; then
16040    # As a simple fix, exclude /usr/bin since it's not a real path.
16041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16043      # a path prefixed by /cygdrive for fixpath to work.
16044      new_path="$CYGWIN_ROOT_PATH$input_path"
16045    fi
16046  fi
16047
16048
16049  if test "x$path" != "x$new_path"; then
16050    with_devkit="$new_path"
16051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16052$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16053  fi
16054
16055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16056
16057  path="$with_devkit"
16058  has_colon=`$ECHO $path | $GREP ^.:`
16059  new_path="$path"
16060  if test "x$has_colon" = x; then
16061    # Not in mixed or Windows style, start by that.
16062    new_path=`cmd //c echo $path`
16063  fi
16064
16065
16066  input_path="$new_path"
16067  # Check if we need to convert this using DOS-style short mode. If the path
16068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16069  # take no chances and rewrite it.
16070  # Note: m4 eats our [], so we need to use [ and ] instead.
16071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16072  if test "x$has_forbidden_chars" != x; then
16073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16075  fi
16076
16077
16078  windows_path="$new_path"
16079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16080    unix_path=`$CYGPATH -u "$windows_path"`
16081    new_path="$unix_path"
16082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16084    new_path="$unix_path"
16085  fi
16086
16087  if test "x$path" != "x$new_path"; then
16088    with_devkit="$new_path"
16089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16090$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16091  fi
16092
16093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16095
16096    else
16097      # We're on a unix platform. Hooray! :)
16098      path="$with_devkit"
16099      has_space=`$ECHO "$path" | $GREP " "`
16100      if test "x$has_space" != x; then
16101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16102$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16104      fi
16105
16106      # Use eval to expand a potential ~
16107      eval path="$path"
16108      if test ! -f "$path" && test ! -d "$path"; then
16109        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16110      fi
16111
16112      if test -d "$path"; then
16113        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16114      else
16115        dir="`$DIRNAME "$path"`"
16116        base="`$BASENAME "$path"`"
16117        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16118      fi
16119    fi
16120  fi
16121
16122        DEVKIT_ROOT="$with_devkit"
16123        # Check for a meta data info file in the root of the devkit
16124        if test -f "$DEVKIT_ROOT/devkit.info"; then
16125          . $DEVKIT_ROOT/devkit.info
16126          # This potentially sets the following:
16127          # A descriptive name of the devkit
16128
16129  if test "x$DEVKIT_NAME" = x; then
16130    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16131  fi
16132
16133          # Corresponds to --with-extra-path
16134
16135  if test "x$DEVKIT_EXTRA_PATH" = x; then
16136    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16137  fi
16138
16139          # Corresponds to --with-toolchain-path
16140
16141  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16142    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16143  fi
16144
16145          # Corresponds to --with-sysroot
16146
16147  if test "x$DEVKIT_SYSROOT" = x; then
16148    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16149  fi
16150
16151
16152          # Identifies the Visual Studio version in the devkit
16153
16154  if test "x$DEVKIT_VS_VERSION" = x; then
16155    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16156  fi
16157
16158          # The Visual Studio include environment variable
16159
16160  if test "x$DEVKIT_VS_INCLUDE" = x; then
16161    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16162  fi
16163
16164          # The Visual Studio lib environment variable
16165
16166  if test "x$DEVKIT_VS_LIB" = x; then
16167    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16168  fi
16169
16170          # Corresponds to --with-msvcr-dll
16171
16172  if test "x$DEVKIT_MSVCR_DLL" = x; then
16173    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16174  fi
16175
16176          # Corresponds to --with-msvcp-dll
16177
16178  if test "x$DEVKIT_MSVCP_DLL" = x; then
16179    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16180  fi
16181
16182        fi
16183
16184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16185$as_echo_n "checking for devkit... " >&6; }
16186        if test "x$DEVKIT_NAME" != x; then
16187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16188$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16189        else
16190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16191$as_echo "$DEVKIT_ROOT" >&6; }
16192        fi
16193
16194
16195  if test "x$DEVKIT_EXTRA_PATH" != x; then
16196    if test "x$EXTRA_PATH" = x; then
16197      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16198    else
16199      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16200    fi
16201  fi
16202
16203
16204        # Fallback default of just /bin if DEVKIT_PATH is not defined
16205        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16206          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16207        fi
16208
16209  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16210    if test "x$TOOLCHAIN_PATH" = x; then
16211      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16212    else
16213      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16214    fi
16215  fi
16216
16217
16218        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16219        # places for backwards compatiblity.
16220        if test "x$DEVKIT_SYSROOT" != x; then
16221          SYSROOT="$DEVKIT_SYSROOT"
16222        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16223          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16224        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16225          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16226        fi
16227
16228
16229fi
16230
16231
16232  # You can force the sysroot if the sysroot encoded into the compiler tools
16233  # is not correct.
16234
16235# Check whether --with-sys-root was given.
16236if test "${with_sys_root+set}" = set; then :
16237  withval=$with_sys_root; SYSROOT=$with_sys_root
16238
16239fi
16240
16241
16242
16243# Check whether --with-sysroot was given.
16244if test "${with_sysroot+set}" = set; then :
16245  withval=$with_sysroot; SYSROOT=$with_sysroot
16246
16247fi
16248
16249
16250
16251# Check whether --with-tools-dir was given.
16252if test "${with_tools_dir+set}" = set; then :
16253  withval=$with_tools_dir;
16254  if test "x$with_tools_dir" != x; then
16255    if test "x$TOOLCHAIN_PATH" = x; then
16256      TOOLCHAIN_PATH="$with_tools_dir"
16257    else
16258      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16259    fi
16260  fi
16261
16262
16263fi
16264
16265
16266
16267# Check whether --with-toolchain-path was given.
16268if test "${with_toolchain_path+set}" = set; then :
16269  withval=$with_toolchain_path;
16270  if test "x$with_toolchain_path" != x; then
16271    if test "x$TOOLCHAIN_PATH" = x; then
16272      TOOLCHAIN_PATH="$with_toolchain_path"
16273    else
16274      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16275    fi
16276  fi
16277
16278
16279fi
16280
16281
16282
16283# Check whether --with-extra-path was given.
16284if test "${with_extra_path+set}" = set; then :
16285  withval=$with_extra_path;
16286  if test "x$with_extra_path" != x; then
16287    if test "x$EXTRA_PATH" = x; then
16288      EXTRA_PATH="$with_extra_path"
16289    else
16290      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16291    fi
16292  fi
16293
16294
16295fi
16296
16297
16298  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16299    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16300    # If not, detect if Xcode is installed by running xcodebuild -version
16301    # if no Xcode installed, xcodebuild exits with 1
16302    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16303    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16304      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16305      # fall back on the stub binary in /usr/bin/xcodebuild
16306      # Extract the first word of "xcodebuild", so it can be a program name with args.
16307set dummy xcodebuild; ac_word=$2
16308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16309$as_echo_n "checking for $ac_word... " >&6; }
16310if ${ac_cv_path_XCODEBUILD+:} false; then :
16311  $as_echo_n "(cached) " >&6
16312else
16313  case $XCODEBUILD in
16314  [\\/]* | ?:[\\/]*)
16315  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16316  ;;
16317  *)
16318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16319for as_dir in $TOOLCHAIN_PATH
16320do
16321  IFS=$as_save_IFS
16322  test -z "$as_dir" && as_dir=.
16323    for ac_exec_ext in '' $ac_executable_extensions; do
16324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16325    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16327    break 2
16328  fi
16329done
16330  done
16331IFS=$as_save_IFS
16332
16333  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16334  ;;
16335esac
16336fi
16337XCODEBUILD=$ac_cv_path_XCODEBUILD
16338if test -n "$XCODEBUILD"; then
16339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16340$as_echo "$XCODEBUILD" >&6; }
16341else
16342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16343$as_echo "no" >&6; }
16344fi
16345
16346
16347    else
16348      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16349      # when only the command line tools are installed there are no SDKs, so headers
16350      # are copied into the system frameworks
16351      XCODEBUILD=
16352
16353    fi
16354
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16356$as_echo_n "checking for sdk name... " >&6; }
16357
16358# Check whether --with-sdk-name was given.
16359if test "${with_sdk_name+set}" = set; then :
16360  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16361
16362fi
16363
16364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16365$as_echo "$SDKNAME" >&6; }
16366
16367    # if toolchain path is specified then don't rely on system headers, they may not compile
16368    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16369    test -z "$TOOLCHAIN_PATH" && \
16370      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16371
16372    if test -z "$SYSROOT"; then
16373      if test -n "$XCODEBUILD"; then
16374        # if we don't have system headers, use default SDK name (last resort)
16375        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16376          SDKNAME=${SDKNAME:-macosx}
16377        fi
16378
16379        if test -n "$SDKNAME"; then
16380          # Call xcodebuild to determine SYSROOT
16381          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16382        fi
16383      else
16384        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16385          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
16386        fi
16387      fi
16388    else
16389      # warn user if --with-sdk-name was also set
16390      if test -n "$with_sdk_name"; then
16391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16392$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16393      fi
16394    fi
16395
16396    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16397      # If no system framework headers, then SYSROOT must be set, or we won't build
16398      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
16399    fi
16400
16401    # Perform a basic sanity test
16402    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16403      if test -z "$SYSROOT"; then
16404        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
16405      else
16406        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16407      fi
16408    fi
16409
16410    # set SDKROOT too, Xcode tools will pick it up
16411    SDKROOT=$SYSROOT
16412
16413  fi
16414
16415  # Prepend the extra path to the global path
16416
16417  if test "x$EXTRA_PATH" != x; then
16418    if test "x$PATH" = x; then
16419      PATH="$EXTRA_PATH"
16420    else
16421      PATH="$EXTRA_PATH:$PATH"
16422    fi
16423  fi
16424
16425
16426  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16427    # Add extra search paths on solaris for utilities like ar and as etc...
16428    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16429  fi
16430
16431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16432$as_echo_n "checking for sysroot... " >&6; }
16433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16434$as_echo "$SYSROOT" >&6; }
16435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16436$as_echo_n "checking for toolchain path... " >&6; }
16437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16438$as_echo "$TOOLCHAIN_PATH" >&6; }
16439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16440$as_echo_n "checking for extra path... " >&6; }
16441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16442$as_echo "$EXTRA_PATH" >&6; }
16443
16444
16445# To properly create a configuration name, we need to have the OpenJDK target
16446# and options (variants and debug level) parsed.
16447
16448
16449
16450# Check whether --with-conf-name was given.
16451if test "${with_conf_name+set}" = set; then :
16452  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16453fi
16454
16455
16456  # Test from where we are running configure, in or outside of src root.
16457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16458$as_echo_n "checking where to store configuration... " >&6; }
16459  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16460      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16461      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16462    # We are running configure from the src root.
16463    # Create a default ./build/target-variant-debuglevel output root.
16464    if test "x${CONF_NAME}" = x; then
16465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16466$as_echo "in default location" >&6; }
16467      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16468    else
16469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16470$as_echo "in build directory with custom name" >&6; }
16471    fi
16472    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16473    $MKDIR -p "$OUTPUT_ROOT"
16474    if test ! -d "$OUTPUT_ROOT"; then
16475      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16476    fi
16477  else
16478    # We are running configure from outside of the src dir.
16479    # Then use the current directory as output dir!
16480    # If configuration is situated in normal build directory, just use the build
16481    # directory name as configuration name, otherwise use the complete path.
16482    if test "x${CONF_NAME}" = x; then
16483      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16484    fi
16485    OUTPUT_ROOT="$CURDIR"
16486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16487$as_echo "in current directory" >&6; }
16488
16489    # WARNING: This might be a bad thing to do. You need to be sure you want to
16490    # have a configuration in this directory. Do some sanity checks!
16491
16492    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16493      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16494      # other files
16495      files_present=`$LS $OUTPUT_ROOT`
16496      # Configure has already touched config.log and confdefs.h in the current dir when this check
16497      # is performed.
16498      filtered_files=`$ECHO "$files_present" \
16499          | $SED -e 's/config.log//g' \
16500              -e 's/configure.log//g' \
16501              -e 's/confdefs.h//g' \
16502              -e 's/ //g' \
16503          | $TR -d '\n'`
16504      if test "x$filtered_files" != x; then
16505        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16506$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16507        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16508$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16509        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16510$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16511        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16512$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16514$as_echo "$as_me: seriously mess up just about everything." >&6;}
16515        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16516$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16517        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16518$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16519        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16520      fi
16521    fi
16522  fi
16523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16524$as_echo_n "checking what configuration name to use... " >&6; }
16525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16526$as_echo "$CONF_NAME" >&6; }
16527
16528
16529  # Only process if variable expands to non-empty
16530
16531  if test "x$OUTPUT_ROOT" != x; then
16532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16533
16534  # Input might be given as Windows format, start by converting to
16535  # unix format.
16536  path="$OUTPUT_ROOT"
16537  new_path=`$CYGPATH -u "$path"`
16538
16539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16542  # "foo.exe" is OK but "foo" is an error.
16543  #
16544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16545  # It is also a way to make sure we got the proper file name for the real test later on.
16546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16547  if test "x$test_shortpath" = x; then
16548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16549$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16550    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16551  fi
16552
16553  # Call helper function which possibly converts this using DOS-style short mode.
16554  # If so, the updated path is stored in $new_path.
16555
16556  input_path="$new_path"
16557  # Check if we need to convert this using DOS-style short mode. If the path
16558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16559  # take no chances and rewrite it.
16560  # Note: m4 eats our [], so we need to use [ and ] instead.
16561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16562  if test "x$has_forbidden_chars" != x; then
16563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16567      # Going to short mode and back again did indeed matter. Since short mode is
16568      # case insensitive, let's make it lowercase to improve readability.
16569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16570      # Now convert it back to Unix-style (cygpath)
16571      input_path=`$CYGPATH -u "$shortmode_path"`
16572      new_path="$input_path"
16573    fi
16574  fi
16575
16576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16577  if test "x$test_cygdrive_prefix" = x; then
16578    # As a simple fix, exclude /usr/bin since it's not a real path.
16579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16581      # a path prefixed by /cygdrive for fixpath to work.
16582      new_path="$CYGWIN_ROOT_PATH$input_path"
16583    fi
16584  fi
16585
16586
16587  if test "x$path" != "x$new_path"; then
16588    OUTPUT_ROOT="$new_path"
16589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16590$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16591  fi
16592
16593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16594
16595  path="$OUTPUT_ROOT"
16596  has_colon=`$ECHO $path | $GREP ^.:`
16597  new_path="$path"
16598  if test "x$has_colon" = x; then
16599    # Not in mixed or Windows style, start by that.
16600    new_path=`cmd //c echo $path`
16601  fi
16602
16603
16604  input_path="$new_path"
16605  # Check if we need to convert this using DOS-style short mode. If the path
16606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16607  # take no chances and rewrite it.
16608  # Note: m4 eats our [], so we need to use [ and ] instead.
16609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16610  if test "x$has_forbidden_chars" != x; then
16611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16613  fi
16614
16615
16616  windows_path="$new_path"
16617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16618    unix_path=`$CYGPATH -u "$windows_path"`
16619    new_path="$unix_path"
16620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16622    new_path="$unix_path"
16623  fi
16624
16625  if test "x$path" != "x$new_path"; then
16626    OUTPUT_ROOT="$new_path"
16627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16628$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16629  fi
16630
16631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16633
16634    else
16635      # We're on a unix platform. Hooray! :)
16636      path="$OUTPUT_ROOT"
16637      has_space=`$ECHO "$path" | $GREP " "`
16638      if test "x$has_space" != x; then
16639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16640$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16642      fi
16643
16644      # Use eval to expand a potential ~
16645      eval path="$path"
16646      if test ! -f "$path" && test ! -d "$path"; then
16647        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16648      fi
16649
16650      if test -d "$path"; then
16651        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16652      else
16653        dir="`$DIRNAME "$path"`"
16654        base="`$BASENAME "$path"`"
16655        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16656      fi
16657    fi
16658  fi
16659
16660
16661  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16662  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16663
16664  SPEC=$OUTPUT_ROOT/spec.gmk
16665
16666  CONF_NAME=$CONF_NAME
16667
16668  OUTPUT_ROOT=$OUTPUT_ROOT
16669
16670
16671
16672  # The spec.gmk file contains all variables for the make system.
16673  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16674
16675  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16676  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16677
16678  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16679  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16680
16681  # The compare.sh is used to compare the build output to other builds.
16682  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16683
16684  # The generated Makefile knows where the spec.gmk is and where the source is.
16685  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16686  # which will look for generated configurations
16687  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16688
16689
16690
16691# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16692
16693  for ac_prog in apt-get yum port pkgutil pkgadd
16694do
16695  # Extract the first word of "$ac_prog", so it can be a program name with args.
16696set dummy $ac_prog; ac_word=$2
16697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16698$as_echo_n "checking for $ac_word... " >&6; }
16699if ${ac_cv_prog_PKGHANDLER+:} false; then :
16700  $as_echo_n "(cached) " >&6
16701else
16702  if test -n "$PKGHANDLER"; then
16703  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16704else
16705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16706for as_dir in $PATH
16707do
16708  IFS=$as_save_IFS
16709  test -z "$as_dir" && as_dir=.
16710    for ac_exec_ext in '' $ac_executable_extensions; do
16711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16712    ac_cv_prog_PKGHANDLER="$ac_prog"
16713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16714    break 2
16715  fi
16716done
16717  done
16718IFS=$as_save_IFS
16719
16720fi
16721fi
16722PKGHANDLER=$ac_cv_prog_PKGHANDLER
16723if test -n "$PKGHANDLER"; then
16724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16725$as_echo "$PKGHANDLER" >&6; }
16726else
16727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16728$as_echo "no" >&6; }
16729fi
16730
16731
16732  test -n "$PKGHANDLER" && break
16733done
16734
16735
16736
16737# Setup tools that requires more complex handling, or that is not needed by the configure script.
16738
16739
16740
16741  # Publish this variable in the help.
16742
16743
16744  if [ -z "${MAKE+x}" ]; then
16745    # The variable is not set by user, try to locate tool using the code snippet
16746
16747    # Try our hardest to locate a correct version of GNU make
16748    for ac_prog in gmake
16749do
16750  # Extract the first word of "$ac_prog", so it can be a program name with args.
16751set dummy $ac_prog; ac_word=$2
16752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16753$as_echo_n "checking for $ac_word... " >&6; }
16754if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16755  $as_echo_n "(cached) " >&6
16756else
16757  case $CHECK_GMAKE in
16758  [\\/]* | ?:[\\/]*)
16759  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16760  ;;
16761  *)
16762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16763for as_dir in $PATH
16764do
16765  IFS=$as_save_IFS
16766  test -z "$as_dir" && as_dir=.
16767    for ac_exec_ext in '' $ac_executable_extensions; do
16768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16769    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16771    break 2
16772  fi
16773done
16774  done
16775IFS=$as_save_IFS
16776
16777  ;;
16778esac
16779fi
16780CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16781if test -n "$CHECK_GMAKE"; then
16782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16783$as_echo "$CHECK_GMAKE" >&6; }
16784else
16785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16786$as_echo "no" >&6; }
16787fi
16788
16789
16790  test -n "$CHECK_GMAKE" && break
16791done
16792
16793
16794  MAKE_CANDIDATE=""$CHECK_GMAKE""
16795  DESCRIPTION="gmake in PATH"
16796
16797  # On Cygwin, we require a newer version of make than on other platforms
16798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16799    MAKE_VERSION_EXPR="-e 4\."
16800    MAKE_REQUIRED_VERSION="4.0"
16801   else
16802    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16803    MAKE_REQUIRED_VERSION="3.81"
16804  fi
16805
16806  if test "x$MAKE_CANDIDATE" != x; then
16807    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16808$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16809    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16810    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16811    if test "x$IS_GNU_MAKE" = x; then
16812      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16813$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16814    else
16815      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16816      if test "x$IS_MODERN_MAKE" = x; then
16817        { $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
16818$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;}
16819      else
16820        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16821          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16822            MAKE_EXPECTED_ENV='cygwin'
16823          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16824            MAKE_EXPECTED_ENV='msys'
16825          else
16826            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16827          fi
16828          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16829          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16830        else
16831          # Not relevant for non-Windows
16832          IS_MAKE_CORRECT_ENV=true
16833        fi
16834        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16835          { $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
16836$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;}
16837        else
16838          FOUND_MAKE=$MAKE_CANDIDATE
16839
16840  # Only process if variable expands to non-empty
16841
16842  if test "x$FOUND_MAKE" != x; then
16843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16844
16845  # First separate the path from the arguments. This will split at the first
16846  # space.
16847  complete="$FOUND_MAKE"
16848  path="${complete%% *}"
16849  tmp="$complete EOL"
16850  arguments="${tmp#* }"
16851
16852  # Input might be given as Windows format, start by converting to
16853  # unix format.
16854  new_path=`$CYGPATH -u "$path"`
16855
16856  # Now try to locate executable using which
16857  new_path=`$WHICH "$new_path" 2> /dev/null`
16858  # bat and cmd files are not always considered executable in cygwin causing which
16859  # to not find them
16860  if test "x$new_path" = x \
16861      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16862      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16863    new_path=`$CYGPATH -u "$path"`
16864  fi
16865  if test "x$new_path" = x; then
16866    # Oops. Which didn't find the executable.
16867    # The splitting of arguments from the executable at a space might have been incorrect,
16868    # since paths with space are more likely in Windows. Give it another try with the whole
16869    # argument.
16870    path="$complete"
16871    arguments="EOL"
16872    new_path=`$CYGPATH -u "$path"`
16873    new_path=`$WHICH "$new_path" 2> /dev/null`
16874    # bat and cmd files are not always considered executable in cygwin causing which
16875    # to not find them
16876    if test "x$new_path" = x \
16877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16879      new_path=`$CYGPATH -u "$path"`
16880    fi
16881    if test "x$new_path" = x; then
16882      # It's still not found. Now this is an unrecoverable error.
16883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16885      has_space=`$ECHO "$complete" | $GREP " "`
16886      if test "x$has_space" != x; then
16887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16889      fi
16890      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16891    fi
16892  fi
16893
16894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16897  # "foo.exe" is OK but "foo" is an error.
16898  #
16899  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16900  # It is also a way to make sure we got the proper file name for the real test later on.
16901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16902  if test "x$test_shortpath" = x; then
16903    # Short path failed, file does not exist as specified.
16904    # Try adding .exe or .cmd
16905    if test -f "${new_path}.exe"; then
16906      input_to_shortpath="${new_path}.exe"
16907    elif test -f "${new_path}.cmd"; then
16908      input_to_shortpath="${new_path}.cmd"
16909    else
16910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16912      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16913$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16914      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16915    fi
16916  else
16917    input_to_shortpath="$new_path"
16918  fi
16919
16920  # Call helper function which possibly converts this using DOS-style short mode.
16921  # If so, the updated path is stored in $new_path.
16922  new_path="$input_to_shortpath"
16923
16924  input_path="$input_to_shortpath"
16925  # Check if we need to convert this using DOS-style short mode. If the path
16926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16927  # take no chances and rewrite it.
16928  # Note: m4 eats our [], so we need to use [ and ] instead.
16929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16930  if test "x$has_forbidden_chars" != x; then
16931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16935      # Going to short mode and back again did indeed matter. Since short mode is
16936      # case insensitive, let's make it lowercase to improve readability.
16937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16938      # Now convert it back to Unix-style (cygpath)
16939      input_path=`$CYGPATH -u "$shortmode_path"`
16940      new_path="$input_path"
16941    fi
16942  fi
16943
16944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16945  if test "x$test_cygdrive_prefix" = x; then
16946    # As a simple fix, exclude /usr/bin since it's not a real path.
16947    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16949      # a path prefixed by /cygdrive for fixpath to work.
16950      new_path="$CYGWIN_ROOT_PATH$input_path"
16951    fi
16952  fi
16953
16954  # remove trailing .exe if any
16955  new_path="${new_path/%.exe/}"
16956
16957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16958
16959  # First separate the path from the arguments. This will split at the first
16960  # space.
16961  complete="$FOUND_MAKE"
16962  path="${complete%% *}"
16963  tmp="$complete EOL"
16964  arguments="${tmp#* }"
16965
16966  # Input might be given as Windows format, start by converting to
16967  # unix format.
16968  new_path="$path"
16969
16970  windows_path="$new_path"
16971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16972    unix_path=`$CYGPATH -u "$windows_path"`
16973    new_path="$unix_path"
16974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16976    new_path="$unix_path"
16977  fi
16978
16979
16980  # Now try to locate executable using which
16981  new_path=`$WHICH "$new_path" 2> /dev/null`
16982
16983  if test "x$new_path" = x; then
16984    # Oops. Which didn't find the executable.
16985    # The splitting of arguments from the executable at a space might have been incorrect,
16986    # since paths with space are more likely in Windows. Give it another try with the whole
16987    # argument.
16988    path="$complete"
16989    arguments="EOL"
16990    new_path="$path"
16991
16992  windows_path="$new_path"
16993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16994    unix_path=`$CYGPATH -u "$windows_path"`
16995    new_path="$unix_path"
16996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16998    new_path="$unix_path"
16999  fi
17000
17001
17002    new_path=`$WHICH "$new_path" 2> /dev/null`
17003    # bat and cmd files are not always considered executable in MSYS causing which
17004    # to not find them
17005    if test "x$new_path" = x \
17006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17008      new_path="$path"
17009
17010  windows_path="$new_path"
17011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17012    unix_path=`$CYGPATH -u "$windows_path"`
17013    new_path="$unix_path"
17014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17016    new_path="$unix_path"
17017  fi
17018
17019    fi
17020
17021    if test "x$new_path" = x; then
17022      # It's still not found. Now this is an unrecoverable error.
17023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17024$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17025      has_space=`$ECHO "$complete" | $GREP " "`
17026      if test "x$has_space" != x; then
17027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17029      fi
17030      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17031    fi
17032  fi
17033
17034  # Now new_path has a complete unix path to the binary
17035  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17036    # Keep paths in /bin as-is, but remove trailing .exe if any
17037    new_path="${new_path/%.exe/}"
17038    # Do not save /bin paths to all_fixpath_prefixes!
17039  else
17040    # Not in mixed or Windows style, start by that.
17041    new_path=`cmd //c echo $new_path`
17042
17043  input_path="$new_path"
17044  # Check if we need to convert this using DOS-style short mode. If the path
17045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17046  # take no chances and rewrite it.
17047  # Note: m4 eats our [], so we need to use [ and ] instead.
17048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17049  if test "x$has_forbidden_chars" != x; then
17050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17052  fi
17053
17054    # Output is in $new_path
17055
17056  windows_path="$new_path"
17057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17058    unix_path=`$CYGPATH -u "$windows_path"`
17059    new_path="$unix_path"
17060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17062    new_path="$unix_path"
17063  fi
17064
17065    # remove trailing .exe if any
17066    new_path="${new_path/%.exe/}"
17067
17068    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17069    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17070  fi
17071
17072    else
17073      # We're on a unix platform. Hooray! :)
17074      # First separate the path from the arguments. This will split at the first
17075      # space.
17076      complete="$FOUND_MAKE"
17077      path="${complete%% *}"
17078      tmp="$complete EOL"
17079      arguments="${tmp#* }"
17080
17081      # Cannot rely on the command "which" here since it doesn't always work.
17082      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17083      if test -z "$is_absolute_path"; then
17084        # Path to executable is not absolute. Find it.
17085        IFS_save="$IFS"
17086        IFS=:
17087        for p in $PATH; do
17088          if test -f "$p/$path" && test -x "$p/$path"; then
17089            new_path="$p/$path"
17090            break
17091          fi
17092        done
17093        IFS="$IFS_save"
17094      else
17095        # This is an absolute path, we can use it without further modifications.
17096        new_path="$path"
17097      fi
17098
17099      if test "x$new_path" = x; then
17100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17102        has_space=`$ECHO "$complete" | $GREP " "`
17103        if test "x$has_space" != x; then
17104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17106        fi
17107        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17108      fi
17109    fi
17110
17111    # Now join together the path and the arguments once again
17112    if test "x$arguments" != xEOL; then
17113      new_complete="$new_path ${arguments% *}"
17114    else
17115      new_complete="$new_path"
17116    fi
17117
17118    if test "x$complete" != "x$new_complete"; then
17119      FOUND_MAKE="$new_complete"
17120      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17121$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17122    fi
17123  fi
17124
17125        fi
17126      fi
17127    fi
17128  fi
17129
17130
17131    if test "x$FOUND_MAKE" = x; then
17132      for ac_prog in make
17133do
17134  # Extract the first word of "$ac_prog", so it can be a program name with args.
17135set dummy $ac_prog; ac_word=$2
17136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17137$as_echo_n "checking for $ac_word... " >&6; }
17138if ${ac_cv_path_CHECK_MAKE+:} false; then :
17139  $as_echo_n "(cached) " >&6
17140else
17141  case $CHECK_MAKE in
17142  [\\/]* | ?:[\\/]*)
17143  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17144  ;;
17145  *)
17146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17147for as_dir in $PATH
17148do
17149  IFS=$as_save_IFS
17150  test -z "$as_dir" && as_dir=.
17151    for ac_exec_ext in '' $ac_executable_extensions; do
17152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17153    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17155    break 2
17156  fi
17157done
17158  done
17159IFS=$as_save_IFS
17160
17161  ;;
17162esac
17163fi
17164CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17165if test -n "$CHECK_MAKE"; then
17166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17167$as_echo "$CHECK_MAKE" >&6; }
17168else
17169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17170$as_echo "no" >&6; }
17171fi
17172
17173
17174  test -n "$CHECK_MAKE" && break
17175done
17176
17177
17178  MAKE_CANDIDATE=""$CHECK_MAKE""
17179  DESCRIPTION="make in PATH"
17180
17181  # On Cygwin, we require a newer version of make than on other platforms
17182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17183    MAKE_VERSION_EXPR="-e 4\."
17184    MAKE_REQUIRED_VERSION="4.0"
17185   else
17186    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17187    MAKE_REQUIRED_VERSION="3.81"
17188  fi
17189
17190  if test "x$MAKE_CANDIDATE" != x; then
17191    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17192$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17193    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17194    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17195    if test "x$IS_GNU_MAKE" = x; then
17196      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17197$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17198    else
17199      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17200      if test "x$IS_MODERN_MAKE" = x; then
17201        { $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
17202$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;}
17203      else
17204        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17205          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17206            MAKE_EXPECTED_ENV='cygwin'
17207          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17208            MAKE_EXPECTED_ENV='msys'
17209          else
17210            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17211          fi
17212          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17213          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17214        else
17215          # Not relevant for non-Windows
17216          IS_MAKE_CORRECT_ENV=true
17217        fi
17218        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17219          { $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
17220$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;}
17221        else
17222          FOUND_MAKE=$MAKE_CANDIDATE
17223
17224  # Only process if variable expands to non-empty
17225
17226  if test "x$FOUND_MAKE" != x; then
17227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17228
17229  # First separate the path from the arguments. This will split at the first
17230  # space.
17231  complete="$FOUND_MAKE"
17232  path="${complete%% *}"
17233  tmp="$complete EOL"
17234  arguments="${tmp#* }"
17235
17236  # Input might be given as Windows format, start by converting to
17237  # unix format.
17238  new_path=`$CYGPATH -u "$path"`
17239
17240  # Now try to locate executable using which
17241  new_path=`$WHICH "$new_path" 2> /dev/null`
17242  # bat and cmd files are not always considered executable in cygwin causing which
17243  # to not find them
17244  if test "x$new_path" = x \
17245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17247    new_path=`$CYGPATH -u "$path"`
17248  fi
17249  if test "x$new_path" = x; then
17250    # Oops. Which didn't find the executable.
17251    # The splitting of arguments from the executable at a space might have been incorrect,
17252    # since paths with space are more likely in Windows. Give it another try with the whole
17253    # argument.
17254    path="$complete"
17255    arguments="EOL"
17256    new_path=`$CYGPATH -u "$path"`
17257    new_path=`$WHICH "$new_path" 2> /dev/null`
17258    # bat and cmd files are not always considered executable in cygwin causing which
17259    # to not find them
17260    if test "x$new_path" = x \
17261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17263      new_path=`$CYGPATH -u "$path"`
17264    fi
17265    if test "x$new_path" = x; then
17266      # It's still not found. Now this is an unrecoverable error.
17267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17269      has_space=`$ECHO "$complete" | $GREP " "`
17270      if test "x$has_space" != x; then
17271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17273      fi
17274      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17275    fi
17276  fi
17277
17278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17281  # "foo.exe" is OK but "foo" is an error.
17282  #
17283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17284  # It is also a way to make sure we got the proper file name for the real test later on.
17285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17286  if test "x$test_shortpath" = x; then
17287    # Short path failed, file does not exist as specified.
17288    # Try adding .exe or .cmd
17289    if test -f "${new_path}.exe"; then
17290      input_to_shortpath="${new_path}.exe"
17291    elif test -f "${new_path}.cmd"; then
17292      input_to_shortpath="${new_path}.cmd"
17293    else
17294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17299    fi
17300  else
17301    input_to_shortpath="$new_path"
17302  fi
17303
17304  # Call helper function which possibly converts this using DOS-style short mode.
17305  # If so, the updated path is stored in $new_path.
17306  new_path="$input_to_shortpath"
17307
17308  input_path="$input_to_shortpath"
17309  # Check if we need to convert this using DOS-style short mode. If the path
17310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17311  # take no chances and rewrite it.
17312  # Note: m4 eats our [], so we need to use [ and ] instead.
17313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17314  if test "x$has_forbidden_chars" != x; then
17315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17319      # Going to short mode and back again did indeed matter. Since short mode is
17320      # case insensitive, let's make it lowercase to improve readability.
17321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17322      # Now convert it back to Unix-style (cygpath)
17323      input_path=`$CYGPATH -u "$shortmode_path"`
17324      new_path="$input_path"
17325    fi
17326  fi
17327
17328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17329  if test "x$test_cygdrive_prefix" = x; then
17330    # As a simple fix, exclude /usr/bin since it's not a real path.
17331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17333      # a path prefixed by /cygdrive for fixpath to work.
17334      new_path="$CYGWIN_ROOT_PATH$input_path"
17335    fi
17336  fi
17337
17338  # remove trailing .exe if any
17339  new_path="${new_path/%.exe/}"
17340
17341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17342
17343  # First separate the path from the arguments. This will split at the first
17344  # space.
17345  complete="$FOUND_MAKE"
17346  path="${complete%% *}"
17347  tmp="$complete EOL"
17348  arguments="${tmp#* }"
17349
17350  # Input might be given as Windows format, start by converting to
17351  # unix format.
17352  new_path="$path"
17353
17354  windows_path="$new_path"
17355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17356    unix_path=`$CYGPATH -u "$windows_path"`
17357    new_path="$unix_path"
17358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17360    new_path="$unix_path"
17361  fi
17362
17363
17364  # Now try to locate executable using which
17365  new_path=`$WHICH "$new_path" 2> /dev/null`
17366
17367  if test "x$new_path" = x; then
17368    # Oops. Which didn't find the executable.
17369    # The splitting of arguments from the executable at a space might have been incorrect,
17370    # since paths with space are more likely in Windows. Give it another try with the whole
17371    # argument.
17372    path="$complete"
17373    arguments="EOL"
17374    new_path="$path"
17375
17376  windows_path="$new_path"
17377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17378    unix_path=`$CYGPATH -u "$windows_path"`
17379    new_path="$unix_path"
17380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17382    new_path="$unix_path"
17383  fi
17384
17385
17386    new_path=`$WHICH "$new_path" 2> /dev/null`
17387    # bat and cmd files are not always considered executable in MSYS causing which
17388    # to not find them
17389    if test "x$new_path" = x \
17390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17392      new_path="$path"
17393
17394  windows_path="$new_path"
17395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17396    unix_path=`$CYGPATH -u "$windows_path"`
17397    new_path="$unix_path"
17398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17400    new_path="$unix_path"
17401  fi
17402
17403    fi
17404
17405    if test "x$new_path" = x; then
17406      # It's still not found. Now this is an unrecoverable error.
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17408$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17409      has_space=`$ECHO "$complete" | $GREP " "`
17410      if test "x$has_space" != x; then
17411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17413      fi
17414      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17415    fi
17416  fi
17417
17418  # Now new_path has a complete unix path to the binary
17419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17420    # Keep paths in /bin as-is, but remove trailing .exe if any
17421    new_path="${new_path/%.exe/}"
17422    # Do not save /bin paths to all_fixpath_prefixes!
17423  else
17424    # Not in mixed or Windows style, start by that.
17425    new_path=`cmd //c echo $new_path`
17426
17427  input_path="$new_path"
17428  # Check if we need to convert this using DOS-style short mode. If the path
17429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17430  # take no chances and rewrite it.
17431  # Note: m4 eats our [], so we need to use [ and ] instead.
17432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17433  if test "x$has_forbidden_chars" != x; then
17434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17436  fi
17437
17438    # Output is in $new_path
17439
17440  windows_path="$new_path"
17441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17442    unix_path=`$CYGPATH -u "$windows_path"`
17443    new_path="$unix_path"
17444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17446    new_path="$unix_path"
17447  fi
17448
17449    # remove trailing .exe if any
17450    new_path="${new_path/%.exe/}"
17451
17452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17454  fi
17455
17456    else
17457      # We're on a unix platform. Hooray! :)
17458      # First separate the path from the arguments. This will split at the first
17459      # space.
17460      complete="$FOUND_MAKE"
17461      path="${complete%% *}"
17462      tmp="$complete EOL"
17463      arguments="${tmp#* }"
17464
17465      # Cannot rely on the command "which" here since it doesn't always work.
17466      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17467      if test -z "$is_absolute_path"; then
17468        # Path to executable is not absolute. Find it.
17469        IFS_save="$IFS"
17470        IFS=:
17471        for p in $PATH; do
17472          if test -f "$p/$path" && test -x "$p/$path"; then
17473            new_path="$p/$path"
17474            break
17475          fi
17476        done
17477        IFS="$IFS_save"
17478      else
17479        # This is an absolute path, we can use it without further modifications.
17480        new_path="$path"
17481      fi
17482
17483      if test "x$new_path" = x; then
17484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17485$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17486        has_space=`$ECHO "$complete" | $GREP " "`
17487        if test "x$has_space" != x; then
17488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17490        fi
17491        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17492      fi
17493    fi
17494
17495    # Now join together the path and the arguments once again
17496    if test "x$arguments" != xEOL; then
17497      new_complete="$new_path ${arguments% *}"
17498    else
17499      new_complete="$new_path"
17500    fi
17501
17502    if test "x$complete" != "x$new_complete"; then
17503      FOUND_MAKE="$new_complete"
17504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17505$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17506    fi
17507  fi
17508
17509        fi
17510      fi
17511    fi
17512  fi
17513
17514    fi
17515
17516    if test "x$FOUND_MAKE" = x; then
17517      if test "x$TOOLCHAIN_PATH" != x; then
17518        # We have a toolchain path, check that as well before giving up.
17519        OLD_PATH=$PATH
17520        PATH=$TOOLCHAIN_PATH:$PATH
17521        for ac_prog in gmake
17522do
17523  # Extract the first word of "$ac_prog", so it can be a program name with args.
17524set dummy $ac_prog; ac_word=$2
17525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17526$as_echo_n "checking for $ac_word... " >&6; }
17527if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17528  $as_echo_n "(cached) " >&6
17529else
17530  case $CHECK_TOOLSDIR_GMAKE in
17531  [\\/]* | ?:[\\/]*)
17532  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17533  ;;
17534  *)
17535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17536for as_dir in $PATH
17537do
17538  IFS=$as_save_IFS
17539  test -z "$as_dir" && as_dir=.
17540    for ac_exec_ext in '' $ac_executable_extensions; do
17541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17542    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17544    break 2
17545  fi
17546done
17547  done
17548IFS=$as_save_IFS
17549
17550  ;;
17551esac
17552fi
17553CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17554if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17556$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17557else
17558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17559$as_echo "no" >&6; }
17560fi
17561
17562
17563  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17564done
17565
17566
17567  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17568  DESCRIPTION="gmake in tools-dir"
17569
17570  # On Cygwin, we require a newer version of make than on other platforms
17571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17572    MAKE_VERSION_EXPR="-e 4\."
17573    MAKE_REQUIRED_VERSION="4.0"
17574   else
17575    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17576    MAKE_REQUIRED_VERSION="3.81"
17577  fi
17578
17579  if test "x$MAKE_CANDIDATE" != x; then
17580    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17581$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17582    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17583    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17584    if test "x$IS_GNU_MAKE" = x; then
17585      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17586$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17587    else
17588      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17589      if test "x$IS_MODERN_MAKE" = x; then
17590        { $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
17591$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;}
17592      else
17593        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17594          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17595            MAKE_EXPECTED_ENV='cygwin'
17596          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17597            MAKE_EXPECTED_ENV='msys'
17598          else
17599            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17600          fi
17601          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17602          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17603        else
17604          # Not relevant for non-Windows
17605          IS_MAKE_CORRECT_ENV=true
17606        fi
17607        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17608          { $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
17609$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;}
17610        else
17611          FOUND_MAKE=$MAKE_CANDIDATE
17612
17613  # Only process if variable expands to non-empty
17614
17615  if test "x$FOUND_MAKE" != x; then
17616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17617
17618  # First separate the path from the arguments. This will split at the first
17619  # space.
17620  complete="$FOUND_MAKE"
17621  path="${complete%% *}"
17622  tmp="$complete EOL"
17623  arguments="${tmp#* }"
17624
17625  # Input might be given as Windows format, start by converting to
17626  # unix format.
17627  new_path=`$CYGPATH -u "$path"`
17628
17629  # Now try to locate executable using which
17630  new_path=`$WHICH "$new_path" 2> /dev/null`
17631  # bat and cmd files are not always considered executable in cygwin causing which
17632  # to not find them
17633  if test "x$new_path" = x \
17634      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17635      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17636    new_path=`$CYGPATH -u "$path"`
17637  fi
17638  if test "x$new_path" = x; then
17639    # Oops. Which didn't find the executable.
17640    # The splitting of arguments from the executable at a space might have been incorrect,
17641    # since paths with space are more likely in Windows. Give it another try with the whole
17642    # argument.
17643    path="$complete"
17644    arguments="EOL"
17645    new_path=`$CYGPATH -u "$path"`
17646    new_path=`$WHICH "$new_path" 2> /dev/null`
17647    # bat and cmd files are not always considered executable in cygwin causing which
17648    # to not find them
17649    if test "x$new_path" = x \
17650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17652      new_path=`$CYGPATH -u "$path"`
17653    fi
17654    if test "x$new_path" = x; then
17655      # It's still not found. Now this is an unrecoverable error.
17656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17658      has_space=`$ECHO "$complete" | $GREP " "`
17659      if test "x$has_space" != x; then
17660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17662      fi
17663      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17664    fi
17665  fi
17666
17667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17670  # "foo.exe" is OK but "foo" is an error.
17671  #
17672  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17673  # It is also a way to make sure we got the proper file name for the real test later on.
17674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17675  if test "x$test_shortpath" = x; then
17676    # Short path failed, file does not exist as specified.
17677    # Try adding .exe or .cmd
17678    if test -f "${new_path}.exe"; then
17679      input_to_shortpath="${new_path}.exe"
17680    elif test -f "${new_path}.cmd"; then
17681      input_to_shortpath="${new_path}.cmd"
17682    else
17683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17685      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17686$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17687      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17688    fi
17689  else
17690    input_to_shortpath="$new_path"
17691  fi
17692
17693  # Call helper function which possibly converts this using DOS-style short mode.
17694  # If so, the updated path is stored in $new_path.
17695  new_path="$input_to_shortpath"
17696
17697  input_path="$input_to_shortpath"
17698  # Check if we need to convert this using DOS-style short mode. If the path
17699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17700  # take no chances and rewrite it.
17701  # Note: m4 eats our [], so we need to use [ and ] instead.
17702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17703  if test "x$has_forbidden_chars" != x; then
17704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17708      # Going to short mode and back again did indeed matter. Since short mode is
17709      # case insensitive, let's make it lowercase to improve readability.
17710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17711      # Now convert it back to Unix-style (cygpath)
17712      input_path=`$CYGPATH -u "$shortmode_path"`
17713      new_path="$input_path"
17714    fi
17715  fi
17716
17717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17718  if test "x$test_cygdrive_prefix" = x; then
17719    # As a simple fix, exclude /usr/bin since it's not a real path.
17720    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17722      # a path prefixed by /cygdrive for fixpath to work.
17723      new_path="$CYGWIN_ROOT_PATH$input_path"
17724    fi
17725  fi
17726
17727  # remove trailing .exe if any
17728  new_path="${new_path/%.exe/}"
17729
17730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17731
17732  # First separate the path from the arguments. This will split at the first
17733  # space.
17734  complete="$FOUND_MAKE"
17735  path="${complete%% *}"
17736  tmp="$complete EOL"
17737  arguments="${tmp#* }"
17738
17739  # Input might be given as Windows format, start by converting to
17740  # unix format.
17741  new_path="$path"
17742
17743  windows_path="$new_path"
17744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17745    unix_path=`$CYGPATH -u "$windows_path"`
17746    new_path="$unix_path"
17747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17749    new_path="$unix_path"
17750  fi
17751
17752
17753  # Now try to locate executable using which
17754  new_path=`$WHICH "$new_path" 2> /dev/null`
17755
17756  if test "x$new_path" = x; then
17757    # Oops. Which didn't find the executable.
17758    # The splitting of arguments from the executable at a space might have been incorrect,
17759    # since paths with space are more likely in Windows. Give it another try with the whole
17760    # argument.
17761    path="$complete"
17762    arguments="EOL"
17763    new_path="$path"
17764
17765  windows_path="$new_path"
17766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17767    unix_path=`$CYGPATH -u "$windows_path"`
17768    new_path="$unix_path"
17769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17771    new_path="$unix_path"
17772  fi
17773
17774
17775    new_path=`$WHICH "$new_path" 2> /dev/null`
17776    # bat and cmd files are not always considered executable in MSYS causing which
17777    # to not find them
17778    if test "x$new_path" = x \
17779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17781      new_path="$path"
17782
17783  windows_path="$new_path"
17784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17785    unix_path=`$CYGPATH -u "$windows_path"`
17786    new_path="$unix_path"
17787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17789    new_path="$unix_path"
17790  fi
17791
17792    fi
17793
17794    if test "x$new_path" = x; then
17795      # It's still not found. Now this is an unrecoverable error.
17796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17797$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17798      has_space=`$ECHO "$complete" | $GREP " "`
17799      if test "x$has_space" != x; then
17800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17802      fi
17803      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17804    fi
17805  fi
17806
17807  # Now new_path has a complete unix path to the binary
17808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17809    # Keep paths in /bin as-is, but remove trailing .exe if any
17810    new_path="${new_path/%.exe/}"
17811    # Do not save /bin paths to all_fixpath_prefixes!
17812  else
17813    # Not in mixed or Windows style, start by that.
17814    new_path=`cmd //c echo $new_path`
17815
17816  input_path="$new_path"
17817  # Check if we need to convert this using DOS-style short mode. If the path
17818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17819  # take no chances and rewrite it.
17820  # Note: m4 eats our [], so we need to use [ and ] instead.
17821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17822  if test "x$has_forbidden_chars" != x; then
17823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17825  fi
17826
17827    # Output is in $new_path
17828
17829  windows_path="$new_path"
17830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17831    unix_path=`$CYGPATH -u "$windows_path"`
17832    new_path="$unix_path"
17833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17835    new_path="$unix_path"
17836  fi
17837
17838    # remove trailing .exe if any
17839    new_path="${new_path/%.exe/}"
17840
17841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17843  fi
17844
17845    else
17846      # We're on a unix platform. Hooray! :)
17847      # First separate the path from the arguments. This will split at the first
17848      # space.
17849      complete="$FOUND_MAKE"
17850      path="${complete%% *}"
17851      tmp="$complete EOL"
17852      arguments="${tmp#* }"
17853
17854      # Cannot rely on the command "which" here since it doesn't always work.
17855      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17856      if test -z "$is_absolute_path"; then
17857        # Path to executable is not absolute. Find it.
17858        IFS_save="$IFS"
17859        IFS=:
17860        for p in $PATH; do
17861          if test -f "$p/$path" && test -x "$p/$path"; then
17862            new_path="$p/$path"
17863            break
17864          fi
17865        done
17866        IFS="$IFS_save"
17867      else
17868        # This is an absolute path, we can use it without further modifications.
17869        new_path="$path"
17870      fi
17871
17872      if test "x$new_path" = x; then
17873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17875        has_space=`$ECHO "$complete" | $GREP " "`
17876        if test "x$has_space" != x; then
17877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17879        fi
17880        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17881      fi
17882    fi
17883
17884    # Now join together the path and the arguments once again
17885    if test "x$arguments" != xEOL; then
17886      new_complete="$new_path ${arguments% *}"
17887    else
17888      new_complete="$new_path"
17889    fi
17890
17891    if test "x$complete" != "x$new_complete"; then
17892      FOUND_MAKE="$new_complete"
17893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17894$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17895    fi
17896  fi
17897
17898        fi
17899      fi
17900    fi
17901  fi
17902
17903        if test "x$FOUND_MAKE" = x; then
17904          for ac_prog in make
17905do
17906  # Extract the first word of "$ac_prog", so it can be a program name with args.
17907set dummy $ac_prog; ac_word=$2
17908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17909$as_echo_n "checking for $ac_word... " >&6; }
17910if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17911  $as_echo_n "(cached) " >&6
17912else
17913  case $CHECK_TOOLSDIR_MAKE in
17914  [\\/]* | ?:[\\/]*)
17915  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17916  ;;
17917  *)
17918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17919for as_dir in $PATH
17920do
17921  IFS=$as_save_IFS
17922  test -z "$as_dir" && as_dir=.
17923    for ac_exec_ext in '' $ac_executable_extensions; do
17924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17925    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17927    break 2
17928  fi
17929done
17930  done
17931IFS=$as_save_IFS
17932
17933  ;;
17934esac
17935fi
17936CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17937if test -n "$CHECK_TOOLSDIR_MAKE"; then
17938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17939$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17940else
17941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17942$as_echo "no" >&6; }
17943fi
17944
17945
17946  test -n "$CHECK_TOOLSDIR_MAKE" && break
17947done
17948
17949
17950  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17951  DESCRIPTION="make in tools-dir"
17952
17953  # On Cygwin, we require a newer version of make than on other platforms
17954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17955    MAKE_VERSION_EXPR="-e 4\."
17956    MAKE_REQUIRED_VERSION="4.0"
17957   else
17958    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17959    MAKE_REQUIRED_VERSION="3.81"
17960  fi
17961
17962  if test "x$MAKE_CANDIDATE" != x; then
17963    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17964$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17965    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17966    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17967    if test "x$IS_GNU_MAKE" = x; then
17968      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17969$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17970    else
17971      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17972      if test "x$IS_MODERN_MAKE" = x; then
17973        { $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
17974$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;}
17975      else
17976        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17977          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17978            MAKE_EXPECTED_ENV='cygwin'
17979          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17980            MAKE_EXPECTED_ENV='msys'
17981          else
17982            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17983          fi
17984          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17985          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17986        else
17987          # Not relevant for non-Windows
17988          IS_MAKE_CORRECT_ENV=true
17989        fi
17990        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17991          { $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
17992$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;}
17993        else
17994          FOUND_MAKE=$MAKE_CANDIDATE
17995
17996  # Only process if variable expands to non-empty
17997
17998  if test "x$FOUND_MAKE" != x; then
17999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18000
18001  # First separate the path from the arguments. This will split at the first
18002  # space.
18003  complete="$FOUND_MAKE"
18004  path="${complete%% *}"
18005  tmp="$complete EOL"
18006  arguments="${tmp#* }"
18007
18008  # Input might be given as Windows format, start by converting to
18009  # unix format.
18010  new_path=`$CYGPATH -u "$path"`
18011
18012  # Now try to locate executable using which
18013  new_path=`$WHICH "$new_path" 2> /dev/null`
18014  # bat and cmd files are not always considered executable in cygwin causing which
18015  # to not find them
18016  if test "x$new_path" = x \
18017      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18018      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18019    new_path=`$CYGPATH -u "$path"`
18020  fi
18021  if test "x$new_path" = x; then
18022    # Oops. Which didn't find the executable.
18023    # The splitting of arguments from the executable at a space might have been incorrect,
18024    # since paths with space are more likely in Windows. Give it another try with the whole
18025    # argument.
18026    path="$complete"
18027    arguments="EOL"
18028    new_path=`$CYGPATH -u "$path"`
18029    new_path=`$WHICH "$new_path" 2> /dev/null`
18030    # bat and cmd files are not always considered executable in cygwin causing which
18031    # to not find them
18032    if test "x$new_path" = x \
18033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18035      new_path=`$CYGPATH -u "$path"`
18036    fi
18037    if test "x$new_path" = x; then
18038      # It's still not found. Now this is an unrecoverable error.
18039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18041      has_space=`$ECHO "$complete" | $GREP " "`
18042      if test "x$has_space" != x; then
18043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18045      fi
18046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18047    fi
18048  fi
18049
18050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18053  # "foo.exe" is OK but "foo" is an error.
18054  #
18055  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18056  # It is also a way to make sure we got the proper file name for the real test later on.
18057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18058  if test "x$test_shortpath" = x; then
18059    # Short path failed, file does not exist as specified.
18060    # Try adding .exe or .cmd
18061    if test -f "${new_path}.exe"; then
18062      input_to_shortpath="${new_path}.exe"
18063    elif test -f "${new_path}.cmd"; then
18064      input_to_shortpath="${new_path}.cmd"
18065    else
18066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18071    fi
18072  else
18073    input_to_shortpath="$new_path"
18074  fi
18075
18076  # Call helper function which possibly converts this using DOS-style short mode.
18077  # If so, the updated path is stored in $new_path.
18078  new_path="$input_to_shortpath"
18079
18080  input_path="$input_to_shortpath"
18081  # Check if we need to convert this using DOS-style short mode. If the path
18082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18083  # take no chances and rewrite it.
18084  # Note: m4 eats our [], so we need to use [ and ] instead.
18085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18086  if test "x$has_forbidden_chars" != x; then
18087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18091      # Going to short mode and back again did indeed matter. Since short mode is
18092      # case insensitive, let's make it lowercase to improve readability.
18093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18094      # Now convert it back to Unix-style (cygpath)
18095      input_path=`$CYGPATH -u "$shortmode_path"`
18096      new_path="$input_path"
18097    fi
18098  fi
18099
18100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18101  if test "x$test_cygdrive_prefix" = x; then
18102    # As a simple fix, exclude /usr/bin since it's not a real path.
18103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18105      # a path prefixed by /cygdrive for fixpath to work.
18106      new_path="$CYGWIN_ROOT_PATH$input_path"
18107    fi
18108  fi
18109
18110  # remove trailing .exe if any
18111  new_path="${new_path/%.exe/}"
18112
18113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18114
18115  # First separate the path from the arguments. This will split at the first
18116  # space.
18117  complete="$FOUND_MAKE"
18118  path="${complete%% *}"
18119  tmp="$complete EOL"
18120  arguments="${tmp#* }"
18121
18122  # Input might be given as Windows format, start by converting to
18123  # unix format.
18124  new_path="$path"
18125
18126  windows_path="$new_path"
18127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18128    unix_path=`$CYGPATH -u "$windows_path"`
18129    new_path="$unix_path"
18130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18132    new_path="$unix_path"
18133  fi
18134
18135
18136  # Now try to locate executable using which
18137  new_path=`$WHICH "$new_path" 2> /dev/null`
18138
18139  if test "x$new_path" = x; then
18140    # Oops. Which didn't find the executable.
18141    # The splitting of arguments from the executable at a space might have been incorrect,
18142    # since paths with space are more likely in Windows. Give it another try with the whole
18143    # argument.
18144    path="$complete"
18145    arguments="EOL"
18146    new_path="$path"
18147
18148  windows_path="$new_path"
18149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18150    unix_path=`$CYGPATH -u "$windows_path"`
18151    new_path="$unix_path"
18152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18154    new_path="$unix_path"
18155  fi
18156
18157
18158    new_path=`$WHICH "$new_path" 2> /dev/null`
18159    # bat and cmd files are not always considered executable in MSYS causing which
18160    # to not find them
18161    if test "x$new_path" = x \
18162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18164      new_path="$path"
18165
18166  windows_path="$new_path"
18167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18168    unix_path=`$CYGPATH -u "$windows_path"`
18169    new_path="$unix_path"
18170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18172    new_path="$unix_path"
18173  fi
18174
18175    fi
18176
18177    if test "x$new_path" = x; then
18178      # It's still not found. Now this is an unrecoverable error.
18179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18181      has_space=`$ECHO "$complete" | $GREP " "`
18182      if test "x$has_space" != x; then
18183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18185      fi
18186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18187    fi
18188  fi
18189
18190  # Now new_path has a complete unix path to the binary
18191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18192    # Keep paths in /bin as-is, but remove trailing .exe if any
18193    new_path="${new_path/%.exe/}"
18194    # Do not save /bin paths to all_fixpath_prefixes!
18195  else
18196    # Not in mixed or Windows style, start by that.
18197    new_path=`cmd //c echo $new_path`
18198
18199  input_path="$new_path"
18200  # Check if we need to convert this using DOS-style short mode. If the path
18201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18202  # take no chances and rewrite it.
18203  # Note: m4 eats our [], so we need to use [ and ] instead.
18204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18205  if test "x$has_forbidden_chars" != x; then
18206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18208  fi
18209
18210    # Output is in $new_path
18211
18212  windows_path="$new_path"
18213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18214    unix_path=`$CYGPATH -u "$windows_path"`
18215    new_path="$unix_path"
18216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18218    new_path="$unix_path"
18219  fi
18220
18221    # remove trailing .exe if any
18222    new_path="${new_path/%.exe/}"
18223
18224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18226  fi
18227
18228    else
18229      # We're on a unix platform. Hooray! :)
18230      # First separate the path from the arguments. This will split at the first
18231      # space.
18232      complete="$FOUND_MAKE"
18233      path="${complete%% *}"
18234      tmp="$complete EOL"
18235      arguments="${tmp#* }"
18236
18237      # Cannot rely on the command "which" here since it doesn't always work.
18238      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18239      if test -z "$is_absolute_path"; then
18240        # Path to executable is not absolute. Find it.
18241        IFS_save="$IFS"
18242        IFS=:
18243        for p in $PATH; do
18244          if test -f "$p/$path" && test -x "$p/$path"; then
18245            new_path="$p/$path"
18246            break
18247          fi
18248        done
18249        IFS="$IFS_save"
18250      else
18251        # This is an absolute path, we can use it without further modifications.
18252        new_path="$path"
18253      fi
18254
18255      if test "x$new_path" = x; then
18256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18258        has_space=`$ECHO "$complete" | $GREP " "`
18259        if test "x$has_space" != x; then
18260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18262        fi
18263        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18264      fi
18265    fi
18266
18267    # Now join together the path and the arguments once again
18268    if test "x$arguments" != xEOL; then
18269      new_complete="$new_path ${arguments% *}"
18270    else
18271      new_complete="$new_path"
18272    fi
18273
18274    if test "x$complete" != "x$new_complete"; then
18275      FOUND_MAKE="$new_complete"
18276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18277$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18278    fi
18279  fi
18280
18281        fi
18282      fi
18283    fi
18284  fi
18285
18286        fi
18287        PATH=$OLD_PATH
18288      fi
18289    fi
18290
18291    if test "x$FOUND_MAKE" = x; then
18292      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
18293    fi
18294
18295  else
18296    # The variable is set, but is it from the command line or the environment?
18297
18298    # Try to remove the string !MAKE! from our list.
18299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18301      # If it failed, the variable was not from the command line. Ignore it,
18302      # but warn the user (except for BASH, which is always set by the calling BASH).
18303      if test "xMAKE" != xBASH; then
18304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18305$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18306      fi
18307      # Try to locate tool using the code snippet
18308
18309    # Try our hardest to locate a correct version of GNU make
18310    for ac_prog in gmake
18311do
18312  # Extract the first word of "$ac_prog", so it can be a program name with args.
18313set dummy $ac_prog; ac_word=$2
18314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18315$as_echo_n "checking for $ac_word... " >&6; }
18316if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18317  $as_echo_n "(cached) " >&6
18318else
18319  case $CHECK_GMAKE in
18320  [\\/]* | ?:[\\/]*)
18321  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18322  ;;
18323  *)
18324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18325for as_dir in $PATH
18326do
18327  IFS=$as_save_IFS
18328  test -z "$as_dir" && as_dir=.
18329    for ac_exec_ext in '' $ac_executable_extensions; do
18330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18331    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18333    break 2
18334  fi
18335done
18336  done
18337IFS=$as_save_IFS
18338
18339  ;;
18340esac
18341fi
18342CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18343if test -n "$CHECK_GMAKE"; then
18344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18345$as_echo "$CHECK_GMAKE" >&6; }
18346else
18347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18348$as_echo "no" >&6; }
18349fi
18350
18351
18352  test -n "$CHECK_GMAKE" && break
18353done
18354
18355
18356  MAKE_CANDIDATE=""$CHECK_GMAKE""
18357  DESCRIPTION="gmake in PATH"
18358
18359  # On Cygwin, we require a newer version of make than on other platforms
18360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18361    MAKE_VERSION_EXPR="-e 4\."
18362    MAKE_REQUIRED_VERSION="4.0"
18363   else
18364    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18365    MAKE_REQUIRED_VERSION="3.81"
18366  fi
18367
18368  if test "x$MAKE_CANDIDATE" != x; then
18369    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18370$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18371    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18372    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18373    if test "x$IS_GNU_MAKE" = x; then
18374      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18375$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18376    else
18377      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18378      if test "x$IS_MODERN_MAKE" = x; then
18379        { $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
18380$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;}
18381      else
18382        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18383          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18384            MAKE_EXPECTED_ENV='cygwin'
18385          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18386            MAKE_EXPECTED_ENV='msys'
18387          else
18388            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18389          fi
18390          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18391          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18392        else
18393          # Not relevant for non-Windows
18394          IS_MAKE_CORRECT_ENV=true
18395        fi
18396        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18397          { $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
18398$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;}
18399        else
18400          FOUND_MAKE=$MAKE_CANDIDATE
18401
18402  # Only process if variable expands to non-empty
18403
18404  if test "x$FOUND_MAKE" != x; then
18405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18406
18407  # First separate the path from the arguments. This will split at the first
18408  # space.
18409  complete="$FOUND_MAKE"
18410  path="${complete%% *}"
18411  tmp="$complete EOL"
18412  arguments="${tmp#* }"
18413
18414  # Input might be given as Windows format, start by converting to
18415  # unix format.
18416  new_path=`$CYGPATH -u "$path"`
18417
18418  # Now try to locate executable using which
18419  new_path=`$WHICH "$new_path" 2> /dev/null`
18420  # bat and cmd files are not always considered executable in cygwin causing which
18421  # to not find them
18422  if test "x$new_path" = x \
18423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18425    new_path=`$CYGPATH -u "$path"`
18426  fi
18427  if test "x$new_path" = x; then
18428    # Oops. Which didn't find the executable.
18429    # The splitting of arguments from the executable at a space might have been incorrect,
18430    # since paths with space are more likely in Windows. Give it another try with the whole
18431    # argument.
18432    path="$complete"
18433    arguments="EOL"
18434    new_path=`$CYGPATH -u "$path"`
18435    new_path=`$WHICH "$new_path" 2> /dev/null`
18436    # bat and cmd files are not always considered executable in cygwin causing which
18437    # to not find them
18438    if test "x$new_path" = x \
18439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18441      new_path=`$CYGPATH -u "$path"`
18442    fi
18443    if test "x$new_path" = x; then
18444      # It's still not found. Now this is an unrecoverable error.
18445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18447      has_space=`$ECHO "$complete" | $GREP " "`
18448      if test "x$has_space" != x; then
18449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18451      fi
18452      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18453    fi
18454  fi
18455
18456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18459  # "foo.exe" is OK but "foo" is an error.
18460  #
18461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18462  # It is also a way to make sure we got the proper file name for the real test later on.
18463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18464  if test "x$test_shortpath" = x; then
18465    # Short path failed, file does not exist as specified.
18466    # Try adding .exe or .cmd
18467    if test -f "${new_path}.exe"; then
18468      input_to_shortpath="${new_path}.exe"
18469    elif test -f "${new_path}.cmd"; then
18470      input_to_shortpath="${new_path}.cmd"
18471    else
18472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18473$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18477    fi
18478  else
18479    input_to_shortpath="$new_path"
18480  fi
18481
18482  # Call helper function which possibly converts this using DOS-style short mode.
18483  # If so, the updated path is stored in $new_path.
18484  new_path="$input_to_shortpath"
18485
18486  input_path="$input_to_shortpath"
18487  # Check if we need to convert this using DOS-style short mode. If the path
18488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18489  # take no chances and rewrite it.
18490  # Note: m4 eats our [], so we need to use [ and ] instead.
18491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18492  if test "x$has_forbidden_chars" != x; then
18493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18497      # Going to short mode and back again did indeed matter. Since short mode is
18498      # case insensitive, let's make it lowercase to improve readability.
18499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18500      # Now convert it back to Unix-style (cygpath)
18501      input_path=`$CYGPATH -u "$shortmode_path"`
18502      new_path="$input_path"
18503    fi
18504  fi
18505
18506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18507  if test "x$test_cygdrive_prefix" = x; then
18508    # As a simple fix, exclude /usr/bin since it's not a real path.
18509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18511      # a path prefixed by /cygdrive for fixpath to work.
18512      new_path="$CYGWIN_ROOT_PATH$input_path"
18513    fi
18514  fi
18515
18516  # remove trailing .exe if any
18517  new_path="${new_path/%.exe/}"
18518
18519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18520
18521  # First separate the path from the arguments. This will split at the first
18522  # space.
18523  complete="$FOUND_MAKE"
18524  path="${complete%% *}"
18525  tmp="$complete EOL"
18526  arguments="${tmp#* }"
18527
18528  # Input might be given as Windows format, start by converting to
18529  # unix format.
18530  new_path="$path"
18531
18532  windows_path="$new_path"
18533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18534    unix_path=`$CYGPATH -u "$windows_path"`
18535    new_path="$unix_path"
18536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18538    new_path="$unix_path"
18539  fi
18540
18541
18542  # Now try to locate executable using which
18543  new_path=`$WHICH "$new_path" 2> /dev/null`
18544
18545  if test "x$new_path" = x; then
18546    # Oops. Which didn't find the executable.
18547    # The splitting of arguments from the executable at a space might have been incorrect,
18548    # since paths with space are more likely in Windows. Give it another try with the whole
18549    # argument.
18550    path="$complete"
18551    arguments="EOL"
18552    new_path="$path"
18553
18554  windows_path="$new_path"
18555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18556    unix_path=`$CYGPATH -u "$windows_path"`
18557    new_path="$unix_path"
18558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18560    new_path="$unix_path"
18561  fi
18562
18563
18564    new_path=`$WHICH "$new_path" 2> /dev/null`
18565    # bat and cmd files are not always considered executable in MSYS causing which
18566    # to not find them
18567    if test "x$new_path" = x \
18568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18570      new_path="$path"
18571
18572  windows_path="$new_path"
18573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18574    unix_path=`$CYGPATH -u "$windows_path"`
18575    new_path="$unix_path"
18576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18578    new_path="$unix_path"
18579  fi
18580
18581    fi
18582
18583    if test "x$new_path" = x; then
18584      # It's still not found. Now this is an unrecoverable error.
18585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18586$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18587      has_space=`$ECHO "$complete" | $GREP " "`
18588      if test "x$has_space" != x; then
18589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18591      fi
18592      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18593    fi
18594  fi
18595
18596  # Now new_path has a complete unix path to the binary
18597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18598    # Keep paths in /bin as-is, but remove trailing .exe if any
18599    new_path="${new_path/%.exe/}"
18600    # Do not save /bin paths to all_fixpath_prefixes!
18601  else
18602    # Not in mixed or Windows style, start by that.
18603    new_path=`cmd //c echo $new_path`
18604
18605  input_path="$new_path"
18606  # Check if we need to convert this using DOS-style short mode. If the path
18607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18608  # take no chances and rewrite it.
18609  # Note: m4 eats our [], so we need to use [ and ] instead.
18610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18611  if test "x$has_forbidden_chars" != x; then
18612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18614  fi
18615
18616    # Output is in $new_path
18617
18618  windows_path="$new_path"
18619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18620    unix_path=`$CYGPATH -u "$windows_path"`
18621    new_path="$unix_path"
18622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18624    new_path="$unix_path"
18625  fi
18626
18627    # remove trailing .exe if any
18628    new_path="${new_path/%.exe/}"
18629
18630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18632  fi
18633
18634    else
18635      # We're on a unix platform. Hooray! :)
18636      # First separate the path from the arguments. This will split at the first
18637      # space.
18638      complete="$FOUND_MAKE"
18639      path="${complete%% *}"
18640      tmp="$complete EOL"
18641      arguments="${tmp#* }"
18642
18643      # Cannot rely on the command "which" here since it doesn't always work.
18644      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18645      if test -z "$is_absolute_path"; then
18646        # Path to executable is not absolute. Find it.
18647        IFS_save="$IFS"
18648        IFS=:
18649        for p in $PATH; do
18650          if test -f "$p/$path" && test -x "$p/$path"; then
18651            new_path="$p/$path"
18652            break
18653          fi
18654        done
18655        IFS="$IFS_save"
18656      else
18657        # This is an absolute path, we can use it without further modifications.
18658        new_path="$path"
18659      fi
18660
18661      if test "x$new_path" = x; then
18662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18664        has_space=`$ECHO "$complete" | $GREP " "`
18665        if test "x$has_space" != x; then
18666          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18668        fi
18669        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18670      fi
18671    fi
18672
18673    # Now join together the path and the arguments once again
18674    if test "x$arguments" != xEOL; then
18675      new_complete="$new_path ${arguments% *}"
18676    else
18677      new_complete="$new_path"
18678    fi
18679
18680    if test "x$complete" != "x$new_complete"; then
18681      FOUND_MAKE="$new_complete"
18682      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18683$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18684    fi
18685  fi
18686
18687        fi
18688      fi
18689    fi
18690  fi
18691
18692
18693    if test "x$FOUND_MAKE" = x; then
18694      for ac_prog in make
18695do
18696  # Extract the first word of "$ac_prog", so it can be a program name with args.
18697set dummy $ac_prog; ac_word=$2
18698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18699$as_echo_n "checking for $ac_word... " >&6; }
18700if ${ac_cv_path_CHECK_MAKE+:} false; then :
18701  $as_echo_n "(cached) " >&6
18702else
18703  case $CHECK_MAKE in
18704  [\\/]* | ?:[\\/]*)
18705  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18706  ;;
18707  *)
18708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18709for as_dir in $PATH
18710do
18711  IFS=$as_save_IFS
18712  test -z "$as_dir" && as_dir=.
18713    for ac_exec_ext in '' $ac_executable_extensions; do
18714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18715    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18717    break 2
18718  fi
18719done
18720  done
18721IFS=$as_save_IFS
18722
18723  ;;
18724esac
18725fi
18726CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18727if test -n "$CHECK_MAKE"; then
18728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18729$as_echo "$CHECK_MAKE" >&6; }
18730else
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732$as_echo "no" >&6; }
18733fi
18734
18735
18736  test -n "$CHECK_MAKE" && break
18737done
18738
18739
18740  MAKE_CANDIDATE=""$CHECK_MAKE""
18741  DESCRIPTION="make in PATH"
18742
18743  # On Cygwin, we require a newer version of make than on other platforms
18744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18745    MAKE_VERSION_EXPR="-e 4\."
18746    MAKE_REQUIRED_VERSION="4.0"
18747   else
18748    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18749    MAKE_REQUIRED_VERSION="3.81"
18750  fi
18751
18752  if test "x$MAKE_CANDIDATE" != x; then
18753    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18754$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18755    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18756    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18757    if test "x$IS_GNU_MAKE" = x; then
18758      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18759$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18760    else
18761      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18762      if test "x$IS_MODERN_MAKE" = x; then
18763        { $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
18764$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;}
18765      else
18766        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18767          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18768            MAKE_EXPECTED_ENV='cygwin'
18769          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18770            MAKE_EXPECTED_ENV='msys'
18771          else
18772            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18773          fi
18774          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18775          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18776        else
18777          # Not relevant for non-Windows
18778          IS_MAKE_CORRECT_ENV=true
18779        fi
18780        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18781          { $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
18782$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;}
18783        else
18784          FOUND_MAKE=$MAKE_CANDIDATE
18785
18786  # Only process if variable expands to non-empty
18787
18788  if test "x$FOUND_MAKE" != x; then
18789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18790
18791  # First separate the path from the arguments. This will split at the first
18792  # space.
18793  complete="$FOUND_MAKE"
18794  path="${complete%% *}"
18795  tmp="$complete EOL"
18796  arguments="${tmp#* }"
18797
18798  # Input might be given as Windows format, start by converting to
18799  # unix format.
18800  new_path=`$CYGPATH -u "$path"`
18801
18802  # Now try to locate executable using which
18803  new_path=`$WHICH "$new_path" 2> /dev/null`
18804  # bat and cmd files are not always considered executable in cygwin causing which
18805  # to not find them
18806  if test "x$new_path" = x \
18807      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18808      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18809    new_path=`$CYGPATH -u "$path"`
18810  fi
18811  if test "x$new_path" = x; then
18812    # Oops. Which didn't find the executable.
18813    # The splitting of arguments from the executable at a space might have been incorrect,
18814    # since paths with space are more likely in Windows. Give it another try with the whole
18815    # argument.
18816    path="$complete"
18817    arguments="EOL"
18818    new_path=`$CYGPATH -u "$path"`
18819    new_path=`$WHICH "$new_path" 2> /dev/null`
18820    # bat and cmd files are not always considered executable in cygwin causing which
18821    # to not find them
18822    if test "x$new_path" = x \
18823        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18824        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18825      new_path=`$CYGPATH -u "$path"`
18826    fi
18827    if test "x$new_path" = x; then
18828      # It's still not found. Now this is an unrecoverable error.
18829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18831      has_space=`$ECHO "$complete" | $GREP " "`
18832      if test "x$has_space" != x; then
18833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18835      fi
18836      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18837    fi
18838  fi
18839
18840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18843  # "foo.exe" is OK but "foo" is an error.
18844  #
18845  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18846  # It is also a way to make sure we got the proper file name for the real test later on.
18847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18848  if test "x$test_shortpath" = x; then
18849    # Short path failed, file does not exist as specified.
18850    # Try adding .exe or .cmd
18851    if test -f "${new_path}.exe"; then
18852      input_to_shortpath="${new_path}.exe"
18853    elif test -f "${new_path}.cmd"; then
18854      input_to_shortpath="${new_path}.cmd"
18855    else
18856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18857$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18858      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18859$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18861    fi
18862  else
18863    input_to_shortpath="$new_path"
18864  fi
18865
18866  # Call helper function which possibly converts this using DOS-style short mode.
18867  # If so, the updated path is stored in $new_path.
18868  new_path="$input_to_shortpath"
18869
18870  input_path="$input_to_shortpath"
18871  # Check if we need to convert this using DOS-style short mode. If the path
18872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18873  # take no chances and rewrite it.
18874  # Note: m4 eats our [], so we need to use [ and ] instead.
18875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18876  if test "x$has_forbidden_chars" != x; then
18877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18881      # Going to short mode and back again did indeed matter. Since short mode is
18882      # case insensitive, let's make it lowercase to improve readability.
18883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18884      # Now convert it back to Unix-style (cygpath)
18885      input_path=`$CYGPATH -u "$shortmode_path"`
18886      new_path="$input_path"
18887    fi
18888  fi
18889
18890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18891  if test "x$test_cygdrive_prefix" = x; then
18892    # As a simple fix, exclude /usr/bin since it's not a real path.
18893    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18895      # a path prefixed by /cygdrive for fixpath to work.
18896      new_path="$CYGWIN_ROOT_PATH$input_path"
18897    fi
18898  fi
18899
18900  # remove trailing .exe if any
18901  new_path="${new_path/%.exe/}"
18902
18903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18904
18905  # First separate the path from the arguments. This will split at the first
18906  # space.
18907  complete="$FOUND_MAKE"
18908  path="${complete%% *}"
18909  tmp="$complete EOL"
18910  arguments="${tmp#* }"
18911
18912  # Input might be given as Windows format, start by converting to
18913  # unix format.
18914  new_path="$path"
18915
18916  windows_path="$new_path"
18917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18918    unix_path=`$CYGPATH -u "$windows_path"`
18919    new_path="$unix_path"
18920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18922    new_path="$unix_path"
18923  fi
18924
18925
18926  # Now try to locate executable using which
18927  new_path=`$WHICH "$new_path" 2> /dev/null`
18928
18929  if test "x$new_path" = x; then
18930    # Oops. Which didn't find the executable.
18931    # The splitting of arguments from the executable at a space might have been incorrect,
18932    # since paths with space are more likely in Windows. Give it another try with the whole
18933    # argument.
18934    path="$complete"
18935    arguments="EOL"
18936    new_path="$path"
18937
18938  windows_path="$new_path"
18939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18940    unix_path=`$CYGPATH -u "$windows_path"`
18941    new_path="$unix_path"
18942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18944    new_path="$unix_path"
18945  fi
18946
18947
18948    new_path=`$WHICH "$new_path" 2> /dev/null`
18949    # bat and cmd files are not always considered executable in MSYS causing which
18950    # to not find them
18951    if test "x$new_path" = x \
18952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18954      new_path="$path"
18955
18956  windows_path="$new_path"
18957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18958    unix_path=`$CYGPATH -u "$windows_path"`
18959    new_path="$unix_path"
18960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18962    new_path="$unix_path"
18963  fi
18964
18965    fi
18966
18967    if test "x$new_path" = x; then
18968      # It's still not found. Now this is an unrecoverable error.
18969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18970$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18971      has_space=`$ECHO "$complete" | $GREP " "`
18972      if test "x$has_space" != x; then
18973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18975      fi
18976      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18977    fi
18978  fi
18979
18980  # Now new_path has a complete unix path to the binary
18981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18982    # Keep paths in /bin as-is, but remove trailing .exe if any
18983    new_path="${new_path/%.exe/}"
18984    # Do not save /bin paths to all_fixpath_prefixes!
18985  else
18986    # Not in mixed or Windows style, start by that.
18987    new_path=`cmd //c echo $new_path`
18988
18989  input_path="$new_path"
18990  # Check if we need to convert this using DOS-style short mode. If the path
18991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18992  # take no chances and rewrite it.
18993  # Note: m4 eats our [], so we need to use [ and ] instead.
18994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18995  if test "x$has_forbidden_chars" != x; then
18996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18998  fi
18999
19000    # Output is in $new_path
19001
19002  windows_path="$new_path"
19003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19004    unix_path=`$CYGPATH -u "$windows_path"`
19005    new_path="$unix_path"
19006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19008    new_path="$unix_path"
19009  fi
19010
19011    # remove trailing .exe if any
19012    new_path="${new_path/%.exe/}"
19013
19014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19016  fi
19017
19018    else
19019      # We're on a unix platform. Hooray! :)
19020      # First separate the path from the arguments. This will split at the first
19021      # space.
19022      complete="$FOUND_MAKE"
19023      path="${complete%% *}"
19024      tmp="$complete EOL"
19025      arguments="${tmp#* }"
19026
19027      # Cannot rely on the command "which" here since it doesn't always work.
19028      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19029      if test -z "$is_absolute_path"; then
19030        # Path to executable is not absolute. Find it.
19031        IFS_save="$IFS"
19032        IFS=:
19033        for p in $PATH; do
19034          if test -f "$p/$path" && test -x "$p/$path"; then
19035            new_path="$p/$path"
19036            break
19037          fi
19038        done
19039        IFS="$IFS_save"
19040      else
19041        # This is an absolute path, we can use it without further modifications.
19042        new_path="$path"
19043      fi
19044
19045      if test "x$new_path" = x; then
19046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19048        has_space=`$ECHO "$complete" | $GREP " "`
19049        if test "x$has_space" != x; then
19050          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19051$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19052        fi
19053        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19054      fi
19055    fi
19056
19057    # Now join together the path and the arguments once again
19058    if test "x$arguments" != xEOL; then
19059      new_complete="$new_path ${arguments% *}"
19060    else
19061      new_complete="$new_path"
19062    fi
19063
19064    if test "x$complete" != "x$new_complete"; then
19065      FOUND_MAKE="$new_complete"
19066      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19067$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19068    fi
19069  fi
19070
19071        fi
19072      fi
19073    fi
19074  fi
19075
19076    fi
19077
19078    if test "x$FOUND_MAKE" = x; then
19079      if test "x$TOOLCHAIN_PATH" != x; then
19080        # We have a toolchain path, check that as well before giving up.
19081        OLD_PATH=$PATH
19082        PATH=$TOOLCHAIN_PATH:$PATH
19083        for ac_prog in gmake
19084do
19085  # Extract the first word of "$ac_prog", so it can be a program name with args.
19086set dummy $ac_prog; ac_word=$2
19087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19088$as_echo_n "checking for $ac_word... " >&6; }
19089if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19090  $as_echo_n "(cached) " >&6
19091else
19092  case $CHECK_TOOLSDIR_GMAKE in
19093  [\\/]* | ?:[\\/]*)
19094  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19095  ;;
19096  *)
19097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19098for as_dir in $PATH
19099do
19100  IFS=$as_save_IFS
19101  test -z "$as_dir" && as_dir=.
19102    for ac_exec_ext in '' $ac_executable_extensions; do
19103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19104    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19106    break 2
19107  fi
19108done
19109  done
19110IFS=$as_save_IFS
19111
19112  ;;
19113esac
19114fi
19115CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19116if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19118$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19119else
19120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19121$as_echo "no" >&6; }
19122fi
19123
19124
19125  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19126done
19127
19128
19129  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19130  DESCRIPTION="gmake in tools-dir"
19131
19132  # On Cygwin, we require a newer version of make than on other platforms
19133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19134    MAKE_VERSION_EXPR="-e 4\."
19135    MAKE_REQUIRED_VERSION="4.0"
19136   else
19137    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19138    MAKE_REQUIRED_VERSION="3.81"
19139  fi
19140
19141  if test "x$MAKE_CANDIDATE" != x; then
19142    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19143$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19144    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19145    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19146    if test "x$IS_GNU_MAKE" = x; then
19147      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19148$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19149    else
19150      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19151      if test "x$IS_MODERN_MAKE" = x; then
19152        { $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
19153$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;}
19154      else
19155        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19156          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19157            MAKE_EXPECTED_ENV='cygwin'
19158          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19159            MAKE_EXPECTED_ENV='msys'
19160          else
19161            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19162          fi
19163          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19164          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19165        else
19166          # Not relevant for non-Windows
19167          IS_MAKE_CORRECT_ENV=true
19168        fi
19169        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19170          { $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
19171$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;}
19172        else
19173          FOUND_MAKE=$MAKE_CANDIDATE
19174
19175  # Only process if variable expands to non-empty
19176
19177  if test "x$FOUND_MAKE" != x; then
19178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19179
19180  # First separate the path from the arguments. This will split at the first
19181  # space.
19182  complete="$FOUND_MAKE"
19183  path="${complete%% *}"
19184  tmp="$complete EOL"
19185  arguments="${tmp#* }"
19186
19187  # Input might be given as Windows format, start by converting to
19188  # unix format.
19189  new_path=`$CYGPATH -u "$path"`
19190
19191  # Now try to locate executable using which
19192  new_path=`$WHICH "$new_path" 2> /dev/null`
19193  # bat and cmd files are not always considered executable in cygwin causing which
19194  # to not find them
19195  if test "x$new_path" = x \
19196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19198    new_path=`$CYGPATH -u "$path"`
19199  fi
19200  if test "x$new_path" = x; then
19201    # Oops. Which didn't find the executable.
19202    # The splitting of arguments from the executable at a space might have been incorrect,
19203    # since paths with space are more likely in Windows. Give it another try with the whole
19204    # argument.
19205    path="$complete"
19206    arguments="EOL"
19207    new_path=`$CYGPATH -u "$path"`
19208    new_path=`$WHICH "$new_path" 2> /dev/null`
19209    # bat and cmd files are not always considered executable in cygwin causing which
19210    # to not find them
19211    if test "x$new_path" = x \
19212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19214      new_path=`$CYGPATH -u "$path"`
19215    fi
19216    if test "x$new_path" = x; then
19217      # It's still not found. Now this is an unrecoverable error.
19218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19219$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19220      has_space=`$ECHO "$complete" | $GREP " "`
19221      if test "x$has_space" != x; then
19222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19224      fi
19225      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19226    fi
19227  fi
19228
19229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19232  # "foo.exe" is OK but "foo" is an error.
19233  #
19234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19235  # It is also a way to make sure we got the proper file name for the real test later on.
19236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19237  if test "x$test_shortpath" = x; then
19238    # Short path failed, file does not exist as specified.
19239    # Try adding .exe or .cmd
19240    if test -f "${new_path}.exe"; then
19241      input_to_shortpath="${new_path}.exe"
19242    elif test -f "${new_path}.cmd"; then
19243      input_to_shortpath="${new_path}.cmd"
19244    else
19245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19249      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19250    fi
19251  else
19252    input_to_shortpath="$new_path"
19253  fi
19254
19255  # Call helper function which possibly converts this using DOS-style short mode.
19256  # If so, the updated path is stored in $new_path.
19257  new_path="$input_to_shortpath"
19258
19259  input_path="$input_to_shortpath"
19260  # Check if we need to convert this using DOS-style short mode. If the path
19261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19262  # take no chances and rewrite it.
19263  # Note: m4 eats our [], so we need to use [ and ] instead.
19264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19265  if test "x$has_forbidden_chars" != x; then
19266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19270      # Going to short mode and back again did indeed matter. Since short mode is
19271      # case insensitive, let's make it lowercase to improve readability.
19272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19273      # Now convert it back to Unix-style (cygpath)
19274      input_path=`$CYGPATH -u "$shortmode_path"`
19275      new_path="$input_path"
19276    fi
19277  fi
19278
19279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19280  if test "x$test_cygdrive_prefix" = x; then
19281    # As a simple fix, exclude /usr/bin since it's not a real path.
19282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19284      # a path prefixed by /cygdrive for fixpath to work.
19285      new_path="$CYGWIN_ROOT_PATH$input_path"
19286    fi
19287  fi
19288
19289  # remove trailing .exe if any
19290  new_path="${new_path/%.exe/}"
19291
19292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19293
19294  # First separate the path from the arguments. This will split at the first
19295  # space.
19296  complete="$FOUND_MAKE"
19297  path="${complete%% *}"
19298  tmp="$complete EOL"
19299  arguments="${tmp#* }"
19300
19301  # Input might be given as Windows format, start by converting to
19302  # unix format.
19303  new_path="$path"
19304
19305  windows_path="$new_path"
19306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19307    unix_path=`$CYGPATH -u "$windows_path"`
19308    new_path="$unix_path"
19309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19311    new_path="$unix_path"
19312  fi
19313
19314
19315  # Now try to locate executable using which
19316  new_path=`$WHICH "$new_path" 2> /dev/null`
19317
19318  if test "x$new_path" = x; then
19319    # Oops. Which didn't find the executable.
19320    # The splitting of arguments from the executable at a space might have been incorrect,
19321    # since paths with space are more likely in Windows. Give it another try with the whole
19322    # argument.
19323    path="$complete"
19324    arguments="EOL"
19325    new_path="$path"
19326
19327  windows_path="$new_path"
19328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19329    unix_path=`$CYGPATH -u "$windows_path"`
19330    new_path="$unix_path"
19331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19333    new_path="$unix_path"
19334  fi
19335
19336
19337    new_path=`$WHICH "$new_path" 2> /dev/null`
19338    # bat and cmd files are not always considered executable in MSYS causing which
19339    # to not find them
19340    if test "x$new_path" = x \
19341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19343      new_path="$path"
19344
19345  windows_path="$new_path"
19346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19347    unix_path=`$CYGPATH -u "$windows_path"`
19348    new_path="$unix_path"
19349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19351    new_path="$unix_path"
19352  fi
19353
19354    fi
19355
19356    if test "x$new_path" = x; then
19357      # It's still not found. Now this is an unrecoverable error.
19358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19360      has_space=`$ECHO "$complete" | $GREP " "`
19361      if test "x$has_space" != x; then
19362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19364      fi
19365      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19366    fi
19367  fi
19368
19369  # Now new_path has a complete unix path to the binary
19370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19371    # Keep paths in /bin as-is, but remove trailing .exe if any
19372    new_path="${new_path/%.exe/}"
19373    # Do not save /bin paths to all_fixpath_prefixes!
19374  else
19375    # Not in mixed or Windows style, start by that.
19376    new_path=`cmd //c echo $new_path`
19377
19378  input_path="$new_path"
19379  # Check if we need to convert this using DOS-style short mode. If the path
19380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19381  # take no chances and rewrite it.
19382  # Note: m4 eats our [], so we need to use [ and ] instead.
19383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19384  if test "x$has_forbidden_chars" != x; then
19385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19387  fi
19388
19389    # Output is in $new_path
19390
19391  windows_path="$new_path"
19392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19393    unix_path=`$CYGPATH -u "$windows_path"`
19394    new_path="$unix_path"
19395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19397    new_path="$unix_path"
19398  fi
19399
19400    # remove trailing .exe if any
19401    new_path="${new_path/%.exe/}"
19402
19403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19405  fi
19406
19407    else
19408      # We're on a unix platform. Hooray! :)
19409      # First separate the path from the arguments. This will split at the first
19410      # space.
19411      complete="$FOUND_MAKE"
19412      path="${complete%% *}"
19413      tmp="$complete EOL"
19414      arguments="${tmp#* }"
19415
19416      # Cannot rely on the command "which" here since it doesn't always work.
19417      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19418      if test -z "$is_absolute_path"; then
19419        # Path to executable is not absolute. Find it.
19420        IFS_save="$IFS"
19421        IFS=:
19422        for p in $PATH; do
19423          if test -f "$p/$path" && test -x "$p/$path"; then
19424            new_path="$p/$path"
19425            break
19426          fi
19427        done
19428        IFS="$IFS_save"
19429      else
19430        # This is an absolute path, we can use it without further modifications.
19431        new_path="$path"
19432      fi
19433
19434      if test "x$new_path" = x; then
19435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19436$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19437        has_space=`$ECHO "$complete" | $GREP " "`
19438        if test "x$has_space" != x; then
19439          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19441        fi
19442        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19443      fi
19444    fi
19445
19446    # Now join together the path and the arguments once again
19447    if test "x$arguments" != xEOL; then
19448      new_complete="$new_path ${arguments% *}"
19449    else
19450      new_complete="$new_path"
19451    fi
19452
19453    if test "x$complete" != "x$new_complete"; then
19454      FOUND_MAKE="$new_complete"
19455      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19456$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19457    fi
19458  fi
19459
19460        fi
19461      fi
19462    fi
19463  fi
19464
19465        if test "x$FOUND_MAKE" = x; then
19466          for ac_prog in make
19467do
19468  # Extract the first word of "$ac_prog", so it can be a program name with args.
19469set dummy $ac_prog; ac_word=$2
19470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19471$as_echo_n "checking for $ac_word... " >&6; }
19472if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19473  $as_echo_n "(cached) " >&6
19474else
19475  case $CHECK_TOOLSDIR_MAKE in
19476  [\\/]* | ?:[\\/]*)
19477  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19478  ;;
19479  *)
19480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19481for as_dir in $PATH
19482do
19483  IFS=$as_save_IFS
19484  test -z "$as_dir" && as_dir=.
19485    for ac_exec_ext in '' $ac_executable_extensions; do
19486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19487    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19489    break 2
19490  fi
19491done
19492  done
19493IFS=$as_save_IFS
19494
19495  ;;
19496esac
19497fi
19498CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19499if test -n "$CHECK_TOOLSDIR_MAKE"; then
19500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19501$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19502else
19503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19504$as_echo "no" >&6; }
19505fi
19506
19507
19508  test -n "$CHECK_TOOLSDIR_MAKE" && break
19509done
19510
19511
19512  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19513  DESCRIPTION="make in tools-dir"
19514
19515  # On Cygwin, we require a newer version of make than on other platforms
19516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19517    MAKE_VERSION_EXPR="-e 4\."
19518    MAKE_REQUIRED_VERSION="4.0"
19519   else
19520    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19521    MAKE_REQUIRED_VERSION="3.81"
19522  fi
19523
19524  if test "x$MAKE_CANDIDATE" != x; then
19525    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19526$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19527    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19528    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19529    if test "x$IS_GNU_MAKE" = x; then
19530      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19531$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19532    else
19533      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19534      if test "x$IS_MODERN_MAKE" = x; then
19535        { $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
19536$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;}
19537      else
19538        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19539          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19540            MAKE_EXPECTED_ENV='cygwin'
19541          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19542            MAKE_EXPECTED_ENV='msys'
19543          else
19544            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19545          fi
19546          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19547          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19548        else
19549          # Not relevant for non-Windows
19550          IS_MAKE_CORRECT_ENV=true
19551        fi
19552        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19553          { $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
19554$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;}
19555        else
19556          FOUND_MAKE=$MAKE_CANDIDATE
19557
19558  # Only process if variable expands to non-empty
19559
19560  if test "x$FOUND_MAKE" != x; then
19561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19562
19563  # First separate the path from the arguments. This will split at the first
19564  # space.
19565  complete="$FOUND_MAKE"
19566  path="${complete%% *}"
19567  tmp="$complete EOL"
19568  arguments="${tmp#* }"
19569
19570  # Input might be given as Windows format, start by converting to
19571  # unix format.
19572  new_path=`$CYGPATH -u "$path"`
19573
19574  # Now try to locate executable using which
19575  new_path=`$WHICH "$new_path" 2> /dev/null`
19576  # bat and cmd files are not always considered executable in cygwin causing which
19577  # to not find them
19578  if test "x$new_path" = x \
19579      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19580      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19581    new_path=`$CYGPATH -u "$path"`
19582  fi
19583  if test "x$new_path" = x; then
19584    # Oops. Which didn't find the executable.
19585    # The splitting of arguments from the executable at a space might have been incorrect,
19586    # since paths with space are more likely in Windows. Give it another try with the whole
19587    # argument.
19588    path="$complete"
19589    arguments="EOL"
19590    new_path=`$CYGPATH -u "$path"`
19591    new_path=`$WHICH "$new_path" 2> /dev/null`
19592    # bat and cmd files are not always considered executable in cygwin causing which
19593    # to not find them
19594    if test "x$new_path" = x \
19595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19597      new_path=`$CYGPATH -u "$path"`
19598    fi
19599    if test "x$new_path" = x; then
19600      # It's still not found. Now this is an unrecoverable error.
19601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19603      has_space=`$ECHO "$complete" | $GREP " "`
19604      if test "x$has_space" != x; then
19605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19607      fi
19608      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19609    fi
19610  fi
19611
19612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19615  # "foo.exe" is OK but "foo" is an error.
19616  #
19617  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19618  # It is also a way to make sure we got the proper file name for the real test later on.
19619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19620  if test "x$test_shortpath" = x; then
19621    # Short path failed, file does not exist as specified.
19622    # Try adding .exe or .cmd
19623    if test -f "${new_path}.exe"; then
19624      input_to_shortpath="${new_path}.exe"
19625    elif test -f "${new_path}.cmd"; then
19626      input_to_shortpath="${new_path}.cmd"
19627    else
19628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19630      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19633    fi
19634  else
19635    input_to_shortpath="$new_path"
19636  fi
19637
19638  # Call helper function which possibly converts this using DOS-style short mode.
19639  # If so, the updated path is stored in $new_path.
19640  new_path="$input_to_shortpath"
19641
19642  input_path="$input_to_shortpath"
19643  # Check if we need to convert this using DOS-style short mode. If the path
19644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19645  # take no chances and rewrite it.
19646  # Note: m4 eats our [], so we need to use [ and ] instead.
19647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19648  if test "x$has_forbidden_chars" != x; then
19649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19653      # Going to short mode and back again did indeed matter. Since short mode is
19654      # case insensitive, let's make it lowercase to improve readability.
19655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19656      # Now convert it back to Unix-style (cygpath)
19657      input_path=`$CYGPATH -u "$shortmode_path"`
19658      new_path="$input_path"
19659    fi
19660  fi
19661
19662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19663  if test "x$test_cygdrive_prefix" = x; then
19664    # As a simple fix, exclude /usr/bin since it's not a real path.
19665    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19667      # a path prefixed by /cygdrive for fixpath to work.
19668      new_path="$CYGWIN_ROOT_PATH$input_path"
19669    fi
19670  fi
19671
19672  # remove trailing .exe if any
19673  new_path="${new_path/%.exe/}"
19674
19675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19676
19677  # First separate the path from the arguments. This will split at the first
19678  # space.
19679  complete="$FOUND_MAKE"
19680  path="${complete%% *}"
19681  tmp="$complete EOL"
19682  arguments="${tmp#* }"
19683
19684  # Input might be given as Windows format, start by converting to
19685  # unix format.
19686  new_path="$path"
19687
19688  windows_path="$new_path"
19689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19690    unix_path=`$CYGPATH -u "$windows_path"`
19691    new_path="$unix_path"
19692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19694    new_path="$unix_path"
19695  fi
19696
19697
19698  # Now try to locate executable using which
19699  new_path=`$WHICH "$new_path" 2> /dev/null`
19700
19701  if test "x$new_path" = x; then
19702    # Oops. Which didn't find the executable.
19703    # The splitting of arguments from the executable at a space might have been incorrect,
19704    # since paths with space are more likely in Windows. Give it another try with the whole
19705    # argument.
19706    path="$complete"
19707    arguments="EOL"
19708    new_path="$path"
19709
19710  windows_path="$new_path"
19711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19712    unix_path=`$CYGPATH -u "$windows_path"`
19713    new_path="$unix_path"
19714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19716    new_path="$unix_path"
19717  fi
19718
19719
19720    new_path=`$WHICH "$new_path" 2> /dev/null`
19721    # bat and cmd files are not always considered executable in MSYS causing which
19722    # to not find them
19723    if test "x$new_path" = x \
19724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19726      new_path="$path"
19727
19728  windows_path="$new_path"
19729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19730    unix_path=`$CYGPATH -u "$windows_path"`
19731    new_path="$unix_path"
19732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19734    new_path="$unix_path"
19735  fi
19736
19737    fi
19738
19739    if test "x$new_path" = x; then
19740      # It's still not found. Now this is an unrecoverable error.
19741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19742$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19743      has_space=`$ECHO "$complete" | $GREP " "`
19744      if test "x$has_space" != x; then
19745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19747      fi
19748      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19749    fi
19750  fi
19751
19752  # Now new_path has a complete unix path to the binary
19753  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19754    # Keep paths in /bin as-is, but remove trailing .exe if any
19755    new_path="${new_path/%.exe/}"
19756    # Do not save /bin paths to all_fixpath_prefixes!
19757  else
19758    # Not in mixed or Windows style, start by that.
19759    new_path=`cmd //c echo $new_path`
19760
19761  input_path="$new_path"
19762  # Check if we need to convert this using DOS-style short mode. If the path
19763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19764  # take no chances and rewrite it.
19765  # Note: m4 eats our [], so we need to use [ and ] instead.
19766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19767  if test "x$has_forbidden_chars" != x; then
19768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19770  fi
19771
19772    # Output is in $new_path
19773
19774  windows_path="$new_path"
19775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19776    unix_path=`$CYGPATH -u "$windows_path"`
19777    new_path="$unix_path"
19778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19780    new_path="$unix_path"
19781  fi
19782
19783    # remove trailing .exe if any
19784    new_path="${new_path/%.exe/}"
19785
19786    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19787    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19788  fi
19789
19790    else
19791      # We're on a unix platform. Hooray! :)
19792      # First separate the path from the arguments. This will split at the first
19793      # space.
19794      complete="$FOUND_MAKE"
19795      path="${complete%% *}"
19796      tmp="$complete EOL"
19797      arguments="${tmp#* }"
19798
19799      # Cannot rely on the command "which" here since it doesn't always work.
19800      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19801      if test -z "$is_absolute_path"; then
19802        # Path to executable is not absolute. Find it.
19803        IFS_save="$IFS"
19804        IFS=:
19805        for p in $PATH; do
19806          if test -f "$p/$path" && test -x "$p/$path"; then
19807            new_path="$p/$path"
19808            break
19809          fi
19810        done
19811        IFS="$IFS_save"
19812      else
19813        # This is an absolute path, we can use it without further modifications.
19814        new_path="$path"
19815      fi
19816
19817      if test "x$new_path" = x; then
19818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19820        has_space=`$ECHO "$complete" | $GREP " "`
19821        if test "x$has_space" != x; then
19822          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19823$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19824        fi
19825        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19826      fi
19827    fi
19828
19829    # Now join together the path and the arguments once again
19830    if test "x$arguments" != xEOL; then
19831      new_complete="$new_path ${arguments% *}"
19832    else
19833      new_complete="$new_path"
19834    fi
19835
19836    if test "x$complete" != "x$new_complete"; then
19837      FOUND_MAKE="$new_complete"
19838      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19839$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19840    fi
19841  fi
19842
19843        fi
19844      fi
19845    fi
19846  fi
19847
19848        fi
19849        PATH=$OLD_PATH
19850      fi
19851    fi
19852
19853    if test "x$FOUND_MAKE" = x; then
19854      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
19855    fi
19856
19857    else
19858      # If it succeeded, then it was overridden by the user. We will use it
19859      # for the tool.
19860
19861      # First remove it from the list of overridden variables, so we can test
19862      # for unknown variables in the end.
19863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19864
19865      # Check if we try to supply an empty value
19866      if test "x$MAKE" = x; then
19867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19868$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19870$as_echo_n "checking for MAKE... " >&6; }
19871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19872$as_echo "disabled" >&6; }
19873      else
19874        # Check if the provided tool contains a complete path.
19875        tool_specified="$MAKE"
19876        tool_basename="${tool_specified##*/}"
19877        if test "x$tool_basename" = "x$tool_specified"; then
19878          # A command without a complete path is provided, search $PATH.
19879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19880$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19881          # Extract the first word of "$tool_basename", so it can be a program name with args.
19882set dummy $tool_basename; ac_word=$2
19883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19884$as_echo_n "checking for $ac_word... " >&6; }
19885if ${ac_cv_path_MAKE+:} false; then :
19886  $as_echo_n "(cached) " >&6
19887else
19888  case $MAKE in
19889  [\\/]* | ?:[\\/]*)
19890  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19891  ;;
19892  *)
19893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19894for as_dir in $PATH
19895do
19896  IFS=$as_save_IFS
19897  test -z "$as_dir" && as_dir=.
19898    for ac_exec_ext in '' $ac_executable_extensions; do
19899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19900    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19902    break 2
19903  fi
19904done
19905  done
19906IFS=$as_save_IFS
19907
19908  ;;
19909esac
19910fi
19911MAKE=$ac_cv_path_MAKE
19912if test -n "$MAKE"; then
19913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19914$as_echo "$MAKE" >&6; }
19915else
19916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19917$as_echo "no" >&6; }
19918fi
19919
19920
19921          if test "x$MAKE" = x; then
19922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19923          fi
19924        else
19925          # Otherwise we believe it is a complete path. Use it as it is.
19926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19927$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19929$as_echo_n "checking for MAKE... " >&6; }
19930          if test ! -x "$tool_specified"; then
19931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19932$as_echo "not found" >&6; }
19933            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19934          fi
19935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19936$as_echo "$tool_specified" >&6; }
19937        fi
19938      fi
19939    fi
19940
19941    # If MAKE was set by user, verify the version
19942
19943  MAKE_CANDIDATE=""$MAKE""
19944  DESCRIPTION="user supplied MAKE=$MAKE"
19945
19946  # On Cygwin, we require a newer version of make than on other platforms
19947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19948    MAKE_VERSION_EXPR="-e 4\."
19949    MAKE_REQUIRED_VERSION="4.0"
19950   else
19951    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19952    MAKE_REQUIRED_VERSION="3.81"
19953  fi
19954
19955  if test "x$MAKE_CANDIDATE" != x; then
19956    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19957$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19958    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19959    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19960    if test "x$IS_GNU_MAKE" = x; then
19961      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19962$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19963    else
19964      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19965      if test "x$IS_MODERN_MAKE" = x; then
19966        { $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
19967$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;}
19968      else
19969        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19970          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19971            MAKE_EXPECTED_ENV='cygwin'
19972          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19973            MAKE_EXPECTED_ENV='msys'
19974          else
19975            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19976          fi
19977          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19978          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19979        else
19980          # Not relevant for non-Windows
19981          IS_MAKE_CORRECT_ENV=true
19982        fi
19983        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19984          { $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
19985$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;}
19986        else
19987          FOUND_MAKE=$MAKE_CANDIDATE
19988
19989  # Only process if variable expands to non-empty
19990
19991  if test "x$FOUND_MAKE" != x; then
19992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19993
19994  # First separate the path from the arguments. This will split at the first
19995  # space.
19996  complete="$FOUND_MAKE"
19997  path="${complete%% *}"
19998  tmp="$complete EOL"
19999  arguments="${tmp#* }"
20000
20001  # Input might be given as Windows format, start by converting to
20002  # unix format.
20003  new_path=`$CYGPATH -u "$path"`
20004
20005  # Now try to locate executable using which
20006  new_path=`$WHICH "$new_path" 2> /dev/null`
20007  # bat and cmd files are not always considered executable in cygwin causing which
20008  # to not find them
20009  if test "x$new_path" = x \
20010      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20011      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20012    new_path=`$CYGPATH -u "$path"`
20013  fi
20014  if test "x$new_path" = x; then
20015    # Oops. Which didn't find the executable.
20016    # The splitting of arguments from the executable at a space might have been incorrect,
20017    # since paths with space are more likely in Windows. Give it another try with the whole
20018    # argument.
20019    path="$complete"
20020    arguments="EOL"
20021    new_path=`$CYGPATH -u "$path"`
20022    new_path=`$WHICH "$new_path" 2> /dev/null`
20023    # bat and cmd files are not always considered executable in cygwin causing which
20024    # to not find them
20025    if test "x$new_path" = x \
20026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20028      new_path=`$CYGPATH -u "$path"`
20029    fi
20030    if test "x$new_path" = x; then
20031      # It's still not found. Now this is an unrecoverable error.
20032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20034      has_space=`$ECHO "$complete" | $GREP " "`
20035      if test "x$has_space" != x; then
20036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20038      fi
20039      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20040    fi
20041  fi
20042
20043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20046  # "foo.exe" is OK but "foo" is an error.
20047  #
20048  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20049  # It is also a way to make sure we got the proper file name for the real test later on.
20050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20051  if test "x$test_shortpath" = x; then
20052    # Short path failed, file does not exist as specified.
20053    # Try adding .exe or .cmd
20054    if test -f "${new_path}.exe"; then
20055      input_to_shortpath="${new_path}.exe"
20056    elif test -f "${new_path}.cmd"; then
20057      input_to_shortpath="${new_path}.cmd"
20058    else
20059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20064    fi
20065  else
20066    input_to_shortpath="$new_path"
20067  fi
20068
20069  # Call helper function which possibly converts this using DOS-style short mode.
20070  # If so, the updated path is stored in $new_path.
20071  new_path="$input_to_shortpath"
20072
20073  input_path="$input_to_shortpath"
20074  # Check if we need to convert this using DOS-style short mode. If the path
20075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20076  # take no chances and rewrite it.
20077  # Note: m4 eats our [], so we need to use [ and ] instead.
20078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20079  if test "x$has_forbidden_chars" != x; then
20080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20084      # Going to short mode and back again did indeed matter. Since short mode is
20085      # case insensitive, let's make it lowercase to improve readability.
20086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20087      # Now convert it back to Unix-style (cygpath)
20088      input_path=`$CYGPATH -u "$shortmode_path"`
20089      new_path="$input_path"
20090    fi
20091  fi
20092
20093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20094  if test "x$test_cygdrive_prefix" = x; then
20095    # As a simple fix, exclude /usr/bin since it's not a real path.
20096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20098      # a path prefixed by /cygdrive for fixpath to work.
20099      new_path="$CYGWIN_ROOT_PATH$input_path"
20100    fi
20101  fi
20102
20103  # remove trailing .exe if any
20104  new_path="${new_path/%.exe/}"
20105
20106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20107
20108  # First separate the path from the arguments. This will split at the first
20109  # space.
20110  complete="$FOUND_MAKE"
20111  path="${complete%% *}"
20112  tmp="$complete EOL"
20113  arguments="${tmp#* }"
20114
20115  # Input might be given as Windows format, start by converting to
20116  # unix format.
20117  new_path="$path"
20118
20119  windows_path="$new_path"
20120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20121    unix_path=`$CYGPATH -u "$windows_path"`
20122    new_path="$unix_path"
20123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20125    new_path="$unix_path"
20126  fi
20127
20128
20129  # Now try to locate executable using which
20130  new_path=`$WHICH "$new_path" 2> /dev/null`
20131
20132  if test "x$new_path" = x; then
20133    # Oops. Which didn't find the executable.
20134    # The splitting of arguments from the executable at a space might have been incorrect,
20135    # since paths with space are more likely in Windows. Give it another try with the whole
20136    # argument.
20137    path="$complete"
20138    arguments="EOL"
20139    new_path="$path"
20140
20141  windows_path="$new_path"
20142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20143    unix_path=`$CYGPATH -u "$windows_path"`
20144    new_path="$unix_path"
20145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20147    new_path="$unix_path"
20148  fi
20149
20150
20151    new_path=`$WHICH "$new_path" 2> /dev/null`
20152    # bat and cmd files are not always considered executable in MSYS causing which
20153    # to not find them
20154    if test "x$new_path" = x \
20155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20157      new_path="$path"
20158
20159  windows_path="$new_path"
20160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20161    unix_path=`$CYGPATH -u "$windows_path"`
20162    new_path="$unix_path"
20163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20165    new_path="$unix_path"
20166  fi
20167
20168    fi
20169
20170    if test "x$new_path" = x; then
20171      # It's still not found. Now this is an unrecoverable error.
20172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20173$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20174      has_space=`$ECHO "$complete" | $GREP " "`
20175      if test "x$has_space" != x; then
20176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20178      fi
20179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20180    fi
20181  fi
20182
20183  # Now new_path has a complete unix path to the binary
20184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20185    # Keep paths in /bin as-is, but remove trailing .exe if any
20186    new_path="${new_path/%.exe/}"
20187    # Do not save /bin paths to all_fixpath_prefixes!
20188  else
20189    # Not in mixed or Windows style, start by that.
20190    new_path=`cmd //c echo $new_path`
20191
20192  input_path="$new_path"
20193  # Check if we need to convert this using DOS-style short mode. If the path
20194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20195  # take no chances and rewrite it.
20196  # Note: m4 eats our [], so we need to use [ and ] instead.
20197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20198  if test "x$has_forbidden_chars" != x; then
20199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20201  fi
20202
20203    # Output is in $new_path
20204
20205  windows_path="$new_path"
20206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20207    unix_path=`$CYGPATH -u "$windows_path"`
20208    new_path="$unix_path"
20209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20211    new_path="$unix_path"
20212  fi
20213
20214    # remove trailing .exe if any
20215    new_path="${new_path/%.exe/}"
20216
20217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20219  fi
20220
20221    else
20222      # We're on a unix platform. Hooray! :)
20223      # First separate the path from the arguments. This will split at the first
20224      # space.
20225      complete="$FOUND_MAKE"
20226      path="${complete%% *}"
20227      tmp="$complete EOL"
20228      arguments="${tmp#* }"
20229
20230      # Cannot rely on the command "which" here since it doesn't always work.
20231      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20232      if test -z "$is_absolute_path"; then
20233        # Path to executable is not absolute. Find it.
20234        IFS_save="$IFS"
20235        IFS=:
20236        for p in $PATH; do
20237          if test -f "$p/$path" && test -x "$p/$path"; then
20238            new_path="$p/$path"
20239            break
20240          fi
20241        done
20242        IFS="$IFS_save"
20243      else
20244        # This is an absolute path, we can use it without further modifications.
20245        new_path="$path"
20246      fi
20247
20248      if test "x$new_path" = x; then
20249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20251        has_space=`$ECHO "$complete" | $GREP " "`
20252        if test "x$has_space" != x; then
20253          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20255        fi
20256        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20257      fi
20258    fi
20259
20260    # Now join together the path and the arguments once again
20261    if test "x$arguments" != xEOL; then
20262      new_complete="$new_path ${arguments% *}"
20263    else
20264      new_complete="$new_path"
20265    fi
20266
20267    if test "x$complete" != "x$new_complete"; then
20268      FOUND_MAKE="$new_complete"
20269      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20270$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20271    fi
20272  fi
20273
20274        fi
20275      fi
20276    fi
20277  fi
20278
20279    if test "x$FOUND_MAKE" = x; then
20280      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20281    fi
20282
20283  fi
20284
20285
20286  MAKE=$FOUND_MAKE
20287
20288  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20289$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20290
20291
20292  # Check if make supports the output sync option and if so, setup using it.
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20294$as_echo_n "checking if make --output-sync is supported... " >&6; }
20295  if $MAKE --version -O > /dev/null 2>&1; then
20296    OUTPUT_SYNC_SUPPORTED=true
20297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20298$as_echo "yes" >&6; }
20299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20300$as_echo_n "checking for output-sync value... " >&6; }
20301
20302# Check whether --with-output-sync was given.
20303if test "${with_output_sync+set}" = set; then :
20304  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20305fi
20306
20307    if test "x$OUTPUT_SYNC" = "x"; then
20308      OUTPUT_SYNC=none
20309    fi
20310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20311$as_echo "$OUTPUT_SYNC" >&6; }
20312    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20313      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20314    fi
20315  else
20316    OUTPUT_SYNC_SUPPORTED=false
20317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20318$as_echo "no" >&6; }
20319  fi
20320
20321
20322
20323
20324
20325
20326  # Test if find supports -delete
20327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20328$as_echo_n "checking if find supports -delete... " >&6; }
20329  FIND_DELETE="-delete"
20330
20331  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20332
20333  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20334
20335  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20336  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20337    # No, it does not.
20338    rm $DELETEDIR/TestIfFindSupportsDelete
20339    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20340      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20341      FIND_DELETE="-print | xargs rm"
20342    else
20343      FIND_DELETE="-exec rm \{\} \+"
20344    fi
20345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20346$as_echo "no" >&6; }
20347  else
20348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20349$as_echo "yes" >&6; }
20350  fi
20351  rmdir $DELETEDIR
20352
20353
20354
20355  # These tools might not be installed by default,
20356  # need hint on how to install them.
20357
20358
20359
20360  # Publish this variable in the help.
20361
20362
20363  if [ -z "${UNZIP+x}" ]; then
20364    # The variable is not set by user, try to locate tool using the code snippet
20365    for ac_prog in unzip
20366do
20367  # Extract the first word of "$ac_prog", so it can be a program name with args.
20368set dummy $ac_prog; ac_word=$2
20369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20370$as_echo_n "checking for $ac_word... " >&6; }
20371if ${ac_cv_path_UNZIP+:} false; then :
20372  $as_echo_n "(cached) " >&6
20373else
20374  case $UNZIP in
20375  [\\/]* | ?:[\\/]*)
20376  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20377  ;;
20378  *)
20379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20380for as_dir in $PATH
20381do
20382  IFS=$as_save_IFS
20383  test -z "$as_dir" && as_dir=.
20384    for ac_exec_ext in '' $ac_executable_extensions; do
20385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20386    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20388    break 2
20389  fi
20390done
20391  done
20392IFS=$as_save_IFS
20393
20394  ;;
20395esac
20396fi
20397UNZIP=$ac_cv_path_UNZIP
20398if test -n "$UNZIP"; then
20399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20400$as_echo "$UNZIP" >&6; }
20401else
20402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20403$as_echo "no" >&6; }
20404fi
20405
20406
20407  test -n "$UNZIP" && break
20408done
20409
20410  else
20411    # The variable is set, but is it from the command line or the environment?
20412
20413    # Try to remove the string !UNZIP! from our list.
20414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20416      # If it failed, the variable was not from the command line. Ignore it,
20417      # but warn the user (except for BASH, which is always set by the calling BASH).
20418      if test "xUNZIP" != xBASH; then
20419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20420$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20421      fi
20422      # Try to locate tool using the code snippet
20423      for ac_prog in unzip
20424do
20425  # Extract the first word of "$ac_prog", so it can be a program name with args.
20426set dummy $ac_prog; ac_word=$2
20427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20428$as_echo_n "checking for $ac_word... " >&6; }
20429if ${ac_cv_path_UNZIP+:} false; then :
20430  $as_echo_n "(cached) " >&6
20431else
20432  case $UNZIP in
20433  [\\/]* | ?:[\\/]*)
20434  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20435  ;;
20436  *)
20437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20438for as_dir in $PATH
20439do
20440  IFS=$as_save_IFS
20441  test -z "$as_dir" && as_dir=.
20442    for ac_exec_ext in '' $ac_executable_extensions; do
20443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20444    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20446    break 2
20447  fi
20448done
20449  done
20450IFS=$as_save_IFS
20451
20452  ;;
20453esac
20454fi
20455UNZIP=$ac_cv_path_UNZIP
20456if test -n "$UNZIP"; then
20457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20458$as_echo "$UNZIP" >&6; }
20459else
20460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20461$as_echo "no" >&6; }
20462fi
20463
20464
20465  test -n "$UNZIP" && break
20466done
20467
20468    else
20469      # If it succeeded, then it was overridden by the user. We will use it
20470      # for the tool.
20471
20472      # First remove it from the list of overridden variables, so we can test
20473      # for unknown variables in the end.
20474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20475
20476      # Check if we try to supply an empty value
20477      if test "x$UNZIP" = x; then
20478        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20479$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20481$as_echo_n "checking for UNZIP... " >&6; }
20482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20483$as_echo "disabled" >&6; }
20484      else
20485        # Check if the provided tool contains a complete path.
20486        tool_specified="$UNZIP"
20487        tool_basename="${tool_specified##*/}"
20488        if test "x$tool_basename" = "x$tool_specified"; then
20489          # A command without a complete path is provided, search $PATH.
20490          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20491$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20492          # Extract the first word of "$tool_basename", so it can be a program name with args.
20493set dummy $tool_basename; ac_word=$2
20494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20495$as_echo_n "checking for $ac_word... " >&6; }
20496if ${ac_cv_path_UNZIP+:} false; then :
20497  $as_echo_n "(cached) " >&6
20498else
20499  case $UNZIP in
20500  [\\/]* | ?:[\\/]*)
20501  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20502  ;;
20503  *)
20504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20505for as_dir in $PATH
20506do
20507  IFS=$as_save_IFS
20508  test -z "$as_dir" && as_dir=.
20509    for ac_exec_ext in '' $ac_executable_extensions; do
20510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20511    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20513    break 2
20514  fi
20515done
20516  done
20517IFS=$as_save_IFS
20518
20519  ;;
20520esac
20521fi
20522UNZIP=$ac_cv_path_UNZIP
20523if test -n "$UNZIP"; then
20524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20525$as_echo "$UNZIP" >&6; }
20526else
20527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20528$as_echo "no" >&6; }
20529fi
20530
20531
20532          if test "x$UNZIP" = x; then
20533            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20534          fi
20535        else
20536          # Otherwise we believe it is a complete path. Use it as it is.
20537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20538$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20539          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20540$as_echo_n "checking for UNZIP... " >&6; }
20541          if test ! -x "$tool_specified"; then
20542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20543$as_echo "not found" >&6; }
20544            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20545          fi
20546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20547$as_echo "$tool_specified" >&6; }
20548        fi
20549      fi
20550    fi
20551
20552  fi
20553
20554
20555
20556  if test "x$UNZIP" = x; then
20557    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20558  fi
20559
20560
20561
20562
20563
20564  # Publish this variable in the help.
20565
20566
20567  if [ -z "${ZIP+x}" ]; then
20568    # The variable is not set by user, try to locate tool using the code snippet
20569    for ac_prog in zip
20570do
20571  # Extract the first word of "$ac_prog", so it can be a program name with args.
20572set dummy $ac_prog; ac_word=$2
20573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20574$as_echo_n "checking for $ac_word... " >&6; }
20575if ${ac_cv_path_ZIP+:} false; then :
20576  $as_echo_n "(cached) " >&6
20577else
20578  case $ZIP in
20579  [\\/]* | ?:[\\/]*)
20580  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20581  ;;
20582  *)
20583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20584for as_dir in $PATH
20585do
20586  IFS=$as_save_IFS
20587  test -z "$as_dir" && as_dir=.
20588    for ac_exec_ext in '' $ac_executable_extensions; do
20589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20590    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20592    break 2
20593  fi
20594done
20595  done
20596IFS=$as_save_IFS
20597
20598  ;;
20599esac
20600fi
20601ZIP=$ac_cv_path_ZIP
20602if test -n "$ZIP"; then
20603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20604$as_echo "$ZIP" >&6; }
20605else
20606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20607$as_echo "no" >&6; }
20608fi
20609
20610
20611  test -n "$ZIP" && break
20612done
20613
20614  else
20615    # The variable is set, but is it from the command line or the environment?
20616
20617    # Try to remove the string !ZIP! from our list.
20618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20620      # If it failed, the variable was not from the command line. Ignore it,
20621      # but warn the user (except for BASH, which is always set by the calling BASH).
20622      if test "xZIP" != xBASH; then
20623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20624$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20625      fi
20626      # Try to locate tool using the code snippet
20627      for ac_prog in zip
20628do
20629  # Extract the first word of "$ac_prog", so it can be a program name with args.
20630set dummy $ac_prog; ac_word=$2
20631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20632$as_echo_n "checking for $ac_word... " >&6; }
20633if ${ac_cv_path_ZIP+:} false; then :
20634  $as_echo_n "(cached) " >&6
20635else
20636  case $ZIP in
20637  [\\/]* | ?:[\\/]*)
20638  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20639  ;;
20640  *)
20641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20642for as_dir in $PATH
20643do
20644  IFS=$as_save_IFS
20645  test -z "$as_dir" && as_dir=.
20646    for ac_exec_ext in '' $ac_executable_extensions; do
20647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20648    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20650    break 2
20651  fi
20652done
20653  done
20654IFS=$as_save_IFS
20655
20656  ;;
20657esac
20658fi
20659ZIP=$ac_cv_path_ZIP
20660if test -n "$ZIP"; then
20661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20662$as_echo "$ZIP" >&6; }
20663else
20664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20665$as_echo "no" >&6; }
20666fi
20667
20668
20669  test -n "$ZIP" && break
20670done
20671
20672    else
20673      # If it succeeded, then it was overridden by the user. We will use it
20674      # for the tool.
20675
20676      # First remove it from the list of overridden variables, so we can test
20677      # for unknown variables in the end.
20678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20679
20680      # Check if we try to supply an empty value
20681      if test "x$ZIP" = x; then
20682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20683$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20685$as_echo_n "checking for ZIP... " >&6; }
20686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20687$as_echo "disabled" >&6; }
20688      else
20689        # Check if the provided tool contains a complete path.
20690        tool_specified="$ZIP"
20691        tool_basename="${tool_specified##*/}"
20692        if test "x$tool_basename" = "x$tool_specified"; then
20693          # A command without a complete path is provided, search $PATH.
20694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20695$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20696          # Extract the first word of "$tool_basename", so it can be a program name with args.
20697set dummy $tool_basename; ac_word=$2
20698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20699$as_echo_n "checking for $ac_word... " >&6; }
20700if ${ac_cv_path_ZIP+:} false; then :
20701  $as_echo_n "(cached) " >&6
20702else
20703  case $ZIP in
20704  [\\/]* | ?:[\\/]*)
20705  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20706  ;;
20707  *)
20708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20709for as_dir in $PATH
20710do
20711  IFS=$as_save_IFS
20712  test -z "$as_dir" && as_dir=.
20713    for ac_exec_ext in '' $ac_executable_extensions; do
20714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20715    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20717    break 2
20718  fi
20719done
20720  done
20721IFS=$as_save_IFS
20722
20723  ;;
20724esac
20725fi
20726ZIP=$ac_cv_path_ZIP
20727if test -n "$ZIP"; then
20728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20729$as_echo "$ZIP" >&6; }
20730else
20731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20732$as_echo "no" >&6; }
20733fi
20734
20735
20736          if test "x$ZIP" = x; then
20737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20738          fi
20739        else
20740          # Otherwise we believe it is a complete path. Use it as it is.
20741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20742$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20744$as_echo_n "checking for ZIP... " >&6; }
20745          if test ! -x "$tool_specified"; then
20746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20747$as_echo "not found" >&6; }
20748            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20749          fi
20750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20751$as_echo "$tool_specified" >&6; }
20752        fi
20753      fi
20754    fi
20755
20756  fi
20757
20758
20759
20760  if test "x$ZIP" = x; then
20761    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20762  fi
20763
20764
20765
20766  # Non-required basic tools
20767
20768
20769
20770  # Publish this variable in the help.
20771
20772
20773  if [ -z "${LDD+x}" ]; then
20774    # The variable is not set by user, try to locate tool using the code snippet
20775    for ac_prog in ldd
20776do
20777  # Extract the first word of "$ac_prog", so it can be a program name with args.
20778set dummy $ac_prog; ac_word=$2
20779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20780$as_echo_n "checking for $ac_word... " >&6; }
20781if ${ac_cv_path_LDD+:} false; then :
20782  $as_echo_n "(cached) " >&6
20783else
20784  case $LDD in
20785  [\\/]* | ?:[\\/]*)
20786  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20787  ;;
20788  *)
20789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20790for as_dir in $PATH
20791do
20792  IFS=$as_save_IFS
20793  test -z "$as_dir" && as_dir=.
20794    for ac_exec_ext in '' $ac_executable_extensions; do
20795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20796    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20798    break 2
20799  fi
20800done
20801  done
20802IFS=$as_save_IFS
20803
20804  ;;
20805esac
20806fi
20807LDD=$ac_cv_path_LDD
20808if test -n "$LDD"; then
20809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20810$as_echo "$LDD" >&6; }
20811else
20812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20813$as_echo "no" >&6; }
20814fi
20815
20816
20817  test -n "$LDD" && break
20818done
20819
20820  else
20821    # The variable is set, but is it from the command line or the environment?
20822
20823    # Try to remove the string !LDD! from our list.
20824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20826      # If it failed, the variable was not from the command line. Ignore it,
20827      # but warn the user (except for BASH, which is always set by the calling BASH).
20828      if test "xLDD" != xBASH; then
20829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20830$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20831      fi
20832      # Try to locate tool using the code snippet
20833      for ac_prog in ldd
20834do
20835  # Extract the first word of "$ac_prog", so it can be a program name with args.
20836set dummy $ac_prog; ac_word=$2
20837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20838$as_echo_n "checking for $ac_word... " >&6; }
20839if ${ac_cv_path_LDD+:} false; then :
20840  $as_echo_n "(cached) " >&6
20841else
20842  case $LDD in
20843  [\\/]* | ?:[\\/]*)
20844  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20845  ;;
20846  *)
20847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20848for as_dir in $PATH
20849do
20850  IFS=$as_save_IFS
20851  test -z "$as_dir" && as_dir=.
20852    for ac_exec_ext in '' $ac_executable_extensions; do
20853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20854    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20856    break 2
20857  fi
20858done
20859  done
20860IFS=$as_save_IFS
20861
20862  ;;
20863esac
20864fi
20865LDD=$ac_cv_path_LDD
20866if test -n "$LDD"; then
20867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20868$as_echo "$LDD" >&6; }
20869else
20870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20871$as_echo "no" >&6; }
20872fi
20873
20874
20875  test -n "$LDD" && break
20876done
20877
20878    else
20879      # If it succeeded, then it was overridden by the user. We will use it
20880      # for the tool.
20881
20882      # First remove it from the list of overridden variables, so we can test
20883      # for unknown variables in the end.
20884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20885
20886      # Check if we try to supply an empty value
20887      if test "x$LDD" = x; then
20888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20889$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20891$as_echo_n "checking for LDD... " >&6; }
20892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20893$as_echo "disabled" >&6; }
20894      else
20895        # Check if the provided tool contains a complete path.
20896        tool_specified="$LDD"
20897        tool_basename="${tool_specified##*/}"
20898        if test "x$tool_basename" = "x$tool_specified"; then
20899          # A command without a complete path is provided, search $PATH.
20900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20901$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20902          # Extract the first word of "$tool_basename", so it can be a program name with args.
20903set dummy $tool_basename; ac_word=$2
20904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20905$as_echo_n "checking for $ac_word... " >&6; }
20906if ${ac_cv_path_LDD+:} false; then :
20907  $as_echo_n "(cached) " >&6
20908else
20909  case $LDD in
20910  [\\/]* | ?:[\\/]*)
20911  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20912  ;;
20913  *)
20914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20915for as_dir in $PATH
20916do
20917  IFS=$as_save_IFS
20918  test -z "$as_dir" && as_dir=.
20919    for ac_exec_ext in '' $ac_executable_extensions; do
20920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20921    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20923    break 2
20924  fi
20925done
20926  done
20927IFS=$as_save_IFS
20928
20929  ;;
20930esac
20931fi
20932LDD=$ac_cv_path_LDD
20933if test -n "$LDD"; then
20934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20935$as_echo "$LDD" >&6; }
20936else
20937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20938$as_echo "no" >&6; }
20939fi
20940
20941
20942          if test "x$LDD" = x; then
20943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20944          fi
20945        else
20946          # Otherwise we believe it is a complete path. Use it as it is.
20947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20948$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20950$as_echo_n "checking for LDD... " >&6; }
20951          if test ! -x "$tool_specified"; then
20952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20953$as_echo "not found" >&6; }
20954            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20955          fi
20956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20957$as_echo "$tool_specified" >&6; }
20958        fi
20959      fi
20960    fi
20961
20962  fi
20963
20964
20965  if test "x$LDD" = "x"; then
20966    # List shared lib dependencies is used for
20967    # debug output and checking for forbidden dependencies.
20968    # We can build without it.
20969    LDD="true"
20970  fi
20971
20972
20973  # Publish this variable in the help.
20974
20975
20976  if [ -z "${OTOOL+x}" ]; then
20977    # The variable is not set by user, try to locate tool using the code snippet
20978    for ac_prog in otool
20979do
20980  # Extract the first word of "$ac_prog", so it can be a program name with args.
20981set dummy $ac_prog; ac_word=$2
20982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20983$as_echo_n "checking for $ac_word... " >&6; }
20984if ${ac_cv_path_OTOOL+:} false; then :
20985  $as_echo_n "(cached) " >&6
20986else
20987  case $OTOOL in
20988  [\\/]* | ?:[\\/]*)
20989  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20990  ;;
20991  *)
20992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20993for as_dir in $PATH
20994do
20995  IFS=$as_save_IFS
20996  test -z "$as_dir" && as_dir=.
20997    for ac_exec_ext in '' $ac_executable_extensions; do
20998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20999    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21001    break 2
21002  fi
21003done
21004  done
21005IFS=$as_save_IFS
21006
21007  ;;
21008esac
21009fi
21010OTOOL=$ac_cv_path_OTOOL
21011if test -n "$OTOOL"; then
21012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21013$as_echo "$OTOOL" >&6; }
21014else
21015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21016$as_echo "no" >&6; }
21017fi
21018
21019
21020  test -n "$OTOOL" && break
21021done
21022
21023  else
21024    # The variable is set, but is it from the command line or the environment?
21025
21026    # Try to remove the string !OTOOL! from our list.
21027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21029      # If it failed, the variable was not from the command line. Ignore it,
21030      # but warn the user (except for BASH, which is always set by the calling BASH).
21031      if test "xOTOOL" != xBASH; then
21032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21033$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21034      fi
21035      # Try to locate tool using the code snippet
21036      for ac_prog in otool
21037do
21038  # Extract the first word of "$ac_prog", so it can be a program name with args.
21039set dummy $ac_prog; ac_word=$2
21040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21041$as_echo_n "checking for $ac_word... " >&6; }
21042if ${ac_cv_path_OTOOL+:} false; then :
21043  $as_echo_n "(cached) " >&6
21044else
21045  case $OTOOL in
21046  [\\/]* | ?:[\\/]*)
21047  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21048  ;;
21049  *)
21050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21051for as_dir in $PATH
21052do
21053  IFS=$as_save_IFS
21054  test -z "$as_dir" && as_dir=.
21055    for ac_exec_ext in '' $ac_executable_extensions; do
21056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21057    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21059    break 2
21060  fi
21061done
21062  done
21063IFS=$as_save_IFS
21064
21065  ;;
21066esac
21067fi
21068OTOOL=$ac_cv_path_OTOOL
21069if test -n "$OTOOL"; then
21070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21071$as_echo "$OTOOL" >&6; }
21072else
21073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21074$as_echo "no" >&6; }
21075fi
21076
21077
21078  test -n "$OTOOL" && break
21079done
21080
21081    else
21082      # If it succeeded, then it was overridden by the user. We will use it
21083      # for the tool.
21084
21085      # First remove it from the list of overridden variables, so we can test
21086      # for unknown variables in the end.
21087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21088
21089      # Check if we try to supply an empty value
21090      if test "x$OTOOL" = x; then
21091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21092$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21094$as_echo_n "checking for OTOOL... " >&6; }
21095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21096$as_echo "disabled" >&6; }
21097      else
21098        # Check if the provided tool contains a complete path.
21099        tool_specified="$OTOOL"
21100        tool_basename="${tool_specified##*/}"
21101        if test "x$tool_basename" = "x$tool_specified"; then
21102          # A command without a complete path is provided, search $PATH.
21103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21104$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21105          # Extract the first word of "$tool_basename", so it can be a program name with args.
21106set dummy $tool_basename; ac_word=$2
21107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21108$as_echo_n "checking for $ac_word... " >&6; }
21109if ${ac_cv_path_OTOOL+:} false; then :
21110  $as_echo_n "(cached) " >&6
21111else
21112  case $OTOOL in
21113  [\\/]* | ?:[\\/]*)
21114  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21115  ;;
21116  *)
21117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21118for as_dir in $PATH
21119do
21120  IFS=$as_save_IFS
21121  test -z "$as_dir" && as_dir=.
21122    for ac_exec_ext in '' $ac_executable_extensions; do
21123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21124    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21126    break 2
21127  fi
21128done
21129  done
21130IFS=$as_save_IFS
21131
21132  ;;
21133esac
21134fi
21135OTOOL=$ac_cv_path_OTOOL
21136if test -n "$OTOOL"; then
21137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21138$as_echo "$OTOOL" >&6; }
21139else
21140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21141$as_echo "no" >&6; }
21142fi
21143
21144
21145          if test "x$OTOOL" = x; then
21146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21147          fi
21148        else
21149          # Otherwise we believe it is a complete path. Use it as it is.
21150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21151$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21153$as_echo_n "checking for OTOOL... " >&6; }
21154          if test ! -x "$tool_specified"; then
21155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21156$as_echo "not found" >&6; }
21157            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21158          fi
21159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21160$as_echo "$tool_specified" >&6; }
21161        fi
21162      fi
21163    fi
21164
21165  fi
21166
21167
21168  if test "x$OTOOL" = "x"; then
21169    OTOOL="true"
21170  fi
21171
21172
21173  # Publish this variable in the help.
21174
21175
21176  if [ -z "${READELF+x}" ]; then
21177    # The variable is not set by user, try to locate tool using the code snippet
21178    for ac_prog in greadelf readelf
21179do
21180  # Extract the first word of "$ac_prog", so it can be a program name with args.
21181set dummy $ac_prog; ac_word=$2
21182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21183$as_echo_n "checking for $ac_word... " >&6; }
21184if ${ac_cv_path_READELF+:} false; then :
21185  $as_echo_n "(cached) " >&6
21186else
21187  case $READELF in
21188  [\\/]* | ?:[\\/]*)
21189  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21190  ;;
21191  *)
21192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21193for as_dir in $PATH
21194do
21195  IFS=$as_save_IFS
21196  test -z "$as_dir" && as_dir=.
21197    for ac_exec_ext in '' $ac_executable_extensions; do
21198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21199    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21201    break 2
21202  fi
21203done
21204  done
21205IFS=$as_save_IFS
21206
21207  ;;
21208esac
21209fi
21210READELF=$ac_cv_path_READELF
21211if test -n "$READELF"; then
21212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21213$as_echo "$READELF" >&6; }
21214else
21215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21216$as_echo "no" >&6; }
21217fi
21218
21219
21220  test -n "$READELF" && break
21221done
21222
21223  else
21224    # The variable is set, but is it from the command line or the environment?
21225
21226    # Try to remove the string !READELF! from our list.
21227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21229      # If it failed, the variable was not from the command line. Ignore it,
21230      # but warn the user (except for BASH, which is always set by the calling BASH).
21231      if test "xREADELF" != xBASH; then
21232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21233$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21234      fi
21235      # Try to locate tool using the code snippet
21236      for ac_prog in greadelf readelf
21237do
21238  # Extract the first word of "$ac_prog", so it can be a program name with args.
21239set dummy $ac_prog; ac_word=$2
21240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21241$as_echo_n "checking for $ac_word... " >&6; }
21242if ${ac_cv_path_READELF+:} false; then :
21243  $as_echo_n "(cached) " >&6
21244else
21245  case $READELF in
21246  [\\/]* | ?:[\\/]*)
21247  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21248  ;;
21249  *)
21250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21251for as_dir in $PATH
21252do
21253  IFS=$as_save_IFS
21254  test -z "$as_dir" && as_dir=.
21255    for ac_exec_ext in '' $ac_executable_extensions; do
21256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21257    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21259    break 2
21260  fi
21261done
21262  done
21263IFS=$as_save_IFS
21264
21265  ;;
21266esac
21267fi
21268READELF=$ac_cv_path_READELF
21269if test -n "$READELF"; then
21270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21271$as_echo "$READELF" >&6; }
21272else
21273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21274$as_echo "no" >&6; }
21275fi
21276
21277
21278  test -n "$READELF" && break
21279done
21280
21281    else
21282      # If it succeeded, then it was overridden by the user. We will use it
21283      # for the tool.
21284
21285      # First remove it from the list of overridden variables, so we can test
21286      # for unknown variables in the end.
21287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21288
21289      # Check if we try to supply an empty value
21290      if test "x$READELF" = x; then
21291        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21292$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21294$as_echo_n "checking for READELF... " >&6; }
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21296$as_echo "disabled" >&6; }
21297      else
21298        # Check if the provided tool contains a complete path.
21299        tool_specified="$READELF"
21300        tool_basename="${tool_specified##*/}"
21301        if test "x$tool_basename" = "x$tool_specified"; then
21302          # A command without a complete path is provided, search $PATH.
21303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21304$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21305          # Extract the first word of "$tool_basename", so it can be a program name with args.
21306set dummy $tool_basename; ac_word=$2
21307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21308$as_echo_n "checking for $ac_word... " >&6; }
21309if ${ac_cv_path_READELF+:} false; then :
21310  $as_echo_n "(cached) " >&6
21311else
21312  case $READELF in
21313  [\\/]* | ?:[\\/]*)
21314  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21315  ;;
21316  *)
21317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21318for as_dir in $PATH
21319do
21320  IFS=$as_save_IFS
21321  test -z "$as_dir" && as_dir=.
21322    for ac_exec_ext in '' $ac_executable_extensions; do
21323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21324    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21326    break 2
21327  fi
21328done
21329  done
21330IFS=$as_save_IFS
21331
21332  ;;
21333esac
21334fi
21335READELF=$ac_cv_path_READELF
21336if test -n "$READELF"; then
21337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21338$as_echo "$READELF" >&6; }
21339else
21340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21341$as_echo "no" >&6; }
21342fi
21343
21344
21345          if test "x$READELF" = x; then
21346            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21347          fi
21348        else
21349          # Otherwise we believe it is a complete path. Use it as it is.
21350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21351$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21353$as_echo_n "checking for READELF... " >&6; }
21354          if test ! -x "$tool_specified"; then
21355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21356$as_echo "not found" >&6; }
21357            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21358          fi
21359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21360$as_echo "$tool_specified" >&6; }
21361        fi
21362      fi
21363    fi
21364
21365  fi
21366
21367
21368
21369
21370  # Publish this variable in the help.
21371
21372
21373  if [ -z "${HG+x}" ]; then
21374    # The variable is not set by user, try to locate tool using the code snippet
21375    for ac_prog in hg
21376do
21377  # Extract the first word of "$ac_prog", so it can be a program name with args.
21378set dummy $ac_prog; ac_word=$2
21379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21380$as_echo_n "checking for $ac_word... " >&6; }
21381if ${ac_cv_path_HG+:} false; then :
21382  $as_echo_n "(cached) " >&6
21383else
21384  case $HG in
21385  [\\/]* | ?:[\\/]*)
21386  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21387  ;;
21388  *)
21389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21390for as_dir in $PATH
21391do
21392  IFS=$as_save_IFS
21393  test -z "$as_dir" && as_dir=.
21394    for ac_exec_ext in '' $ac_executable_extensions; do
21395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21396    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21398    break 2
21399  fi
21400done
21401  done
21402IFS=$as_save_IFS
21403
21404  ;;
21405esac
21406fi
21407HG=$ac_cv_path_HG
21408if test -n "$HG"; then
21409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21410$as_echo "$HG" >&6; }
21411else
21412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21413$as_echo "no" >&6; }
21414fi
21415
21416
21417  test -n "$HG" && break
21418done
21419
21420  else
21421    # The variable is set, but is it from the command line or the environment?
21422
21423    # Try to remove the string !HG! from our list.
21424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21426      # If it failed, the variable was not from the command line. Ignore it,
21427      # but warn the user (except for BASH, which is always set by the calling BASH).
21428      if test "xHG" != xBASH; then
21429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21430$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21431      fi
21432      # Try to locate tool using the code snippet
21433      for ac_prog in hg
21434do
21435  # Extract the first word of "$ac_prog", so it can be a program name with args.
21436set dummy $ac_prog; ac_word=$2
21437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21438$as_echo_n "checking for $ac_word... " >&6; }
21439if ${ac_cv_path_HG+:} false; then :
21440  $as_echo_n "(cached) " >&6
21441else
21442  case $HG in
21443  [\\/]* | ?:[\\/]*)
21444  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21445  ;;
21446  *)
21447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21448for as_dir in $PATH
21449do
21450  IFS=$as_save_IFS
21451  test -z "$as_dir" && as_dir=.
21452    for ac_exec_ext in '' $ac_executable_extensions; do
21453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21454    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21456    break 2
21457  fi
21458done
21459  done
21460IFS=$as_save_IFS
21461
21462  ;;
21463esac
21464fi
21465HG=$ac_cv_path_HG
21466if test -n "$HG"; then
21467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21468$as_echo "$HG" >&6; }
21469else
21470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21471$as_echo "no" >&6; }
21472fi
21473
21474
21475  test -n "$HG" && break
21476done
21477
21478    else
21479      # If it succeeded, then it was overridden by the user. We will use it
21480      # for the tool.
21481
21482      # First remove it from the list of overridden variables, so we can test
21483      # for unknown variables in the end.
21484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21485
21486      # Check if we try to supply an empty value
21487      if test "x$HG" = x; then
21488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21489$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21491$as_echo_n "checking for HG... " >&6; }
21492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21493$as_echo "disabled" >&6; }
21494      else
21495        # Check if the provided tool contains a complete path.
21496        tool_specified="$HG"
21497        tool_basename="${tool_specified##*/}"
21498        if test "x$tool_basename" = "x$tool_specified"; then
21499          # A command without a complete path is provided, search $PATH.
21500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21501$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21502          # Extract the first word of "$tool_basename", so it can be a program name with args.
21503set dummy $tool_basename; ac_word=$2
21504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21505$as_echo_n "checking for $ac_word... " >&6; }
21506if ${ac_cv_path_HG+:} false; then :
21507  $as_echo_n "(cached) " >&6
21508else
21509  case $HG in
21510  [\\/]* | ?:[\\/]*)
21511  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21512  ;;
21513  *)
21514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21515for as_dir in $PATH
21516do
21517  IFS=$as_save_IFS
21518  test -z "$as_dir" && as_dir=.
21519    for ac_exec_ext in '' $ac_executable_extensions; do
21520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21521    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21523    break 2
21524  fi
21525done
21526  done
21527IFS=$as_save_IFS
21528
21529  ;;
21530esac
21531fi
21532HG=$ac_cv_path_HG
21533if test -n "$HG"; then
21534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21535$as_echo "$HG" >&6; }
21536else
21537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21538$as_echo "no" >&6; }
21539fi
21540
21541
21542          if test "x$HG" = x; then
21543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21544          fi
21545        else
21546          # Otherwise we believe it is a complete path. Use it as it is.
21547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21548$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21550$as_echo_n "checking for HG... " >&6; }
21551          if test ! -x "$tool_specified"; then
21552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21553$as_echo "not found" >&6; }
21554            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21555          fi
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21557$as_echo "$tool_specified" >&6; }
21558        fi
21559      fi
21560    fi
21561
21562  fi
21563
21564
21565
21566
21567  # Publish this variable in the help.
21568
21569
21570  if [ -z "${STAT+x}" ]; then
21571    # The variable is not set by user, try to locate tool using the code snippet
21572    for ac_prog in stat
21573do
21574  # Extract the first word of "$ac_prog", so it can be a program name with args.
21575set dummy $ac_prog; ac_word=$2
21576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21577$as_echo_n "checking for $ac_word... " >&6; }
21578if ${ac_cv_path_STAT+:} false; then :
21579  $as_echo_n "(cached) " >&6
21580else
21581  case $STAT in
21582  [\\/]* | ?:[\\/]*)
21583  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21584  ;;
21585  *)
21586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21587for as_dir in $PATH
21588do
21589  IFS=$as_save_IFS
21590  test -z "$as_dir" && as_dir=.
21591    for ac_exec_ext in '' $ac_executable_extensions; do
21592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21593    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21595    break 2
21596  fi
21597done
21598  done
21599IFS=$as_save_IFS
21600
21601  ;;
21602esac
21603fi
21604STAT=$ac_cv_path_STAT
21605if test -n "$STAT"; then
21606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21607$as_echo "$STAT" >&6; }
21608else
21609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21610$as_echo "no" >&6; }
21611fi
21612
21613
21614  test -n "$STAT" && break
21615done
21616
21617  else
21618    # The variable is set, but is it from the command line or the environment?
21619
21620    # Try to remove the string !STAT! from our list.
21621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21623      # If it failed, the variable was not from the command line. Ignore it,
21624      # but warn the user (except for BASH, which is always set by the calling BASH).
21625      if test "xSTAT" != xBASH; then
21626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21627$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21628      fi
21629      # Try to locate tool using the code snippet
21630      for ac_prog in stat
21631do
21632  # Extract the first word of "$ac_prog", so it can be a program name with args.
21633set dummy $ac_prog; ac_word=$2
21634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21635$as_echo_n "checking for $ac_word... " >&6; }
21636if ${ac_cv_path_STAT+:} false; then :
21637  $as_echo_n "(cached) " >&6
21638else
21639  case $STAT in
21640  [\\/]* | ?:[\\/]*)
21641  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21642  ;;
21643  *)
21644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21645for as_dir in $PATH
21646do
21647  IFS=$as_save_IFS
21648  test -z "$as_dir" && as_dir=.
21649    for ac_exec_ext in '' $ac_executable_extensions; do
21650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21651    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21653    break 2
21654  fi
21655done
21656  done
21657IFS=$as_save_IFS
21658
21659  ;;
21660esac
21661fi
21662STAT=$ac_cv_path_STAT
21663if test -n "$STAT"; then
21664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21665$as_echo "$STAT" >&6; }
21666else
21667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21668$as_echo "no" >&6; }
21669fi
21670
21671
21672  test -n "$STAT" && break
21673done
21674
21675    else
21676      # If it succeeded, then it was overridden by the user. We will use it
21677      # for the tool.
21678
21679      # First remove it from the list of overridden variables, so we can test
21680      # for unknown variables in the end.
21681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21682
21683      # Check if we try to supply an empty value
21684      if test "x$STAT" = x; then
21685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21686$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21688$as_echo_n "checking for STAT... " >&6; }
21689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21690$as_echo "disabled" >&6; }
21691      else
21692        # Check if the provided tool contains a complete path.
21693        tool_specified="$STAT"
21694        tool_basename="${tool_specified##*/}"
21695        if test "x$tool_basename" = "x$tool_specified"; then
21696          # A command without a complete path is provided, search $PATH.
21697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21698$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21699          # Extract the first word of "$tool_basename", so it can be a program name with args.
21700set dummy $tool_basename; ac_word=$2
21701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21702$as_echo_n "checking for $ac_word... " >&6; }
21703if ${ac_cv_path_STAT+:} false; then :
21704  $as_echo_n "(cached) " >&6
21705else
21706  case $STAT in
21707  [\\/]* | ?:[\\/]*)
21708  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21709  ;;
21710  *)
21711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21712for as_dir in $PATH
21713do
21714  IFS=$as_save_IFS
21715  test -z "$as_dir" && as_dir=.
21716    for ac_exec_ext in '' $ac_executable_extensions; do
21717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21718    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21720    break 2
21721  fi
21722done
21723  done
21724IFS=$as_save_IFS
21725
21726  ;;
21727esac
21728fi
21729STAT=$ac_cv_path_STAT
21730if test -n "$STAT"; then
21731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21732$as_echo "$STAT" >&6; }
21733else
21734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21735$as_echo "no" >&6; }
21736fi
21737
21738
21739          if test "x$STAT" = x; then
21740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21741          fi
21742        else
21743          # Otherwise we believe it is a complete path. Use it as it is.
21744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21745$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21747$as_echo_n "checking for STAT... " >&6; }
21748          if test ! -x "$tool_specified"; then
21749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21750$as_echo "not found" >&6; }
21751            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21752          fi
21753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21754$as_echo "$tool_specified" >&6; }
21755        fi
21756      fi
21757    fi
21758
21759  fi
21760
21761
21762
21763
21764  # Publish this variable in the help.
21765
21766
21767  if [ -z "${TIME+x}" ]; then
21768    # The variable is not set by user, try to locate tool using the code snippet
21769    for ac_prog in time
21770do
21771  # Extract the first word of "$ac_prog", so it can be a program name with args.
21772set dummy $ac_prog; ac_word=$2
21773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21774$as_echo_n "checking for $ac_word... " >&6; }
21775if ${ac_cv_path_TIME+:} false; then :
21776  $as_echo_n "(cached) " >&6
21777else
21778  case $TIME in
21779  [\\/]* | ?:[\\/]*)
21780  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21781  ;;
21782  *)
21783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21784for as_dir in $PATH
21785do
21786  IFS=$as_save_IFS
21787  test -z "$as_dir" && as_dir=.
21788    for ac_exec_ext in '' $ac_executable_extensions; do
21789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21790    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21792    break 2
21793  fi
21794done
21795  done
21796IFS=$as_save_IFS
21797
21798  ;;
21799esac
21800fi
21801TIME=$ac_cv_path_TIME
21802if test -n "$TIME"; then
21803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21804$as_echo "$TIME" >&6; }
21805else
21806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21807$as_echo "no" >&6; }
21808fi
21809
21810
21811  test -n "$TIME" && break
21812done
21813
21814  else
21815    # The variable is set, but is it from the command line or the environment?
21816
21817    # Try to remove the string !TIME! from our list.
21818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21820      # If it failed, the variable was not from the command line. Ignore it,
21821      # but warn the user (except for BASH, which is always set by the calling BASH).
21822      if test "xTIME" != xBASH; then
21823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21824$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21825      fi
21826      # Try to locate tool using the code snippet
21827      for ac_prog in time
21828do
21829  # Extract the first word of "$ac_prog", so it can be a program name with args.
21830set dummy $ac_prog; ac_word=$2
21831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21832$as_echo_n "checking for $ac_word... " >&6; }
21833if ${ac_cv_path_TIME+:} false; then :
21834  $as_echo_n "(cached) " >&6
21835else
21836  case $TIME in
21837  [\\/]* | ?:[\\/]*)
21838  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21839  ;;
21840  *)
21841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21842for as_dir in $PATH
21843do
21844  IFS=$as_save_IFS
21845  test -z "$as_dir" && as_dir=.
21846    for ac_exec_ext in '' $ac_executable_extensions; do
21847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21848    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21850    break 2
21851  fi
21852done
21853  done
21854IFS=$as_save_IFS
21855
21856  ;;
21857esac
21858fi
21859TIME=$ac_cv_path_TIME
21860if test -n "$TIME"; then
21861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21862$as_echo "$TIME" >&6; }
21863else
21864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21865$as_echo "no" >&6; }
21866fi
21867
21868
21869  test -n "$TIME" && break
21870done
21871
21872    else
21873      # If it succeeded, then it was overridden by the user. We will use it
21874      # for the tool.
21875
21876      # First remove it from the list of overridden variables, so we can test
21877      # for unknown variables in the end.
21878      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21879
21880      # Check if we try to supply an empty value
21881      if test "x$TIME" = x; then
21882        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21883$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21885$as_echo_n "checking for TIME... " >&6; }
21886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21887$as_echo "disabled" >&6; }
21888      else
21889        # Check if the provided tool contains a complete path.
21890        tool_specified="$TIME"
21891        tool_basename="${tool_specified##*/}"
21892        if test "x$tool_basename" = "x$tool_specified"; then
21893          # A command without a complete path is provided, search $PATH.
21894          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21895$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21896          # Extract the first word of "$tool_basename", so it can be a program name with args.
21897set dummy $tool_basename; ac_word=$2
21898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21899$as_echo_n "checking for $ac_word... " >&6; }
21900if ${ac_cv_path_TIME+:} false; then :
21901  $as_echo_n "(cached) " >&6
21902else
21903  case $TIME in
21904  [\\/]* | ?:[\\/]*)
21905  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21906  ;;
21907  *)
21908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21909for as_dir in $PATH
21910do
21911  IFS=$as_save_IFS
21912  test -z "$as_dir" && as_dir=.
21913    for ac_exec_ext in '' $ac_executable_extensions; do
21914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21915    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21917    break 2
21918  fi
21919done
21920  done
21921IFS=$as_save_IFS
21922
21923  ;;
21924esac
21925fi
21926TIME=$ac_cv_path_TIME
21927if test -n "$TIME"; then
21928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21929$as_echo "$TIME" >&6; }
21930else
21931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21932$as_echo "no" >&6; }
21933fi
21934
21935
21936          if test "x$TIME" = x; then
21937            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21938          fi
21939        else
21940          # Otherwise we believe it is a complete path. Use it as it is.
21941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21942$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21943          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21944$as_echo_n "checking for TIME... " >&6; }
21945          if test ! -x "$tool_specified"; then
21946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21947$as_echo "not found" >&6; }
21948            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21949          fi
21950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21951$as_echo "$tool_specified" >&6; }
21952        fi
21953      fi
21954    fi
21955
21956  fi
21957
21958
21959
21960
21961  # Publish this variable in the help.
21962
21963
21964  if [ -z "${PATCH+x}" ]; then
21965    # The variable is not set by user, try to locate tool using the code snippet
21966    for ac_prog in gpatch patch
21967do
21968  # Extract the first word of "$ac_prog", so it can be a program name with args.
21969set dummy $ac_prog; ac_word=$2
21970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21971$as_echo_n "checking for $ac_word... " >&6; }
21972if ${ac_cv_path_PATCH+:} false; then :
21973  $as_echo_n "(cached) " >&6
21974else
21975  case $PATCH in
21976  [\\/]* | ?:[\\/]*)
21977  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21978  ;;
21979  *)
21980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21981for as_dir in $PATH
21982do
21983  IFS=$as_save_IFS
21984  test -z "$as_dir" && as_dir=.
21985    for ac_exec_ext in '' $ac_executable_extensions; do
21986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21987    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21989    break 2
21990  fi
21991done
21992  done
21993IFS=$as_save_IFS
21994
21995  ;;
21996esac
21997fi
21998PATCH=$ac_cv_path_PATCH
21999if test -n "$PATCH"; then
22000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22001$as_echo "$PATCH" >&6; }
22002else
22003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22004$as_echo "no" >&6; }
22005fi
22006
22007
22008  test -n "$PATCH" && break
22009done
22010
22011  else
22012    # The variable is set, but is it from the command line or the environment?
22013
22014    # Try to remove the string !PATCH! from our list.
22015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22017      # If it failed, the variable was not from the command line. Ignore it,
22018      # but warn the user (except for BASH, which is always set by the calling BASH).
22019      if test "xPATCH" != xBASH; then
22020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22021$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22022      fi
22023      # Try to locate tool using the code snippet
22024      for ac_prog in gpatch patch
22025do
22026  # Extract the first word of "$ac_prog", so it can be a program name with args.
22027set dummy $ac_prog; ac_word=$2
22028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22029$as_echo_n "checking for $ac_word... " >&6; }
22030if ${ac_cv_path_PATCH+:} false; then :
22031  $as_echo_n "(cached) " >&6
22032else
22033  case $PATCH in
22034  [\\/]* | ?:[\\/]*)
22035  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22036  ;;
22037  *)
22038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22039for as_dir in $PATH
22040do
22041  IFS=$as_save_IFS
22042  test -z "$as_dir" && as_dir=.
22043    for ac_exec_ext in '' $ac_executable_extensions; do
22044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22045    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22047    break 2
22048  fi
22049done
22050  done
22051IFS=$as_save_IFS
22052
22053  ;;
22054esac
22055fi
22056PATCH=$ac_cv_path_PATCH
22057if test -n "$PATCH"; then
22058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22059$as_echo "$PATCH" >&6; }
22060else
22061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22062$as_echo "no" >&6; }
22063fi
22064
22065
22066  test -n "$PATCH" && break
22067done
22068
22069    else
22070      # If it succeeded, then it was overridden by the user. We will use it
22071      # for the tool.
22072
22073      # First remove it from the list of overridden variables, so we can test
22074      # for unknown variables in the end.
22075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22076
22077      # Check if we try to supply an empty value
22078      if test "x$PATCH" = x; then
22079        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22080$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22082$as_echo_n "checking for PATCH... " >&6; }
22083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22084$as_echo "disabled" >&6; }
22085      else
22086        # Check if the provided tool contains a complete path.
22087        tool_specified="$PATCH"
22088        tool_basename="${tool_specified##*/}"
22089        if test "x$tool_basename" = "x$tool_specified"; then
22090          # A command without a complete path is provided, search $PATH.
22091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22092$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22093          # Extract the first word of "$tool_basename", so it can be a program name with args.
22094set dummy $tool_basename; ac_word=$2
22095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22096$as_echo_n "checking for $ac_word... " >&6; }
22097if ${ac_cv_path_PATCH+:} false; then :
22098  $as_echo_n "(cached) " >&6
22099else
22100  case $PATCH in
22101  [\\/]* | ?:[\\/]*)
22102  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22103  ;;
22104  *)
22105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22106for as_dir in $PATH
22107do
22108  IFS=$as_save_IFS
22109  test -z "$as_dir" && as_dir=.
22110    for ac_exec_ext in '' $ac_executable_extensions; do
22111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22112    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22114    break 2
22115  fi
22116done
22117  done
22118IFS=$as_save_IFS
22119
22120  ;;
22121esac
22122fi
22123PATCH=$ac_cv_path_PATCH
22124if test -n "$PATCH"; then
22125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22126$as_echo "$PATCH" >&6; }
22127else
22128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22129$as_echo "no" >&6; }
22130fi
22131
22132
22133          if test "x$PATCH" = x; then
22134            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22135          fi
22136        else
22137          # Otherwise we believe it is a complete path. Use it as it is.
22138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22139$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22140          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22141$as_echo_n "checking for PATCH... " >&6; }
22142          if test ! -x "$tool_specified"; then
22143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22144$as_echo "not found" >&6; }
22145            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22146          fi
22147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22148$as_echo "$tool_specified" >&6; }
22149        fi
22150      fi
22151    fi
22152
22153  fi
22154
22155
22156  # Check if it's GNU time
22157  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22158  if test "x$IS_GNU_TIME" != x; then
22159    IS_GNU_TIME=yes
22160  else
22161    IS_GNU_TIME=no
22162  fi
22163
22164
22165  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22166
22167
22168
22169  # Publish this variable in the help.
22170
22171
22172  if [ -z "${DSYMUTIL+x}" ]; then
22173    # The variable is not set by user, try to locate tool using the code snippet
22174    for ac_prog in dsymutil
22175do
22176  # Extract the first word of "$ac_prog", so it can be a program name with args.
22177set dummy $ac_prog; ac_word=$2
22178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22179$as_echo_n "checking for $ac_word... " >&6; }
22180if ${ac_cv_path_DSYMUTIL+:} false; then :
22181  $as_echo_n "(cached) " >&6
22182else
22183  case $DSYMUTIL in
22184  [\\/]* | ?:[\\/]*)
22185  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22186  ;;
22187  *)
22188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22189for as_dir in $PATH
22190do
22191  IFS=$as_save_IFS
22192  test -z "$as_dir" && as_dir=.
22193    for ac_exec_ext in '' $ac_executable_extensions; do
22194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22195    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22197    break 2
22198  fi
22199done
22200  done
22201IFS=$as_save_IFS
22202
22203  ;;
22204esac
22205fi
22206DSYMUTIL=$ac_cv_path_DSYMUTIL
22207if test -n "$DSYMUTIL"; then
22208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22209$as_echo "$DSYMUTIL" >&6; }
22210else
22211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22212$as_echo "no" >&6; }
22213fi
22214
22215
22216  test -n "$DSYMUTIL" && break
22217done
22218
22219  else
22220    # The variable is set, but is it from the command line or the environment?
22221
22222    # Try to remove the string !DSYMUTIL! from our list.
22223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22225      # If it failed, the variable was not from the command line. Ignore it,
22226      # but warn the user (except for BASH, which is always set by the calling BASH).
22227      if test "xDSYMUTIL" != xBASH; then
22228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22229$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22230      fi
22231      # Try to locate tool using the code snippet
22232      for ac_prog in dsymutil
22233do
22234  # Extract the first word of "$ac_prog", so it can be a program name with args.
22235set dummy $ac_prog; ac_word=$2
22236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22237$as_echo_n "checking for $ac_word... " >&6; }
22238if ${ac_cv_path_DSYMUTIL+:} false; then :
22239  $as_echo_n "(cached) " >&6
22240else
22241  case $DSYMUTIL in
22242  [\\/]* | ?:[\\/]*)
22243  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22244  ;;
22245  *)
22246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22247for as_dir in $PATH
22248do
22249  IFS=$as_save_IFS
22250  test -z "$as_dir" && as_dir=.
22251    for ac_exec_ext in '' $ac_executable_extensions; do
22252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22253    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22255    break 2
22256  fi
22257done
22258  done
22259IFS=$as_save_IFS
22260
22261  ;;
22262esac
22263fi
22264DSYMUTIL=$ac_cv_path_DSYMUTIL
22265if test -n "$DSYMUTIL"; then
22266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22267$as_echo "$DSYMUTIL" >&6; }
22268else
22269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22270$as_echo "no" >&6; }
22271fi
22272
22273
22274  test -n "$DSYMUTIL" && break
22275done
22276
22277    else
22278      # If it succeeded, then it was overridden by the user. We will use it
22279      # for the tool.
22280
22281      # First remove it from the list of overridden variables, so we can test
22282      # for unknown variables in the end.
22283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22284
22285      # Check if we try to supply an empty value
22286      if test "x$DSYMUTIL" = x; then
22287        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22288$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22290$as_echo_n "checking for DSYMUTIL... " >&6; }
22291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22292$as_echo "disabled" >&6; }
22293      else
22294        # Check if the provided tool contains a complete path.
22295        tool_specified="$DSYMUTIL"
22296        tool_basename="${tool_specified##*/}"
22297        if test "x$tool_basename" = "x$tool_specified"; then
22298          # A command without a complete path is provided, search $PATH.
22299          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22300$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22301          # Extract the first word of "$tool_basename", so it can be a program name with args.
22302set dummy $tool_basename; ac_word=$2
22303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22304$as_echo_n "checking for $ac_word... " >&6; }
22305if ${ac_cv_path_DSYMUTIL+:} false; then :
22306  $as_echo_n "(cached) " >&6
22307else
22308  case $DSYMUTIL in
22309  [\\/]* | ?:[\\/]*)
22310  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22311  ;;
22312  *)
22313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22314for as_dir in $PATH
22315do
22316  IFS=$as_save_IFS
22317  test -z "$as_dir" && as_dir=.
22318    for ac_exec_ext in '' $ac_executable_extensions; do
22319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22320    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22322    break 2
22323  fi
22324done
22325  done
22326IFS=$as_save_IFS
22327
22328  ;;
22329esac
22330fi
22331DSYMUTIL=$ac_cv_path_DSYMUTIL
22332if test -n "$DSYMUTIL"; then
22333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22334$as_echo "$DSYMUTIL" >&6; }
22335else
22336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22337$as_echo "no" >&6; }
22338fi
22339
22340
22341          if test "x$DSYMUTIL" = x; then
22342            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22343          fi
22344        else
22345          # Otherwise we believe it is a complete path. Use it as it is.
22346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22347$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22348          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22349$as_echo_n "checking for DSYMUTIL... " >&6; }
22350          if test ! -x "$tool_specified"; then
22351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22352$as_echo "not found" >&6; }
22353            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22354          fi
22355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22356$as_echo "$tool_specified" >&6; }
22357        fi
22358      fi
22359    fi
22360
22361  fi
22362
22363
22364
22365  if test "x$DSYMUTIL" = x; then
22366    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22367  fi
22368
22369
22370
22371
22372
22373  # Publish this variable in the help.
22374
22375
22376  if [ -z "${XATTR+x}" ]; then
22377    # The variable is not set by user, try to locate tool using the code snippet
22378    for ac_prog in xattr
22379do
22380  # Extract the first word of "$ac_prog", so it can be a program name with args.
22381set dummy $ac_prog; ac_word=$2
22382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22383$as_echo_n "checking for $ac_word... " >&6; }
22384if ${ac_cv_path_XATTR+:} false; then :
22385  $as_echo_n "(cached) " >&6
22386else
22387  case $XATTR in
22388  [\\/]* | ?:[\\/]*)
22389  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22390  ;;
22391  *)
22392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22393for as_dir in $PATH
22394do
22395  IFS=$as_save_IFS
22396  test -z "$as_dir" && as_dir=.
22397    for ac_exec_ext in '' $ac_executable_extensions; do
22398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22399    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22401    break 2
22402  fi
22403done
22404  done
22405IFS=$as_save_IFS
22406
22407  ;;
22408esac
22409fi
22410XATTR=$ac_cv_path_XATTR
22411if test -n "$XATTR"; then
22412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22413$as_echo "$XATTR" >&6; }
22414else
22415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22416$as_echo "no" >&6; }
22417fi
22418
22419
22420  test -n "$XATTR" && break
22421done
22422
22423  else
22424    # The variable is set, but is it from the command line or the environment?
22425
22426    # Try to remove the string !XATTR! from our list.
22427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22429      # If it failed, the variable was not from the command line. Ignore it,
22430      # but warn the user (except for BASH, which is always set by the calling BASH).
22431      if test "xXATTR" != xBASH; then
22432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22433$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22434      fi
22435      # Try to locate tool using the code snippet
22436      for ac_prog in xattr
22437do
22438  # Extract the first word of "$ac_prog", so it can be a program name with args.
22439set dummy $ac_prog; ac_word=$2
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22441$as_echo_n "checking for $ac_word... " >&6; }
22442if ${ac_cv_path_XATTR+:} false; then :
22443  $as_echo_n "(cached) " >&6
22444else
22445  case $XATTR in
22446  [\\/]* | ?:[\\/]*)
22447  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22448  ;;
22449  *)
22450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22451for as_dir in $PATH
22452do
22453  IFS=$as_save_IFS
22454  test -z "$as_dir" && as_dir=.
22455    for ac_exec_ext in '' $ac_executable_extensions; do
22456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22457    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22459    break 2
22460  fi
22461done
22462  done
22463IFS=$as_save_IFS
22464
22465  ;;
22466esac
22467fi
22468XATTR=$ac_cv_path_XATTR
22469if test -n "$XATTR"; then
22470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22471$as_echo "$XATTR" >&6; }
22472else
22473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22474$as_echo "no" >&6; }
22475fi
22476
22477
22478  test -n "$XATTR" && break
22479done
22480
22481    else
22482      # If it succeeded, then it was overridden by the user. We will use it
22483      # for the tool.
22484
22485      # First remove it from the list of overridden variables, so we can test
22486      # for unknown variables in the end.
22487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22488
22489      # Check if we try to supply an empty value
22490      if test "x$XATTR" = x; then
22491        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22492$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22494$as_echo_n "checking for XATTR... " >&6; }
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22496$as_echo "disabled" >&6; }
22497      else
22498        # Check if the provided tool contains a complete path.
22499        tool_specified="$XATTR"
22500        tool_basename="${tool_specified##*/}"
22501        if test "x$tool_basename" = "x$tool_specified"; then
22502          # A command without a complete path is provided, search $PATH.
22503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22504$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22505          # Extract the first word of "$tool_basename", so it can be a program name with args.
22506set dummy $tool_basename; ac_word=$2
22507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22508$as_echo_n "checking for $ac_word... " >&6; }
22509if ${ac_cv_path_XATTR+:} false; then :
22510  $as_echo_n "(cached) " >&6
22511else
22512  case $XATTR in
22513  [\\/]* | ?:[\\/]*)
22514  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22515  ;;
22516  *)
22517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22518for as_dir in $PATH
22519do
22520  IFS=$as_save_IFS
22521  test -z "$as_dir" && as_dir=.
22522    for ac_exec_ext in '' $ac_executable_extensions; do
22523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22524    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22526    break 2
22527  fi
22528done
22529  done
22530IFS=$as_save_IFS
22531
22532  ;;
22533esac
22534fi
22535XATTR=$ac_cv_path_XATTR
22536if test -n "$XATTR"; then
22537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22538$as_echo "$XATTR" >&6; }
22539else
22540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22541$as_echo "no" >&6; }
22542fi
22543
22544
22545          if test "x$XATTR" = x; then
22546            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22547          fi
22548        else
22549          # Otherwise we believe it is a complete path. Use it as it is.
22550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22551$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22553$as_echo_n "checking for XATTR... " >&6; }
22554          if test ! -x "$tool_specified"; then
22555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22556$as_echo "not found" >&6; }
22557            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22558          fi
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22560$as_echo "$tool_specified" >&6; }
22561        fi
22562      fi
22563    fi
22564
22565  fi
22566
22567
22568
22569  if test "x$XATTR" = x; then
22570    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22571  fi
22572
22573
22574
22575
22576  # Publish this variable in the help.
22577
22578
22579  if [ -z "${CODESIGN+x}" ]; then
22580    # The variable is not set by user, try to locate tool using the code snippet
22581    for ac_prog in codesign
22582do
22583  # Extract the first word of "$ac_prog", so it can be a program name with args.
22584set dummy $ac_prog; ac_word=$2
22585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22586$as_echo_n "checking for $ac_word... " >&6; }
22587if ${ac_cv_path_CODESIGN+:} false; then :
22588  $as_echo_n "(cached) " >&6
22589else
22590  case $CODESIGN in
22591  [\\/]* | ?:[\\/]*)
22592  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22593  ;;
22594  *)
22595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22596for as_dir in $PATH
22597do
22598  IFS=$as_save_IFS
22599  test -z "$as_dir" && as_dir=.
22600    for ac_exec_ext in '' $ac_executable_extensions; do
22601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22602    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22604    break 2
22605  fi
22606done
22607  done
22608IFS=$as_save_IFS
22609
22610  ;;
22611esac
22612fi
22613CODESIGN=$ac_cv_path_CODESIGN
22614if test -n "$CODESIGN"; then
22615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22616$as_echo "$CODESIGN" >&6; }
22617else
22618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22619$as_echo "no" >&6; }
22620fi
22621
22622
22623  test -n "$CODESIGN" && break
22624done
22625
22626  else
22627    # The variable is set, but is it from the command line or the environment?
22628
22629    # Try to remove the string !CODESIGN! from our list.
22630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22632      # If it failed, the variable was not from the command line. Ignore it,
22633      # but warn the user (except for BASH, which is always set by the calling BASH).
22634      if test "xCODESIGN" != xBASH; then
22635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22636$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22637      fi
22638      # Try to locate tool using the code snippet
22639      for ac_prog in codesign
22640do
22641  # Extract the first word of "$ac_prog", so it can be a program name with args.
22642set dummy $ac_prog; ac_word=$2
22643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22644$as_echo_n "checking for $ac_word... " >&6; }
22645if ${ac_cv_path_CODESIGN+:} false; then :
22646  $as_echo_n "(cached) " >&6
22647else
22648  case $CODESIGN in
22649  [\\/]* | ?:[\\/]*)
22650  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22651  ;;
22652  *)
22653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22654for as_dir in $PATH
22655do
22656  IFS=$as_save_IFS
22657  test -z "$as_dir" && as_dir=.
22658    for ac_exec_ext in '' $ac_executable_extensions; do
22659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22660    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22662    break 2
22663  fi
22664done
22665  done
22666IFS=$as_save_IFS
22667
22668  ;;
22669esac
22670fi
22671CODESIGN=$ac_cv_path_CODESIGN
22672if test -n "$CODESIGN"; then
22673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22674$as_echo "$CODESIGN" >&6; }
22675else
22676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22677$as_echo "no" >&6; }
22678fi
22679
22680
22681  test -n "$CODESIGN" && break
22682done
22683
22684    else
22685      # If it succeeded, then it was overridden by the user. We will use it
22686      # for the tool.
22687
22688      # First remove it from the list of overridden variables, so we can test
22689      # for unknown variables in the end.
22690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22691
22692      # Check if we try to supply an empty value
22693      if test "x$CODESIGN" = x; then
22694        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22695$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22696        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22697$as_echo_n "checking for CODESIGN... " >&6; }
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22699$as_echo "disabled" >&6; }
22700      else
22701        # Check if the provided tool contains a complete path.
22702        tool_specified="$CODESIGN"
22703        tool_basename="${tool_specified##*/}"
22704        if test "x$tool_basename" = "x$tool_specified"; then
22705          # A command without a complete path is provided, search $PATH.
22706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22707$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22708          # Extract the first word of "$tool_basename", so it can be a program name with args.
22709set dummy $tool_basename; ac_word=$2
22710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22711$as_echo_n "checking for $ac_word... " >&6; }
22712if ${ac_cv_path_CODESIGN+:} false; then :
22713  $as_echo_n "(cached) " >&6
22714else
22715  case $CODESIGN in
22716  [\\/]* | ?:[\\/]*)
22717  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22718  ;;
22719  *)
22720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22721for as_dir in $PATH
22722do
22723  IFS=$as_save_IFS
22724  test -z "$as_dir" && as_dir=.
22725    for ac_exec_ext in '' $ac_executable_extensions; do
22726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22727    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22729    break 2
22730  fi
22731done
22732  done
22733IFS=$as_save_IFS
22734
22735  ;;
22736esac
22737fi
22738CODESIGN=$ac_cv_path_CODESIGN
22739if test -n "$CODESIGN"; then
22740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22741$as_echo "$CODESIGN" >&6; }
22742else
22743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22744$as_echo "no" >&6; }
22745fi
22746
22747
22748          if test "x$CODESIGN" = x; then
22749            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22750          fi
22751        else
22752          # Otherwise we believe it is a complete path. Use it as it is.
22753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22754$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22755          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22756$as_echo_n "checking for CODESIGN... " >&6; }
22757          if test ! -x "$tool_specified"; then
22758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22759$as_echo "not found" >&6; }
22760            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22761          fi
22762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22763$as_echo "$tool_specified" >&6; }
22764        fi
22765      fi
22766    fi
22767
22768  fi
22769
22770
22771    if test "x$CODESIGN" != "x"; then
22772      # Verify that the openjdk_codesign certificate is present
22773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22774$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22775      rm -f codesign-testfile
22776      touch codesign-testfile
22777      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22778      rm -f codesign-testfile
22779      if test "x$CODESIGN" = x; then
22780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22781$as_echo "no" >&6; }
22782      else
22783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22784$as_echo "yes" >&6; }
22785      fi
22786    fi
22787
22788
22789
22790  # Publish this variable in the help.
22791
22792
22793  if [ -z "${SETFILE+x}" ]; then
22794    # The variable is not set by user, try to locate tool using the code snippet
22795    for ac_prog in SetFile
22796do
22797  # Extract the first word of "$ac_prog", so it can be a program name with args.
22798set dummy $ac_prog; ac_word=$2
22799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22800$as_echo_n "checking for $ac_word... " >&6; }
22801if ${ac_cv_path_SETFILE+:} false; then :
22802  $as_echo_n "(cached) " >&6
22803else
22804  case $SETFILE in
22805  [\\/]* | ?:[\\/]*)
22806  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22807  ;;
22808  *)
22809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22810for as_dir in $PATH
22811do
22812  IFS=$as_save_IFS
22813  test -z "$as_dir" && as_dir=.
22814    for ac_exec_ext in '' $ac_executable_extensions; do
22815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22816    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22818    break 2
22819  fi
22820done
22821  done
22822IFS=$as_save_IFS
22823
22824  ;;
22825esac
22826fi
22827SETFILE=$ac_cv_path_SETFILE
22828if test -n "$SETFILE"; then
22829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22830$as_echo "$SETFILE" >&6; }
22831else
22832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22833$as_echo "no" >&6; }
22834fi
22835
22836
22837  test -n "$SETFILE" && break
22838done
22839
22840  else
22841    # The variable is set, but is it from the command line or the environment?
22842
22843    # Try to remove the string !SETFILE! from our list.
22844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22846      # If it failed, the variable was not from the command line. Ignore it,
22847      # but warn the user (except for BASH, which is always set by the calling BASH).
22848      if test "xSETFILE" != xBASH; then
22849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22850$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22851      fi
22852      # Try to locate tool using the code snippet
22853      for ac_prog in SetFile
22854do
22855  # Extract the first word of "$ac_prog", so it can be a program name with args.
22856set dummy $ac_prog; ac_word=$2
22857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22858$as_echo_n "checking for $ac_word... " >&6; }
22859if ${ac_cv_path_SETFILE+:} false; then :
22860  $as_echo_n "(cached) " >&6
22861else
22862  case $SETFILE in
22863  [\\/]* | ?:[\\/]*)
22864  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22865  ;;
22866  *)
22867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22868for as_dir in $PATH
22869do
22870  IFS=$as_save_IFS
22871  test -z "$as_dir" && as_dir=.
22872    for ac_exec_ext in '' $ac_executable_extensions; do
22873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22874    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22876    break 2
22877  fi
22878done
22879  done
22880IFS=$as_save_IFS
22881
22882  ;;
22883esac
22884fi
22885SETFILE=$ac_cv_path_SETFILE
22886if test -n "$SETFILE"; then
22887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22888$as_echo "$SETFILE" >&6; }
22889else
22890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22891$as_echo "no" >&6; }
22892fi
22893
22894
22895  test -n "$SETFILE" && break
22896done
22897
22898    else
22899      # If it succeeded, then it was overridden by the user. We will use it
22900      # for the tool.
22901
22902      # First remove it from the list of overridden variables, so we can test
22903      # for unknown variables in the end.
22904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22905
22906      # Check if we try to supply an empty value
22907      if test "x$SETFILE" = x; then
22908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22909$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22911$as_echo_n "checking for SETFILE... " >&6; }
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22913$as_echo "disabled" >&6; }
22914      else
22915        # Check if the provided tool contains a complete path.
22916        tool_specified="$SETFILE"
22917        tool_basename="${tool_specified##*/}"
22918        if test "x$tool_basename" = "x$tool_specified"; then
22919          # A command without a complete path is provided, search $PATH.
22920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22921$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22922          # Extract the first word of "$tool_basename", so it can be a program name with args.
22923set dummy $tool_basename; ac_word=$2
22924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22925$as_echo_n "checking for $ac_word... " >&6; }
22926if ${ac_cv_path_SETFILE+:} false; then :
22927  $as_echo_n "(cached) " >&6
22928else
22929  case $SETFILE in
22930  [\\/]* | ?:[\\/]*)
22931  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22932  ;;
22933  *)
22934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22935for as_dir in $PATH
22936do
22937  IFS=$as_save_IFS
22938  test -z "$as_dir" && as_dir=.
22939    for ac_exec_ext in '' $ac_executable_extensions; do
22940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22941    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22943    break 2
22944  fi
22945done
22946  done
22947IFS=$as_save_IFS
22948
22949  ;;
22950esac
22951fi
22952SETFILE=$ac_cv_path_SETFILE
22953if test -n "$SETFILE"; then
22954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22955$as_echo "$SETFILE" >&6; }
22956else
22957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22958$as_echo "no" >&6; }
22959fi
22960
22961
22962          if test "x$SETFILE" = x; then
22963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22964          fi
22965        else
22966          # Otherwise we believe it is a complete path. Use it as it is.
22967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22968$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22970$as_echo_n "checking for SETFILE... " >&6; }
22971          if test ! -x "$tool_specified"; then
22972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22973$as_echo "not found" >&6; }
22974            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22975          fi
22976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22977$as_echo "$tool_specified" >&6; }
22978        fi
22979      fi
22980    fi
22981
22982  fi
22983
22984
22985
22986  if test "x$SETFILE" = x; then
22987    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22988  fi
22989
22990
22991  fi
22992
22993
22994  # Test if bash supports pipefail.
22995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22996$as_echo_n "checking if bash supports pipefail... " >&6; }
22997  if ${BASH} -c 'set -o pipefail'; then
22998    BASH_ARGS="$BASH_ARGS -o pipefail"
22999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23000$as_echo "yes" >&6; }
23001  else
23002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23003$as_echo "no" >&6; }
23004  fi
23005
23006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23007$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23008  if ${BASH} -e -c 'true'; then
23009    BASH_ARGS="$BASH_ARGS -e"
23010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23011$as_echo "yes" >&6; }
23012  else
23013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23014$as_echo "no" >&6; }
23015  fi
23016
23017
23018
23019
23020# Check if pkg-config is available.
23021
23022
23023if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23024	if test -n "$ac_tool_prefix"; then
23025  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23026set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23028$as_echo_n "checking for $ac_word... " >&6; }
23029if ${ac_cv_path_PKG_CONFIG+:} false; then :
23030  $as_echo_n "(cached) " >&6
23031else
23032  case $PKG_CONFIG in
23033  [\\/]* | ?:[\\/]*)
23034  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23035  ;;
23036  *)
23037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23038for as_dir in $PATH
23039do
23040  IFS=$as_save_IFS
23041  test -z "$as_dir" && as_dir=.
23042    for ac_exec_ext in '' $ac_executable_extensions; do
23043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23044    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23046    break 2
23047  fi
23048done
23049  done
23050IFS=$as_save_IFS
23051
23052  ;;
23053esac
23054fi
23055PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23056if test -n "$PKG_CONFIG"; then
23057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23058$as_echo "$PKG_CONFIG" >&6; }
23059else
23060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23061$as_echo "no" >&6; }
23062fi
23063
23064
23065fi
23066if test -z "$ac_cv_path_PKG_CONFIG"; then
23067  ac_pt_PKG_CONFIG=$PKG_CONFIG
23068  # Extract the first word of "pkg-config", so it can be a program name with args.
23069set dummy pkg-config; ac_word=$2
23070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23071$as_echo_n "checking for $ac_word... " >&6; }
23072if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23073  $as_echo_n "(cached) " >&6
23074else
23075  case $ac_pt_PKG_CONFIG in
23076  [\\/]* | ?:[\\/]*)
23077  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23078  ;;
23079  *)
23080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23081for as_dir in $PATH
23082do
23083  IFS=$as_save_IFS
23084  test -z "$as_dir" && as_dir=.
23085    for ac_exec_ext in '' $ac_executable_extensions; do
23086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23087    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23089    break 2
23090  fi
23091done
23092  done
23093IFS=$as_save_IFS
23094
23095  ;;
23096esac
23097fi
23098ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23099if test -n "$ac_pt_PKG_CONFIG"; then
23100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23101$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23102else
23103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23104$as_echo "no" >&6; }
23105fi
23106
23107  if test "x$ac_pt_PKG_CONFIG" = x; then
23108    PKG_CONFIG=""
23109  else
23110    case $cross_compiling:$ac_tool_warned in
23111yes:)
23112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23114ac_tool_warned=yes ;;
23115esac
23116    PKG_CONFIG=$ac_pt_PKG_CONFIG
23117  fi
23118else
23119  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23120fi
23121
23122fi
23123if test -n "$PKG_CONFIG"; then
23124	_pkg_min_version=0.9.0
23125	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23126$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23127	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23128		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23129$as_echo "yes" >&6; }
23130	else
23131		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23132$as_echo "no" >&6; }
23133		PKG_CONFIG=""
23134	fi
23135
23136fi
23137
23138# After basic tools have been setup, we can check build os specific details.
23139
23140  ###############################################################################
23141
23142  # Note that this is the build platform OS version!
23143
23144  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23145  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23146  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23147  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23148
23149
23150
23151
23152
23153# Misc basic settings
23154
23155
23156# Check whether --with-default-make-target was given.
23157if test "${with_default_make_target+set}" = set; then :
23158  withval=$with_default_make_target;
23159fi
23160
23161  if test "x$with_default_make_target" = "x" \
23162      || test "x$with_default_make_target" = "xyes"; then
23163    DEFAULT_MAKE_TARGET="exploded-image"
23164  elif test "x$with_default_make_target" = "xno"; then
23165    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23166  else
23167    DEFAULT_MAKE_TARGET="$with_default_make_target"
23168  fi
23169
23170
23171
23172
23173###############################################################################
23174#
23175# Determine OpenJDK variants, options and version numbers.
23176#
23177###############################################################################
23178
23179# We need build & target for this.
23180
23181  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23182  # We always build headless support.
23183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23184$as_echo_n "checking headful support... " >&6; }
23185  # Check whether --enable-headful was given.
23186if test "${enable_headful+set}" = set; then :
23187  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23188else
23189  SUPPORT_HEADFUL=yes
23190fi
23191
23192
23193  SUPPORT_HEADLESS=yes
23194  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23195
23196  if test "x$SUPPORT_HEADFUL" = xyes; then
23197    # We are building both headful and headless.
23198    headful_msg="include support for both headful and headless"
23199  fi
23200
23201  if test "x$SUPPORT_HEADFUL" = xno; then
23202    # Thus we are building headless only.
23203    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23204    headful_msg="headless only"
23205  fi
23206
23207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23208$as_echo "$headful_msg" >&6; }
23209
23210
23211
23212
23213
23214  # Choose cacerts source file
23215
23216# Check whether --with-cacerts-file was given.
23217if test "${with_cacerts_file+set}" = set; then :
23218  withval=$with_cacerts_file;
23219fi
23220
23221  if test "x$with_cacerts_file" != x; then
23222    CACERTS_FILE=$with_cacerts_file
23223  fi
23224
23225
23226  # Enable or disable unlimited crypto
23227  # Check whether --enable-unlimited-crypto was given.
23228if test "${enable_unlimited_crypto+set}" = set; then :
23229  enableval=$enable_unlimited_crypto;
23230else
23231  enable_unlimited_crypto=no
23232fi
23233
23234  if test "x$enable_unlimited_crypto" = "xyes"; then
23235    UNLIMITED_CRYPTO=true
23236  else
23237    UNLIMITED_CRYPTO=false
23238  fi
23239
23240
23241  # Compress jars
23242  COMPRESS_JARS=false
23243
23244
23245
23246  # Setup default copyright year. Mostly overridden when building close to a new year.
23247
23248# Check whether --with-copyright-year was given.
23249if test "${with_copyright_year+set}" = set; then :
23250  withval=$with_copyright_year;
23251fi
23252
23253  if test "x$with_copyright_year" = xyes; then
23254    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23255  elif test "x$with_copyright_year" != x; then
23256    COPYRIGHT_YEAR="$with_copyright_year"
23257  else
23258    COPYRIGHT_YEAR=`date +'%Y'`
23259  fi
23260
23261
23262
23263  # Control wether Hotspot runs Queens test after build.
23264  # Check whether --enable-hotspot-test-in-build was given.
23265if test "${enable_hotspot_test_in_build+set}" = set; then :
23266  enableval=$enable_hotspot_test_in_build;
23267else
23268  enable_hotspot_test_in_build=no
23269fi
23270
23271  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23272    TEST_IN_BUILD=true
23273  else
23274    TEST_IN_BUILD=false
23275  fi
23276
23277
23278
23279  # Warn user that old version arguments are deprecated.
23280
23281
23282# Check whether --with-milestone was given.
23283if test "${with_milestone+set}" = set; then :
23284  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23285$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23286fi
23287
23288
23289
23290
23291# Check whether --with-update-version was given.
23292if test "${with_update_version+set}" = set; then :
23293  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23294$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23295fi
23296
23297
23298
23299
23300# Check whether --with-user-release-suffix was given.
23301if test "${with_user_release_suffix+set}" = set; then :
23302  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
23303$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23304fi
23305
23306
23307
23308
23309# Check whether --with-build-number was given.
23310if test "${with_build_number+set}" = set; then :
23311  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23312$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23313fi
23314
23315
23316
23317  # Source the version numbers file
23318  . $AUTOCONF_DIR/version-numbers
23319
23320  # Some non-version number information is set in that file
23321
23322
23323
23324
23325
23326
23327
23328
23329  # Override version from arguments
23330
23331  # If --with-version-string is set, process it first. It is possible to
23332  # override parts with more specific flags, since these are processed later.
23333
23334# Check whether --with-version-string was given.
23335if test "${with_version_string+set}" = set; then :
23336  withval=$with_version_string;
23337fi
23338
23339  if test "x$with_version_string" = xyes; then
23340    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23341  elif test "x$with_version_string" != x; then
23342    # Additional [] needed to keep m4 from mangling shell constructs.
23343    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23344      VERSION_MAJOR=${BASH_REMATCH[1]}
23345      VERSION_MINOR=${BASH_REMATCH[3]}
23346      VERSION_SECURITY=${BASH_REMATCH[5]}
23347      VERSION_PATCH=${BASH_REMATCH[7]}
23348      VERSION_PRE=${BASH_REMATCH[9]}
23349      version_plus_separator=${BASH_REMATCH[11]}
23350      VERSION_BUILD=${BASH_REMATCH[12]}
23351      VERSION_OPT=${BASH_REMATCH[14]}
23352      # Unspecified numerical fields are interpreted as 0.
23353      if test "x$VERSION_MINOR" = x; then
23354        VERSION_MINOR=0
23355      fi
23356      if test "x$VERSION_SECURITY" = x; then
23357        VERSION_SECURITY=0
23358      fi
23359      if test "x$VERSION_PATCH" = x; then
23360        VERSION_PATCH=0
23361      fi
23362      if test "x$version_plus_separator" != x \
23363          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23364        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23365      fi
23366      # Stop the version part process from setting default values.
23367      # We still allow them to explicitely override though.
23368      NO_DEFAULT_VERSION_PARTS=true
23369    else
23370      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23371    fi
23372  fi
23373
23374
23375# Check whether --with-version-pre was given.
23376if test "${with_version_pre+set}" = set; then :
23377  withval=$with_version_pre; with_version_pre_present=true
23378else
23379  with_version_pre_present=false
23380fi
23381
23382
23383  if test "x$with_version_pre_present" = xtrue; then
23384    if test "x$with_version_pre" = xyes; then
23385      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23386    elif test "x$with_version_pre" = xno; then
23387      # Interpret --without-* as empty string instead of the literal "no"
23388      VERSION_PRE=
23389    else
23390      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23391       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23392      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23394$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23395      fi
23396    fi
23397  else
23398    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23399      # Default is to use "internal" as pre
23400      VERSION_PRE="internal"
23401    fi
23402  fi
23403
23404
23405# Check whether --with-version-opt was given.
23406if test "${with_version_opt+set}" = set; then :
23407  withval=$with_version_opt; with_version_opt_present=true
23408else
23409  with_version_opt_present=false
23410fi
23411
23412
23413  if test "x$with_version_opt_present" = xtrue; then
23414    if test "x$with_version_opt" = xyes; then
23415      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23416    elif test "x$with_version_opt" = xno; then
23417      # Interpret --without-* as empty string instead of the literal "no"
23418      VERSION_OPT=
23419    else
23420      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23421       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23422      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23424$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23425      fi
23426    fi
23427  else
23428    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23429      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23430      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23431      # Outer [ ] to quote m4.
23432       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23433       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23434      VERSION_OPT="$timestamp.$username.$basedirname"
23435    fi
23436  fi
23437
23438
23439# Check whether --with-version-build was given.
23440if test "${with_version_build+set}" = set; then :
23441  withval=$with_version_build; with_version_build_present=true
23442else
23443  with_version_build_present=false
23444fi
23445
23446
23447  if test "x$with_version_build_present" = xtrue; then
23448    if test "x$with_version_build" = xyes; then
23449      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23450    elif test "x$with_version_build" = xno; then
23451      # Interpret --without-* as empty string instead of the literal "no"
23452      VERSION_BUILD=
23453    elif test "x$with_version_build" = x; then
23454      VERSION_BUILD=
23455    else
23456
23457  # Additional [] needed to keep m4 from mangling shell constructs.
23458  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23459    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23460  fi
23461  # Extract the version number without leading zeros.
23462  cleaned_value=${BASH_REMATCH[1]}
23463  if test "x$cleaned_value" = x; then
23464    # Special case for zero
23465    cleaned_value=${BASH_REMATCH[2]}
23466  fi
23467
23468  if test $cleaned_value -gt 255; then
23469    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23470  fi
23471  if test "x$cleaned_value" != "x$with_version_build"; then
23472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23473$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23474  fi
23475  VERSION_BUILD=$cleaned_value
23476
23477    fi
23478  else
23479    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23480      # Default is to not have a build number.
23481      VERSION_BUILD=""
23482      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23483      VERSION_BUILD=0
23484    fi
23485  fi
23486
23487
23488# Check whether --with-version-major was given.
23489if test "${with_version_major+set}" = set; then :
23490  withval=$with_version_major; with_version_major_present=true
23491else
23492  with_version_major_present=false
23493fi
23494
23495
23496  if test "x$with_version_major_present" = xtrue; then
23497    if test "x$with_version_major" = xyes; then
23498      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23499    else
23500
23501  # Additional [] needed to keep m4 from mangling shell constructs.
23502  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23503    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23504  fi
23505  # Extract the version number without leading zeros.
23506  cleaned_value=${BASH_REMATCH[1]}
23507  if test "x$cleaned_value" = x; then
23508    # Special case for zero
23509    cleaned_value=${BASH_REMATCH[2]}
23510  fi
23511
23512  if test $cleaned_value -gt 255; then
23513    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23514  fi
23515  if test "x$cleaned_value" != "x$with_version_major"; then
23516    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23517$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23518  fi
23519  VERSION_MAJOR=$cleaned_value
23520
23521    fi
23522  else
23523    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23524      # Default is to get value from version-numbers
23525      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23526    fi
23527  fi
23528
23529
23530# Check whether --with-version-minor was given.
23531if test "${with_version_minor+set}" = set; then :
23532  withval=$with_version_minor; with_version_minor_present=true
23533else
23534  with_version_minor_present=false
23535fi
23536
23537
23538  if test "x$with_version_minor_present" = xtrue; then
23539    if test "x$with_version_minor" = xyes; then
23540      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23541    elif test "x$with_version_minor" = xno; then
23542      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23543      VERSION_MINOR=0
23544    elif test "x$with_version_minor" = x; then
23545      VERSION_MINOR=0
23546    else
23547
23548  # Additional [] needed to keep m4 from mangling shell constructs.
23549  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23550    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23551  fi
23552  # Extract the version number without leading zeros.
23553  cleaned_value=${BASH_REMATCH[1]}
23554  if test "x$cleaned_value" = x; then
23555    # Special case for zero
23556    cleaned_value=${BASH_REMATCH[2]}
23557  fi
23558
23559  if test $cleaned_value -gt 255; then
23560    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23561  fi
23562  if test "x$cleaned_value" != "x$with_version_minor"; then
23563    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23564$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23565  fi
23566  VERSION_MINOR=$cleaned_value
23567
23568    fi
23569  else
23570    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23571      # Default is 0, if unspecified
23572      VERSION_MINOR=0
23573    fi
23574  fi
23575
23576
23577# Check whether --with-version-security was given.
23578if test "${with_version_security+set}" = set; then :
23579  withval=$with_version_security; with_version_security_present=true
23580else
23581  with_version_security_present=false
23582fi
23583
23584
23585  if test "x$with_version_security_present" = xtrue; then
23586    if test "x$with_version_security" = xyes; then
23587      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23588    elif test "x$with_version_security" = xno; then
23589      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23590      VERSION_SECURITY=0
23591    elif test "x$with_version_security" = x; then
23592      VERSION_SECURITY=0
23593    else
23594
23595  # Additional [] needed to keep m4 from mangling shell constructs.
23596  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23597    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23598  fi
23599  # Extract the version number without leading zeros.
23600  cleaned_value=${BASH_REMATCH[1]}
23601  if test "x$cleaned_value" = x; then
23602    # Special case for zero
23603    cleaned_value=${BASH_REMATCH[2]}
23604  fi
23605
23606  if test $cleaned_value -gt 255; then
23607    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23608  fi
23609  if test "x$cleaned_value" != "x$with_version_security"; then
23610    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23611$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23612  fi
23613  VERSION_SECURITY=$cleaned_value
23614
23615    fi
23616  else
23617    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23618      # Default is 0, if unspecified
23619      VERSION_SECURITY=0
23620    fi
23621  fi
23622
23623
23624# Check whether --with-version-patch was given.
23625if test "${with_version_patch+set}" = set; then :
23626  withval=$with_version_patch; with_version_patch_present=true
23627else
23628  with_version_patch_present=false
23629fi
23630
23631
23632  if test "x$with_version_patch_present" = xtrue; then
23633    if test "x$with_version_patch" = xyes; then
23634      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23635    elif test "x$with_version_patch" = xno; then
23636      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23637      VERSION_PATCH=0
23638    elif test "x$with_version_patch" = x; then
23639      VERSION_PATCH=0
23640    else
23641
23642  # Additional [] needed to keep m4 from mangling shell constructs.
23643  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23644    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23645  fi
23646  # Extract the version number without leading zeros.
23647  cleaned_value=${BASH_REMATCH[1]}
23648  if test "x$cleaned_value" = x; then
23649    # Special case for zero
23650    cleaned_value=${BASH_REMATCH[2]}
23651  fi
23652
23653  if test $cleaned_value -gt 255; then
23654    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23655  fi
23656  if test "x$cleaned_value" != "x$with_version_patch"; then
23657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23658$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23659  fi
23660  VERSION_PATCH=$cleaned_value
23661
23662    fi
23663  else
23664    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23665      # Default is 0, if unspecified
23666      VERSION_PATCH=0
23667    fi
23668  fi
23669
23670  # Calculate derived version properties
23671
23672  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23673  if test "x$VERSION_PRE" = x; then
23674    VERSION_IS_GA=true
23675  else
23676    VERSION_IS_GA=false
23677  fi
23678
23679  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23680  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23681
23682  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23683  # Strip trailing zeroes from stripped_version_number
23684  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23685  VERSION_NUMBER=$stripped_version_number
23686
23687  # The complete version string, with additional build information
23688  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23689    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23690  else
23691    # If either build or opt is set, we need a + separator
23692    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23693  fi
23694
23695  # The short version string, just VERSION_NUMBER and PRE, if present.
23696  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23697
23698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23699$as_echo_n "checking for version string... " >&6; }
23700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23701$as_echo "$VERSION_STRING" >&6; }
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717###############################################################################
23718#
23719# Setup BootJDK, used to bootstrap the build.
23720#
23721###############################################################################
23722
23723
23724  BOOT_JDK_FOUND=no
23725
23726# Check whether --with-boot-jdk was given.
23727if test "${with_boot_jdk+set}" = set; then :
23728  withval=$with_boot_jdk;
23729fi
23730
23731
23732  # We look for the Boot JDK through various means, going from more certain to
23733  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23734  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23735  # must check if this is indeed valid; otherwise we'll continue looking.
23736
23737  # Test: Is bootjdk explicitely set by command line arguments?
23738
23739  if test "x$BOOT_JDK_FOUND" = xno; then
23740    # Now execute the test
23741
23742  if test "x$with_boot_jdk" != x; then
23743    BOOT_JDK=$with_boot_jdk
23744    BOOT_JDK_FOUND=maybe
23745    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23746$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23747  fi
23748
23749
23750    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23751    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23752      # Do we have a bin/java?
23753      if test ! -x "$BOOT_JDK/bin/java"; then
23754        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23756        BOOT_JDK_FOUND=no
23757      else
23758        # Do we have a bin/javac?
23759        if test ! -x "$BOOT_JDK/bin/javac"; then
23760          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23762          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23763$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23764          BOOT_JDK_FOUND=no
23765        else
23766          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23767          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23768
23769          # Extra M4 quote needed to protect [] in grep expression.
23770          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23771          if test "x$FOUND_CORRECT_VERSION" = x; then
23772            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23774            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23775$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23776            BOOT_JDK_FOUND=no
23777          else
23778            # We're done! :-)
23779            BOOT_JDK_FOUND=yes
23780
23781  # Only process if variable expands to non-empty
23782
23783  if test "x$BOOT_JDK" != x; then
23784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23785
23786  # Input might be given as Windows format, start by converting to
23787  # unix format.
23788  path="$BOOT_JDK"
23789  new_path=`$CYGPATH -u "$path"`
23790
23791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23794  # "foo.exe" is OK but "foo" is an error.
23795  #
23796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23797  # It is also a way to make sure we got the proper file name for the real test later on.
23798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23799  if test "x$test_shortpath" = x; then
23800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23802    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23803  fi
23804
23805  # Call helper function which possibly converts this using DOS-style short mode.
23806  # If so, the updated path is stored in $new_path.
23807
23808  input_path="$new_path"
23809  # Check if we need to convert this using DOS-style short mode. If the path
23810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23811  # take no chances and rewrite it.
23812  # Note: m4 eats our [], so we need to use [ and ] instead.
23813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23814  if test "x$has_forbidden_chars" != x; then
23815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23819      # Going to short mode and back again did indeed matter. Since short mode is
23820      # case insensitive, let's make it lowercase to improve readability.
23821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23822      # Now convert it back to Unix-style (cygpath)
23823      input_path=`$CYGPATH -u "$shortmode_path"`
23824      new_path="$input_path"
23825    fi
23826  fi
23827
23828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23829  if test "x$test_cygdrive_prefix" = x; then
23830    # As a simple fix, exclude /usr/bin since it's not a real path.
23831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23833      # a path prefixed by /cygdrive for fixpath to work.
23834      new_path="$CYGWIN_ROOT_PATH$input_path"
23835    fi
23836  fi
23837
23838
23839  if test "x$path" != "x$new_path"; then
23840    BOOT_JDK="$new_path"
23841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23843  fi
23844
23845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23846
23847  path="$BOOT_JDK"
23848  has_colon=`$ECHO $path | $GREP ^.:`
23849  new_path="$path"
23850  if test "x$has_colon" = x; then
23851    # Not in mixed or Windows style, start by that.
23852    new_path=`cmd //c echo $path`
23853  fi
23854
23855
23856  input_path="$new_path"
23857  # Check if we need to convert this using DOS-style short mode. If the path
23858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23859  # take no chances and rewrite it.
23860  # Note: m4 eats our [], so we need to use [ and ] instead.
23861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23862  if test "x$has_forbidden_chars" != x; then
23863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23865  fi
23866
23867
23868  windows_path="$new_path"
23869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23870    unix_path=`$CYGPATH -u "$windows_path"`
23871    new_path="$unix_path"
23872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23874    new_path="$unix_path"
23875  fi
23876
23877  if test "x$path" != "x$new_path"; then
23878    BOOT_JDK="$new_path"
23879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23881  fi
23882
23883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23885
23886    else
23887      # We're on a unix platform. Hooray! :)
23888      path="$BOOT_JDK"
23889      has_space=`$ECHO "$path" | $GREP " "`
23890      if test "x$has_space" != x; then
23891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23892$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23894      fi
23895
23896      # Use eval to expand a potential ~
23897      eval path="$path"
23898      if test ! -f "$path" && test ! -d "$path"; then
23899        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23900      fi
23901
23902      if test -d "$path"; then
23903        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23904      else
23905        dir="`$DIRNAME "$path"`"
23906        base="`$BASENAME "$path"`"
23907        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23908      fi
23909    fi
23910  fi
23911
23912            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23913$as_echo_n "checking for Boot JDK... " >&6; }
23914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23915$as_echo "$BOOT_JDK" >&6; }
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23917$as_echo_n "checking Boot JDK version... " >&6; }
23918            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23920$as_echo "$BOOT_JDK_VERSION" >&6; }
23921          fi # end check jdk version
23922        fi # end check javac
23923      fi # end check java
23924    fi # end check boot jdk found
23925  fi
23926
23927  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23928    # Having specified an argument which is incorrect will produce an instant failure;
23929    # we should not go on looking
23930    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23931  fi
23932
23933  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23934
23935  if test "x$BOOT_JDK_FOUND" = xno; then
23936    # Now execute the test
23937
23938  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23939    # First check at user selected default
23940
23941  if test "x$BOOT_JDK_FOUND" = xno; then
23942    # Now execute the test
23943
23944  if test -x /usr/libexec/java_home; then
23945    BOOT_JDK=`/usr/libexec/java_home `
23946    BOOT_JDK_FOUND=maybe
23947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23948$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23949  fi
23950
23951
23952    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23953    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23954      # Do we have a bin/java?
23955      if test ! -x "$BOOT_JDK/bin/java"; then
23956        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23958        BOOT_JDK_FOUND=no
23959      else
23960        # Do we have a bin/javac?
23961        if test ! -x "$BOOT_JDK/bin/javac"; then
23962          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23964          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23965$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23966          BOOT_JDK_FOUND=no
23967        else
23968          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23969          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23970
23971          # Extra M4 quote needed to protect [] in grep expression.
23972          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23973          if test "x$FOUND_CORRECT_VERSION" = x; then
23974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23976            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23977$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23978            BOOT_JDK_FOUND=no
23979          else
23980            # We're done! :-)
23981            BOOT_JDK_FOUND=yes
23982
23983  # Only process if variable expands to non-empty
23984
23985  if test "x$BOOT_JDK" != x; then
23986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23987
23988  # Input might be given as Windows format, start by converting to
23989  # unix format.
23990  path="$BOOT_JDK"
23991  new_path=`$CYGPATH -u "$path"`
23992
23993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23996  # "foo.exe" is OK but "foo" is an error.
23997  #
23998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23999  # It is also a way to make sure we got the proper file name for the real test later on.
24000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24001  if test "x$test_shortpath" = x; then
24002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24004    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24005  fi
24006
24007  # Call helper function which possibly converts this using DOS-style short mode.
24008  # If so, the updated path is stored in $new_path.
24009
24010  input_path="$new_path"
24011  # Check if we need to convert this using DOS-style short mode. If the path
24012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24013  # take no chances and rewrite it.
24014  # Note: m4 eats our [], so we need to use [ and ] instead.
24015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24016  if test "x$has_forbidden_chars" != x; then
24017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24021      # Going to short mode and back again did indeed matter. Since short mode is
24022      # case insensitive, let's make it lowercase to improve readability.
24023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24024      # Now convert it back to Unix-style (cygpath)
24025      input_path=`$CYGPATH -u "$shortmode_path"`
24026      new_path="$input_path"
24027    fi
24028  fi
24029
24030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24031  if test "x$test_cygdrive_prefix" = x; then
24032    # As a simple fix, exclude /usr/bin since it's not a real path.
24033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24035      # a path prefixed by /cygdrive for fixpath to work.
24036      new_path="$CYGWIN_ROOT_PATH$input_path"
24037    fi
24038  fi
24039
24040
24041  if test "x$path" != "x$new_path"; then
24042    BOOT_JDK="$new_path"
24043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24045  fi
24046
24047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24048
24049  path="$BOOT_JDK"
24050  has_colon=`$ECHO $path | $GREP ^.:`
24051  new_path="$path"
24052  if test "x$has_colon" = x; then
24053    # Not in mixed or Windows style, start by that.
24054    new_path=`cmd //c echo $path`
24055  fi
24056
24057
24058  input_path="$new_path"
24059  # Check if we need to convert this using DOS-style short mode. If the path
24060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24061  # take no chances and rewrite it.
24062  # Note: m4 eats our [], so we need to use [ and ] instead.
24063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24064  if test "x$has_forbidden_chars" != x; then
24065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24067  fi
24068
24069
24070  windows_path="$new_path"
24071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24072    unix_path=`$CYGPATH -u "$windows_path"`
24073    new_path="$unix_path"
24074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24076    new_path="$unix_path"
24077  fi
24078
24079  if test "x$path" != "x$new_path"; then
24080    BOOT_JDK="$new_path"
24081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24083  fi
24084
24085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24087
24088    else
24089      # We're on a unix platform. Hooray! :)
24090      path="$BOOT_JDK"
24091      has_space=`$ECHO "$path" | $GREP " "`
24092      if test "x$has_space" != x; then
24093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24096      fi
24097
24098      # Use eval to expand a potential ~
24099      eval path="$path"
24100      if test ! -f "$path" && test ! -d "$path"; then
24101        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24102      fi
24103
24104      if test -d "$path"; then
24105        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24106      else
24107        dir="`$DIRNAME "$path"`"
24108        base="`$BASENAME "$path"`"
24109        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24110      fi
24111    fi
24112  fi
24113
24114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24115$as_echo_n "checking for Boot JDK... " >&6; }
24116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24117$as_echo "$BOOT_JDK" >&6; }
24118            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24119$as_echo_n "checking Boot JDK version... " >&6; }
24120            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24122$as_echo "$BOOT_JDK_VERSION" >&6; }
24123          fi # end check jdk version
24124        fi # end check javac
24125      fi # end check java
24126    fi # end check boot jdk found
24127  fi
24128
24129    # If that did not work out (e.g. too old), try explicit versions instead
24130
24131  if test "x$BOOT_JDK_FOUND" = xno; then
24132    # Now execute the test
24133
24134  if test -x /usr/libexec/java_home; then
24135    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24136    BOOT_JDK_FOUND=maybe
24137    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24138$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24139  fi
24140
24141
24142    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24143    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24144      # Do we have a bin/java?
24145      if test ! -x "$BOOT_JDK/bin/java"; then
24146        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24148        BOOT_JDK_FOUND=no
24149      else
24150        # Do we have a bin/javac?
24151        if test ! -x "$BOOT_JDK/bin/javac"; then
24152          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24154          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24155$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24156          BOOT_JDK_FOUND=no
24157        else
24158          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24159          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24160
24161          # Extra M4 quote needed to protect [] in grep expression.
24162          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24163          if test "x$FOUND_CORRECT_VERSION" = x; then
24164            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24166            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24167$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24168            BOOT_JDK_FOUND=no
24169          else
24170            # We're done! :-)
24171            BOOT_JDK_FOUND=yes
24172
24173  # Only process if variable expands to non-empty
24174
24175  if test "x$BOOT_JDK" != x; then
24176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24177
24178  # Input might be given as Windows format, start by converting to
24179  # unix format.
24180  path="$BOOT_JDK"
24181  new_path=`$CYGPATH -u "$path"`
24182
24183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24186  # "foo.exe" is OK but "foo" is an error.
24187  #
24188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24189  # It is also a way to make sure we got the proper file name for the real test later on.
24190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24191  if test "x$test_shortpath" = x; then
24192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24194    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24195  fi
24196
24197  # Call helper function which possibly converts this using DOS-style short mode.
24198  # If so, the updated path is stored in $new_path.
24199
24200  input_path="$new_path"
24201  # Check if we need to convert this using DOS-style short mode. If the path
24202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24203  # take no chances and rewrite it.
24204  # Note: m4 eats our [], so we need to use [ and ] instead.
24205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24206  if test "x$has_forbidden_chars" != x; then
24207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24211      # Going to short mode and back again did indeed matter. Since short mode is
24212      # case insensitive, let's make it lowercase to improve readability.
24213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24214      # Now convert it back to Unix-style (cygpath)
24215      input_path=`$CYGPATH -u "$shortmode_path"`
24216      new_path="$input_path"
24217    fi
24218  fi
24219
24220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24221  if test "x$test_cygdrive_prefix" = x; then
24222    # As a simple fix, exclude /usr/bin since it's not a real path.
24223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24225      # a path prefixed by /cygdrive for fixpath to work.
24226      new_path="$CYGWIN_ROOT_PATH$input_path"
24227    fi
24228  fi
24229
24230
24231  if test "x$path" != "x$new_path"; then
24232    BOOT_JDK="$new_path"
24233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24235  fi
24236
24237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24238
24239  path="$BOOT_JDK"
24240  has_colon=`$ECHO $path | $GREP ^.:`
24241  new_path="$path"
24242  if test "x$has_colon" = x; then
24243    # Not in mixed or Windows style, start by that.
24244    new_path=`cmd //c echo $path`
24245  fi
24246
24247
24248  input_path="$new_path"
24249  # Check if we need to convert this using DOS-style short mode. If the path
24250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24251  # take no chances and rewrite it.
24252  # Note: m4 eats our [], so we need to use [ and ] instead.
24253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24254  if test "x$has_forbidden_chars" != x; then
24255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24257  fi
24258
24259
24260  windows_path="$new_path"
24261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24262    unix_path=`$CYGPATH -u "$windows_path"`
24263    new_path="$unix_path"
24264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24266    new_path="$unix_path"
24267  fi
24268
24269  if test "x$path" != "x$new_path"; then
24270    BOOT_JDK="$new_path"
24271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24273  fi
24274
24275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24277
24278    else
24279      # We're on a unix platform. Hooray! :)
24280      path="$BOOT_JDK"
24281      has_space=`$ECHO "$path" | $GREP " "`
24282      if test "x$has_space" != x; then
24283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24286      fi
24287
24288      # Use eval to expand a potential ~
24289      eval path="$path"
24290      if test ! -f "$path" && test ! -d "$path"; then
24291        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24292      fi
24293
24294      if test -d "$path"; then
24295        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24296      else
24297        dir="`$DIRNAME "$path"`"
24298        base="`$BASENAME "$path"`"
24299        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24300      fi
24301    fi
24302  fi
24303
24304            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24305$as_echo_n "checking for Boot JDK... " >&6; }
24306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24307$as_echo "$BOOT_JDK" >&6; }
24308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24309$as_echo_n "checking Boot JDK version... " >&6; }
24310            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24312$as_echo "$BOOT_JDK_VERSION" >&6; }
24313          fi # end check jdk version
24314        fi # end check javac
24315      fi # end check java
24316    fi # end check boot jdk found
24317  fi
24318
24319
24320  if test "x$BOOT_JDK_FOUND" = xno; then
24321    # Now execute the test
24322
24323  if test -x /usr/libexec/java_home; then
24324    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24325    BOOT_JDK_FOUND=maybe
24326    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24327$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24328  fi
24329
24330
24331    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24332    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24333      # Do we have a bin/java?
24334      if test ! -x "$BOOT_JDK/bin/java"; then
24335        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24337        BOOT_JDK_FOUND=no
24338      else
24339        # Do we have a bin/javac?
24340        if test ! -x "$BOOT_JDK/bin/javac"; then
24341          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24343          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24344$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24345          BOOT_JDK_FOUND=no
24346        else
24347          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24348          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24349
24350          # Extra M4 quote needed to protect [] in grep expression.
24351          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24352          if test "x$FOUND_CORRECT_VERSION" = x; then
24353            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24355            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24356$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24357            BOOT_JDK_FOUND=no
24358          else
24359            # We're done! :-)
24360            BOOT_JDK_FOUND=yes
24361
24362  # Only process if variable expands to non-empty
24363
24364  if test "x$BOOT_JDK" != x; then
24365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24366
24367  # Input might be given as Windows format, start by converting to
24368  # unix format.
24369  path="$BOOT_JDK"
24370  new_path=`$CYGPATH -u "$path"`
24371
24372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24375  # "foo.exe" is OK but "foo" is an error.
24376  #
24377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24378  # It is also a way to make sure we got the proper file name for the real test later on.
24379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24380  if test "x$test_shortpath" = x; then
24381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24383    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24384  fi
24385
24386  # Call helper function which possibly converts this using DOS-style short mode.
24387  # If so, the updated path is stored in $new_path.
24388
24389  input_path="$new_path"
24390  # Check if we need to convert this using DOS-style short mode. If the path
24391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24392  # take no chances and rewrite it.
24393  # Note: m4 eats our [], so we need to use [ and ] instead.
24394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24395  if test "x$has_forbidden_chars" != x; then
24396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24400      # Going to short mode and back again did indeed matter. Since short mode is
24401      # case insensitive, let's make it lowercase to improve readability.
24402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24403      # Now convert it back to Unix-style (cygpath)
24404      input_path=`$CYGPATH -u "$shortmode_path"`
24405      new_path="$input_path"
24406    fi
24407  fi
24408
24409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24410  if test "x$test_cygdrive_prefix" = x; then
24411    # As a simple fix, exclude /usr/bin since it's not a real path.
24412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24414      # a path prefixed by /cygdrive for fixpath to work.
24415      new_path="$CYGWIN_ROOT_PATH$input_path"
24416    fi
24417  fi
24418
24419
24420  if test "x$path" != "x$new_path"; then
24421    BOOT_JDK="$new_path"
24422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24424  fi
24425
24426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24427
24428  path="$BOOT_JDK"
24429  has_colon=`$ECHO $path | $GREP ^.:`
24430  new_path="$path"
24431  if test "x$has_colon" = x; then
24432    # Not in mixed or Windows style, start by that.
24433    new_path=`cmd //c echo $path`
24434  fi
24435
24436
24437  input_path="$new_path"
24438  # Check if we need to convert this using DOS-style short mode. If the path
24439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24440  # take no chances and rewrite it.
24441  # Note: m4 eats our [], so we need to use [ and ] instead.
24442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24443  if test "x$has_forbidden_chars" != x; then
24444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24446  fi
24447
24448
24449  windows_path="$new_path"
24450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24451    unix_path=`$CYGPATH -u "$windows_path"`
24452    new_path="$unix_path"
24453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24455    new_path="$unix_path"
24456  fi
24457
24458  if test "x$path" != "x$new_path"; then
24459    BOOT_JDK="$new_path"
24460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24462  fi
24463
24464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24466
24467    else
24468      # We're on a unix platform. Hooray! :)
24469      path="$BOOT_JDK"
24470      has_space=`$ECHO "$path" | $GREP " "`
24471      if test "x$has_space" != x; then
24472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24475      fi
24476
24477      # Use eval to expand a potential ~
24478      eval path="$path"
24479      if test ! -f "$path" && test ! -d "$path"; then
24480        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24481      fi
24482
24483      if test -d "$path"; then
24484        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24485      else
24486        dir="`$DIRNAME "$path"`"
24487        base="`$BASENAME "$path"`"
24488        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24489      fi
24490    fi
24491  fi
24492
24493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24494$as_echo_n "checking for Boot JDK... " >&6; }
24495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24496$as_echo "$BOOT_JDK" >&6; }
24497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24498$as_echo_n "checking Boot JDK version... " >&6; }
24499            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24501$as_echo "$BOOT_JDK_VERSION" >&6; }
24502          fi # end check jdk version
24503        fi # end check javac
24504      fi # end check java
24505    fi # end check boot jdk found
24506  fi
24507
24508
24509  if test "x$BOOT_JDK_FOUND" = xno; then
24510    # Now execute the test
24511
24512  if test -x /usr/libexec/java_home; then
24513    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24514    BOOT_JDK_FOUND=maybe
24515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24516$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24517  fi
24518
24519
24520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24522      # Do we have a bin/java?
24523      if test ! -x "$BOOT_JDK/bin/java"; then
24524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24526        BOOT_JDK_FOUND=no
24527      else
24528        # Do we have a bin/javac?
24529        if test ! -x "$BOOT_JDK/bin/javac"; then
24530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24534          BOOT_JDK_FOUND=no
24535        else
24536          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24537          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24538
24539          # Extra M4 quote needed to protect [] in grep expression.
24540          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24541          if test "x$FOUND_CORRECT_VERSION" = x; then
24542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24544            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24546            BOOT_JDK_FOUND=no
24547          else
24548            # We're done! :-)
24549            BOOT_JDK_FOUND=yes
24550
24551  # Only process if variable expands to non-empty
24552
24553  if test "x$BOOT_JDK" != x; then
24554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24555
24556  # Input might be given as Windows format, start by converting to
24557  # unix format.
24558  path="$BOOT_JDK"
24559  new_path=`$CYGPATH -u "$path"`
24560
24561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24564  # "foo.exe" is OK but "foo" is an error.
24565  #
24566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24567  # It is also a way to make sure we got the proper file name for the real test later on.
24568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24569  if test "x$test_shortpath" = x; then
24570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24572    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24573  fi
24574
24575  # Call helper function which possibly converts this using DOS-style short mode.
24576  # If so, the updated path is stored in $new_path.
24577
24578  input_path="$new_path"
24579  # Check if we need to convert this using DOS-style short mode. If the path
24580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24581  # take no chances and rewrite it.
24582  # Note: m4 eats our [], so we need to use [ and ] instead.
24583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24584  if test "x$has_forbidden_chars" != x; then
24585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24589      # Going to short mode and back again did indeed matter. Since short mode is
24590      # case insensitive, let's make it lowercase to improve readability.
24591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24592      # Now convert it back to Unix-style (cygpath)
24593      input_path=`$CYGPATH -u "$shortmode_path"`
24594      new_path="$input_path"
24595    fi
24596  fi
24597
24598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24599  if test "x$test_cygdrive_prefix" = x; then
24600    # As a simple fix, exclude /usr/bin since it's not a real path.
24601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24603      # a path prefixed by /cygdrive for fixpath to work.
24604      new_path="$CYGWIN_ROOT_PATH$input_path"
24605    fi
24606  fi
24607
24608
24609  if test "x$path" != "x$new_path"; then
24610    BOOT_JDK="$new_path"
24611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24613  fi
24614
24615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24616
24617  path="$BOOT_JDK"
24618  has_colon=`$ECHO $path | $GREP ^.:`
24619  new_path="$path"
24620  if test "x$has_colon" = x; then
24621    # Not in mixed or Windows style, start by that.
24622    new_path=`cmd //c echo $path`
24623  fi
24624
24625
24626  input_path="$new_path"
24627  # Check if we need to convert this using DOS-style short mode. If the path
24628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24629  # take no chances and rewrite it.
24630  # Note: m4 eats our [], so we need to use [ and ] instead.
24631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24632  if test "x$has_forbidden_chars" != x; then
24633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24635  fi
24636
24637
24638  windows_path="$new_path"
24639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24640    unix_path=`$CYGPATH -u "$windows_path"`
24641    new_path="$unix_path"
24642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24644    new_path="$unix_path"
24645  fi
24646
24647  if test "x$path" != "x$new_path"; then
24648    BOOT_JDK="$new_path"
24649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24651  fi
24652
24653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24655
24656    else
24657      # We're on a unix platform. Hooray! :)
24658      path="$BOOT_JDK"
24659      has_space=`$ECHO "$path" | $GREP " "`
24660      if test "x$has_space" != x; then
24661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24664      fi
24665
24666      # Use eval to expand a potential ~
24667      eval path="$path"
24668      if test ! -f "$path" && test ! -d "$path"; then
24669        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24670      fi
24671
24672      if test -d "$path"; then
24673        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24674      else
24675        dir="`$DIRNAME "$path"`"
24676        base="`$BASENAME "$path"`"
24677        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24678      fi
24679    fi
24680  fi
24681
24682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24683$as_echo_n "checking for Boot JDK... " >&6; }
24684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24685$as_echo "$BOOT_JDK" >&6; }
24686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24687$as_echo_n "checking Boot JDK version... " >&6; }
24688            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24690$as_echo "$BOOT_JDK_VERSION" >&6; }
24691          fi # end check jdk version
24692        fi # end check javac
24693      fi # end check java
24694    fi # end check boot jdk found
24695  fi
24696
24697  fi
24698
24699
24700    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24701    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24702      # Do we have a bin/java?
24703      if test ! -x "$BOOT_JDK/bin/java"; then
24704        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24706        BOOT_JDK_FOUND=no
24707      else
24708        # Do we have a bin/javac?
24709        if test ! -x "$BOOT_JDK/bin/javac"; then
24710          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24712          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24713$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24714          BOOT_JDK_FOUND=no
24715        else
24716          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24717          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24718
24719          # Extra M4 quote needed to protect [] in grep expression.
24720          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24721          if test "x$FOUND_CORRECT_VERSION" = x; then
24722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24724            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24725$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24726            BOOT_JDK_FOUND=no
24727          else
24728            # We're done! :-)
24729            BOOT_JDK_FOUND=yes
24730
24731  # Only process if variable expands to non-empty
24732
24733  if test "x$BOOT_JDK" != x; then
24734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24735
24736  # Input might be given as Windows format, start by converting to
24737  # unix format.
24738  path="$BOOT_JDK"
24739  new_path=`$CYGPATH -u "$path"`
24740
24741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24744  # "foo.exe" is OK but "foo" is an error.
24745  #
24746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24747  # It is also a way to make sure we got the proper file name for the real test later on.
24748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24749  if test "x$test_shortpath" = x; then
24750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24752    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24753  fi
24754
24755  # Call helper function which possibly converts this using DOS-style short mode.
24756  # If so, the updated path is stored in $new_path.
24757
24758  input_path="$new_path"
24759  # Check if we need to convert this using DOS-style short mode. If the path
24760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24761  # take no chances and rewrite it.
24762  # Note: m4 eats our [], so we need to use [ and ] instead.
24763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24764  if test "x$has_forbidden_chars" != x; then
24765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24769      # Going to short mode and back again did indeed matter. Since short mode is
24770      # case insensitive, let's make it lowercase to improve readability.
24771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24772      # Now convert it back to Unix-style (cygpath)
24773      input_path=`$CYGPATH -u "$shortmode_path"`
24774      new_path="$input_path"
24775    fi
24776  fi
24777
24778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24779  if test "x$test_cygdrive_prefix" = x; then
24780    # As a simple fix, exclude /usr/bin since it's not a real path.
24781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24783      # a path prefixed by /cygdrive for fixpath to work.
24784      new_path="$CYGWIN_ROOT_PATH$input_path"
24785    fi
24786  fi
24787
24788
24789  if test "x$path" != "x$new_path"; then
24790    BOOT_JDK="$new_path"
24791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24793  fi
24794
24795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24796
24797  path="$BOOT_JDK"
24798  has_colon=`$ECHO $path | $GREP ^.:`
24799  new_path="$path"
24800  if test "x$has_colon" = x; then
24801    # Not in mixed or Windows style, start by that.
24802    new_path=`cmd //c echo $path`
24803  fi
24804
24805
24806  input_path="$new_path"
24807  # Check if we need to convert this using DOS-style short mode. If the path
24808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24809  # take no chances and rewrite it.
24810  # Note: m4 eats our [], so we need to use [ and ] instead.
24811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24812  if test "x$has_forbidden_chars" != x; then
24813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24815  fi
24816
24817
24818  windows_path="$new_path"
24819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24820    unix_path=`$CYGPATH -u "$windows_path"`
24821    new_path="$unix_path"
24822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24824    new_path="$unix_path"
24825  fi
24826
24827  if test "x$path" != "x$new_path"; then
24828    BOOT_JDK="$new_path"
24829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24831  fi
24832
24833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24835
24836    else
24837      # We're on a unix platform. Hooray! :)
24838      path="$BOOT_JDK"
24839      has_space=`$ECHO "$path" | $GREP " "`
24840      if test "x$has_space" != x; then
24841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24844      fi
24845
24846      # Use eval to expand a potential ~
24847      eval path="$path"
24848      if test ! -f "$path" && test ! -d "$path"; then
24849        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24850      fi
24851
24852      if test -d "$path"; then
24853        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24854      else
24855        dir="`$DIRNAME "$path"`"
24856        base="`$BASENAME "$path"`"
24857        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24858      fi
24859    fi
24860  fi
24861
24862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24863$as_echo_n "checking for Boot JDK... " >&6; }
24864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24865$as_echo "$BOOT_JDK" >&6; }
24866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24867$as_echo_n "checking Boot JDK version... " >&6; }
24868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24870$as_echo "$BOOT_JDK_VERSION" >&6; }
24871          fi # end check jdk version
24872        fi # end check javac
24873      fi # end check java
24874    fi # end check boot jdk found
24875  fi
24876
24877
24878  # Test: Is $JAVA_HOME set?
24879
24880  if test "x$BOOT_JDK_FOUND" = xno; then
24881    # Now execute the test
24882
24883  if test "x$JAVA_HOME" != x; then
24884    JAVA_HOME_PROCESSED="$JAVA_HOME"
24885
24886  # Only process if variable expands to non-empty
24887
24888  if test "x$JAVA_HOME_PROCESSED" != x; then
24889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24890
24891  # Input might be given as Windows format, start by converting to
24892  # unix format.
24893  path="$JAVA_HOME_PROCESSED"
24894  new_path=`$CYGPATH -u "$path"`
24895
24896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24899  # "foo.exe" is OK but "foo" is an error.
24900  #
24901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24902  # It is also a way to make sure we got the proper file name for the real test later on.
24903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24904  if test "x$test_shortpath" = x; then
24905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24906$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24907    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24908  fi
24909
24910  # Call helper function which possibly converts this using DOS-style short mode.
24911  # If so, the updated path is stored in $new_path.
24912
24913  input_path="$new_path"
24914  # Check if we need to convert this using DOS-style short mode. If the path
24915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24916  # take no chances and rewrite it.
24917  # Note: m4 eats our [], so we need to use [ and ] instead.
24918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24919  if test "x$has_forbidden_chars" != x; then
24920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24924      # Going to short mode and back again did indeed matter. Since short mode is
24925      # case insensitive, let's make it lowercase to improve readability.
24926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24927      # Now convert it back to Unix-style (cygpath)
24928      input_path=`$CYGPATH -u "$shortmode_path"`
24929      new_path="$input_path"
24930    fi
24931  fi
24932
24933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24934  if test "x$test_cygdrive_prefix" = x; then
24935    # As a simple fix, exclude /usr/bin since it's not a real path.
24936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24938      # a path prefixed by /cygdrive for fixpath to work.
24939      new_path="$CYGWIN_ROOT_PATH$input_path"
24940    fi
24941  fi
24942
24943
24944  if test "x$path" != "x$new_path"; then
24945    JAVA_HOME_PROCESSED="$new_path"
24946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24947$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24948  fi
24949
24950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24951
24952  path="$JAVA_HOME_PROCESSED"
24953  has_colon=`$ECHO $path | $GREP ^.:`
24954  new_path="$path"
24955  if test "x$has_colon" = x; then
24956    # Not in mixed or Windows style, start by that.
24957    new_path=`cmd //c echo $path`
24958  fi
24959
24960
24961  input_path="$new_path"
24962  # Check if we need to convert this using DOS-style short mode. If the path
24963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24964  # take no chances and rewrite it.
24965  # Note: m4 eats our [], so we need to use [ and ] instead.
24966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24967  if test "x$has_forbidden_chars" != x; then
24968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24970  fi
24971
24972
24973  windows_path="$new_path"
24974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24975    unix_path=`$CYGPATH -u "$windows_path"`
24976    new_path="$unix_path"
24977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24979    new_path="$unix_path"
24980  fi
24981
24982  if test "x$path" != "x$new_path"; then
24983    JAVA_HOME_PROCESSED="$new_path"
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24985$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24986  fi
24987
24988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24990
24991    else
24992      # We're on a unix platform. Hooray! :)
24993      path="$JAVA_HOME_PROCESSED"
24994      has_space=`$ECHO "$path" | $GREP " "`
24995      if test "x$has_space" != x; then
24996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24997$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24999      fi
25000
25001      # Use eval to expand a potential ~
25002      eval path="$path"
25003      if test ! -f "$path" && test ! -d "$path"; then
25004        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25005      fi
25006
25007      if test -d "$path"; then
25008        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25009      else
25010        dir="`$DIRNAME "$path"`"
25011        base="`$BASENAME "$path"`"
25012        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25013      fi
25014    fi
25015  fi
25016
25017    if test ! -d "$JAVA_HOME_PROCESSED"; then
25018      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25019$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25020    else
25021      # Aha, the user has set a JAVA_HOME
25022      # let us use that as the Boot JDK.
25023      BOOT_JDK="$JAVA_HOME_PROCESSED"
25024      BOOT_JDK_FOUND=maybe
25025      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25026$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25027    fi
25028  fi
25029
25030
25031    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25032    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25033      # Do we have a bin/java?
25034      if test ! -x "$BOOT_JDK/bin/java"; then
25035        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25037        BOOT_JDK_FOUND=no
25038      else
25039        # Do we have a bin/javac?
25040        if test ! -x "$BOOT_JDK/bin/javac"; then
25041          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25043          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25044$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25045          BOOT_JDK_FOUND=no
25046        else
25047          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25048          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25049
25050          # Extra M4 quote needed to protect [] in grep expression.
25051          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25052          if test "x$FOUND_CORRECT_VERSION" = x; then
25053            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25055            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25056$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25057            BOOT_JDK_FOUND=no
25058          else
25059            # We're done! :-)
25060            BOOT_JDK_FOUND=yes
25061
25062  # Only process if variable expands to non-empty
25063
25064  if test "x$BOOT_JDK" != x; then
25065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25066
25067  # Input might be given as Windows format, start by converting to
25068  # unix format.
25069  path="$BOOT_JDK"
25070  new_path=`$CYGPATH -u "$path"`
25071
25072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25075  # "foo.exe" is OK but "foo" is an error.
25076  #
25077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25078  # It is also a way to make sure we got the proper file name for the real test later on.
25079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25080  if test "x$test_shortpath" = x; then
25081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25084  fi
25085
25086  # Call helper function which possibly converts this using DOS-style short mode.
25087  # If so, the updated path is stored in $new_path.
25088
25089  input_path="$new_path"
25090  # Check if we need to convert this using DOS-style short mode. If the path
25091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25092  # take no chances and rewrite it.
25093  # Note: m4 eats our [], so we need to use [ and ] instead.
25094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25095  if test "x$has_forbidden_chars" != x; then
25096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25100      # Going to short mode and back again did indeed matter. Since short mode is
25101      # case insensitive, let's make it lowercase to improve readability.
25102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25103      # Now convert it back to Unix-style (cygpath)
25104      input_path=`$CYGPATH -u "$shortmode_path"`
25105      new_path="$input_path"
25106    fi
25107  fi
25108
25109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25110  if test "x$test_cygdrive_prefix" = x; then
25111    # As a simple fix, exclude /usr/bin since it's not a real path.
25112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25114      # a path prefixed by /cygdrive for fixpath to work.
25115      new_path="$CYGWIN_ROOT_PATH$input_path"
25116    fi
25117  fi
25118
25119
25120  if test "x$path" != "x$new_path"; then
25121    BOOT_JDK="$new_path"
25122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25124  fi
25125
25126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25127
25128  path="$BOOT_JDK"
25129  has_colon=`$ECHO $path | $GREP ^.:`
25130  new_path="$path"
25131  if test "x$has_colon" = x; then
25132    # Not in mixed or Windows style, start by that.
25133    new_path=`cmd //c echo $path`
25134  fi
25135
25136
25137  input_path="$new_path"
25138  # Check if we need to convert this using DOS-style short mode. If the path
25139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25140  # take no chances and rewrite it.
25141  # Note: m4 eats our [], so we need to use [ and ] instead.
25142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25143  if test "x$has_forbidden_chars" != x; then
25144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25146  fi
25147
25148
25149  windows_path="$new_path"
25150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25151    unix_path=`$CYGPATH -u "$windows_path"`
25152    new_path="$unix_path"
25153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25155    new_path="$unix_path"
25156  fi
25157
25158  if test "x$path" != "x$new_path"; then
25159    BOOT_JDK="$new_path"
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25162  fi
25163
25164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25166
25167    else
25168      # We're on a unix platform. Hooray! :)
25169      path="$BOOT_JDK"
25170      has_space=`$ECHO "$path" | $GREP " "`
25171      if test "x$has_space" != x; then
25172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25175      fi
25176
25177      # Use eval to expand a potential ~
25178      eval path="$path"
25179      if test ! -f "$path" && test ! -d "$path"; then
25180        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25181      fi
25182
25183      if test -d "$path"; then
25184        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25185      else
25186        dir="`$DIRNAME "$path"`"
25187        base="`$BASENAME "$path"`"
25188        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25189      fi
25190    fi
25191  fi
25192
25193            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25194$as_echo_n "checking for Boot JDK... " >&6; }
25195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25196$as_echo "$BOOT_JDK" >&6; }
25197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25198$as_echo_n "checking Boot JDK version... " >&6; }
25199            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25201$as_echo "$BOOT_JDK_VERSION" >&6; }
25202          fi # end check jdk version
25203        fi # end check javac
25204      fi # end check java
25205    fi # end check boot jdk found
25206  fi
25207
25208
25209  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25210
25211  if test "x$BOOT_JDK_FOUND" = xno; then
25212    # Now execute the test
25213
25214  # Extract the first word of "javac", so it can be a program name with args.
25215set dummy javac; ac_word=$2
25216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25217$as_echo_n "checking for $ac_word... " >&6; }
25218if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25219  $as_echo_n "(cached) " >&6
25220else
25221  case $JAVAC_CHECK in
25222  [\\/]* | ?:[\\/]*)
25223  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25224  ;;
25225  *)
25226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25227for as_dir in $PATH
25228do
25229  IFS=$as_save_IFS
25230  test -z "$as_dir" && as_dir=.
25231    for ac_exec_ext in '' $ac_executable_extensions; do
25232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25233    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25235    break 2
25236  fi
25237done
25238  done
25239IFS=$as_save_IFS
25240
25241  ;;
25242esac
25243fi
25244JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25245if test -n "$JAVAC_CHECK"; then
25246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25247$as_echo "$JAVAC_CHECK" >&6; }
25248else
25249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25250$as_echo "no" >&6; }
25251fi
25252
25253
25254  # Extract the first word of "java", so it can be a program name with args.
25255set dummy java; ac_word=$2
25256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25257$as_echo_n "checking for $ac_word... " >&6; }
25258if ${ac_cv_path_JAVA_CHECK+:} false; then :
25259  $as_echo_n "(cached) " >&6
25260else
25261  case $JAVA_CHECK in
25262  [\\/]* | ?:[\\/]*)
25263  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25264  ;;
25265  *)
25266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25267for as_dir in $PATH
25268do
25269  IFS=$as_save_IFS
25270  test -z "$as_dir" && as_dir=.
25271    for ac_exec_ext in '' $ac_executable_extensions; do
25272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25273    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25275    break 2
25276  fi
25277done
25278  done
25279IFS=$as_save_IFS
25280
25281  ;;
25282esac
25283fi
25284JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25285if test -n "$JAVA_CHECK"; then
25286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25287$as_echo "$JAVA_CHECK" >&6; }
25288else
25289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25290$as_echo "no" >&6; }
25291fi
25292
25293
25294  BINARY="$JAVAC_CHECK"
25295  if test "x$JAVAC_CHECK" = x; then
25296    BINARY="$JAVA_CHECK"
25297  fi
25298  if test "x$BINARY" != x; then
25299    # So there is a java(c) binary, it might be part of a JDK.
25300    # Lets find the JDK/JRE directory by following symbolic links.
25301    # Linux/GNU systems often have links from /usr/bin/java to
25302    # /etc/alternatives/java to the real JDK binary.
25303
25304  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25305    # Follow a chain of symbolic links. Use readlink
25306    # where it exists, else fall back to horribly
25307    # complicated shell code.
25308    if test "x$READLINK_TESTED" != yes; then
25309      # On MacOSX there is a readlink tool with a different
25310      # purpose than the GNU readlink tool. Check the found readlink.
25311      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25312      if test "x$ISGNU" = x; then
25313        # A readlink that we do not know how to use.
25314        # Are there other non-GNU readlinks out there?
25315        READLINK_TESTED=yes
25316        READLINK=
25317      fi
25318    fi
25319
25320    if test "x$READLINK" != x; then
25321      BINARY=`$READLINK -f $BINARY`
25322    else
25323      # Save the current directory for restoring afterwards
25324      STARTDIR=$PWD
25325      COUNTER=0
25326      sym_link_dir=`$DIRNAME $BINARY`
25327      sym_link_file=`$BASENAME $BINARY`
25328      cd $sym_link_dir
25329      # Use -P flag to resolve symlinks in directories.
25330      cd `$THEPWDCMD -P`
25331      sym_link_dir=`$THEPWDCMD -P`
25332      # Resolve file symlinks
25333      while test $COUNTER -lt 20; do
25334        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25335        if test "x$ISLINK" == x; then
25336          # This is not a symbolic link! We are done!
25337          break
25338        fi
25339        # Again resolve directory symlinks since the target of the just found
25340        # link could be in a different directory
25341        cd `$DIRNAME $ISLINK`
25342        sym_link_dir=`$THEPWDCMD -P`
25343        sym_link_file=`$BASENAME $ISLINK`
25344        let COUNTER=COUNTER+1
25345      done
25346      cd $STARTDIR
25347      BINARY=$sym_link_dir/$sym_link_file
25348    fi
25349  fi
25350
25351    BOOT_JDK=`dirname "$BINARY"`
25352    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25353    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25354      # Looks like we found ourselves an JDK
25355      BOOT_JDK_FOUND=maybe
25356      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25357$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25358    fi
25359  fi
25360
25361
25362    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25363    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25364      # Do we have a bin/java?
25365      if test ! -x "$BOOT_JDK/bin/java"; then
25366        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25368        BOOT_JDK_FOUND=no
25369      else
25370        # Do we have a bin/javac?
25371        if test ! -x "$BOOT_JDK/bin/javac"; then
25372          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25374          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25375$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25376          BOOT_JDK_FOUND=no
25377        else
25378          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25379          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25380
25381          # Extra M4 quote needed to protect [] in grep expression.
25382          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25383          if test "x$FOUND_CORRECT_VERSION" = x; then
25384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25386            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25387$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25388            BOOT_JDK_FOUND=no
25389          else
25390            # We're done! :-)
25391            BOOT_JDK_FOUND=yes
25392
25393  # Only process if variable expands to non-empty
25394
25395  if test "x$BOOT_JDK" != x; then
25396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25397
25398  # Input might be given as Windows format, start by converting to
25399  # unix format.
25400  path="$BOOT_JDK"
25401  new_path=`$CYGPATH -u "$path"`
25402
25403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25406  # "foo.exe" is OK but "foo" is an error.
25407  #
25408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25409  # It is also a way to make sure we got the proper file name for the real test later on.
25410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25411  if test "x$test_shortpath" = x; then
25412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25414    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25415  fi
25416
25417  # Call helper function which possibly converts this using DOS-style short mode.
25418  # If so, the updated path is stored in $new_path.
25419
25420  input_path="$new_path"
25421  # Check if we need to convert this using DOS-style short mode. If the path
25422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25423  # take no chances and rewrite it.
25424  # Note: m4 eats our [], so we need to use [ and ] instead.
25425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25426  if test "x$has_forbidden_chars" != x; then
25427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25431      # Going to short mode and back again did indeed matter. Since short mode is
25432      # case insensitive, let's make it lowercase to improve readability.
25433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25434      # Now convert it back to Unix-style (cygpath)
25435      input_path=`$CYGPATH -u "$shortmode_path"`
25436      new_path="$input_path"
25437    fi
25438  fi
25439
25440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25441  if test "x$test_cygdrive_prefix" = x; then
25442    # As a simple fix, exclude /usr/bin since it's not a real path.
25443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25445      # a path prefixed by /cygdrive for fixpath to work.
25446      new_path="$CYGWIN_ROOT_PATH$input_path"
25447    fi
25448  fi
25449
25450
25451  if test "x$path" != "x$new_path"; then
25452    BOOT_JDK="$new_path"
25453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25455  fi
25456
25457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25458
25459  path="$BOOT_JDK"
25460  has_colon=`$ECHO $path | $GREP ^.:`
25461  new_path="$path"
25462  if test "x$has_colon" = x; then
25463    # Not in mixed or Windows style, start by that.
25464    new_path=`cmd //c echo $path`
25465  fi
25466
25467
25468  input_path="$new_path"
25469  # Check if we need to convert this using DOS-style short mode. If the path
25470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25471  # take no chances and rewrite it.
25472  # Note: m4 eats our [], so we need to use [ and ] instead.
25473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25474  if test "x$has_forbidden_chars" != x; then
25475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25477  fi
25478
25479
25480  windows_path="$new_path"
25481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25482    unix_path=`$CYGPATH -u "$windows_path"`
25483    new_path="$unix_path"
25484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25486    new_path="$unix_path"
25487  fi
25488
25489  if test "x$path" != "x$new_path"; then
25490    BOOT_JDK="$new_path"
25491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25493  fi
25494
25495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25497
25498    else
25499      # We're on a unix platform. Hooray! :)
25500      path="$BOOT_JDK"
25501      has_space=`$ECHO "$path" | $GREP " "`
25502      if test "x$has_space" != x; then
25503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25506      fi
25507
25508      # Use eval to expand a potential ~
25509      eval path="$path"
25510      if test ! -f "$path" && test ! -d "$path"; then
25511        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25512      fi
25513
25514      if test -d "$path"; then
25515        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25516      else
25517        dir="`$DIRNAME "$path"`"
25518        base="`$BASENAME "$path"`"
25519        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25520      fi
25521    fi
25522  fi
25523
25524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25525$as_echo_n "checking for Boot JDK... " >&6; }
25526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25527$as_echo "$BOOT_JDK" >&6; }
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25529$as_echo_n "checking Boot JDK version... " >&6; }
25530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25532$as_echo "$BOOT_JDK_VERSION" >&6; }
25533          fi # end check jdk version
25534        fi # end check javac
25535      fi # end check java
25536    fi # end check boot jdk found
25537  fi
25538
25539
25540  # Test: Is there a JDK installed in default, well-known locations?
25541
25542  if test "x$BOOT_JDK_FOUND" = xno; then
25543    # Now execute the test
25544
25545  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25546
25547  if test "x$BOOT_JDK_FOUND" = xno; then
25548    # Now execute the test
25549
25550  if test "x$ProgramW6432" != x; then
25551    VIRTUAL_DIR="$ProgramW6432/Java"
25552
25553  windows_path="$VIRTUAL_DIR"
25554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25555    unix_path=`$CYGPATH -u "$windows_path"`
25556    VIRTUAL_DIR="$unix_path"
25557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25559    VIRTUAL_DIR="$unix_path"
25560  fi
25561
25562
25563  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25564  BOOT_JDK_SUFFIX=""
25565  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25566  if test "x$ALL_JDKS_FOUND" != x; then
25567    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25568
25569  if test "x$BOOT_JDK_FOUND" = xno; then
25570    # Now execute the test
25571
25572        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25573        if test -d "$BOOT_JDK"; then
25574          BOOT_JDK_FOUND=maybe
25575          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25576$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25577        fi
25578
25579
25580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25582      # Do we have a bin/java?
25583      if test ! -x "$BOOT_JDK/bin/java"; then
25584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25586        BOOT_JDK_FOUND=no
25587      else
25588        # Do we have a bin/javac?
25589        if test ! -x "$BOOT_JDK/bin/javac"; then
25590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25594          BOOT_JDK_FOUND=no
25595        else
25596          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25597          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25598
25599          # Extra M4 quote needed to protect [] in grep expression.
25600          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25601          if test "x$FOUND_CORRECT_VERSION" = x; then
25602            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25604            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25605$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25606            BOOT_JDK_FOUND=no
25607          else
25608            # We're done! :-)
25609            BOOT_JDK_FOUND=yes
25610
25611  # Only process if variable expands to non-empty
25612
25613  if test "x$BOOT_JDK" != x; then
25614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25615
25616  # Input might be given as Windows format, start by converting to
25617  # unix format.
25618  path="$BOOT_JDK"
25619  new_path=`$CYGPATH -u "$path"`
25620
25621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25624  # "foo.exe" is OK but "foo" is an error.
25625  #
25626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25627  # It is also a way to make sure we got the proper file name for the real test later on.
25628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25629  if test "x$test_shortpath" = x; then
25630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25633  fi
25634
25635  # Call helper function which possibly converts this using DOS-style short mode.
25636  # If so, the updated path is stored in $new_path.
25637
25638  input_path="$new_path"
25639  # Check if we need to convert this using DOS-style short mode. If the path
25640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25641  # take no chances and rewrite it.
25642  # Note: m4 eats our [], so we need to use [ and ] instead.
25643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25644  if test "x$has_forbidden_chars" != x; then
25645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25649      # Going to short mode and back again did indeed matter. Since short mode is
25650      # case insensitive, let's make it lowercase to improve readability.
25651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25652      # Now convert it back to Unix-style (cygpath)
25653      input_path=`$CYGPATH -u "$shortmode_path"`
25654      new_path="$input_path"
25655    fi
25656  fi
25657
25658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25659  if test "x$test_cygdrive_prefix" = x; then
25660    # As a simple fix, exclude /usr/bin since it's not a real path.
25661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25663      # a path prefixed by /cygdrive for fixpath to work.
25664      new_path="$CYGWIN_ROOT_PATH$input_path"
25665    fi
25666  fi
25667
25668
25669  if test "x$path" != "x$new_path"; then
25670    BOOT_JDK="$new_path"
25671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25673  fi
25674
25675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676
25677  path="$BOOT_JDK"
25678  has_colon=`$ECHO $path | $GREP ^.:`
25679  new_path="$path"
25680  if test "x$has_colon" = x; then
25681    # Not in mixed or Windows style, start by that.
25682    new_path=`cmd //c echo $path`
25683  fi
25684
25685
25686  input_path="$new_path"
25687  # Check if we need to convert this using DOS-style short mode. If the path
25688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25689  # take no chances and rewrite it.
25690  # Note: m4 eats our [], so we need to use [ and ] instead.
25691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25692  if test "x$has_forbidden_chars" != x; then
25693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25695  fi
25696
25697
25698  windows_path="$new_path"
25699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25700    unix_path=`$CYGPATH -u "$windows_path"`
25701    new_path="$unix_path"
25702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25704    new_path="$unix_path"
25705  fi
25706
25707  if test "x$path" != "x$new_path"; then
25708    BOOT_JDK="$new_path"
25709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25711  fi
25712
25713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25715
25716    else
25717      # We're on a unix platform. Hooray! :)
25718      path="$BOOT_JDK"
25719      has_space=`$ECHO "$path" | $GREP " "`
25720      if test "x$has_space" != x; then
25721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25724      fi
25725
25726      # Use eval to expand a potential ~
25727      eval path="$path"
25728      if test ! -f "$path" && test ! -d "$path"; then
25729        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25730      fi
25731
25732      if test -d "$path"; then
25733        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25734      else
25735        dir="`$DIRNAME "$path"`"
25736        base="`$BASENAME "$path"`"
25737        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25738      fi
25739    fi
25740  fi
25741
25742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25743$as_echo_n "checking for Boot JDK... " >&6; }
25744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25745$as_echo "$BOOT_JDK" >&6; }
25746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25747$as_echo_n "checking Boot JDK version... " >&6; }
25748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25750$as_echo "$BOOT_JDK_VERSION" >&6; }
25751          fi # end check jdk version
25752        fi # end check javac
25753      fi # end check java
25754    fi # end check boot jdk found
25755  fi
25756
25757    done
25758  fi
25759
25760  fi
25761
25762
25763    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25764    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25765      # Do we have a bin/java?
25766      if test ! -x "$BOOT_JDK/bin/java"; then
25767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25769        BOOT_JDK_FOUND=no
25770      else
25771        # Do we have a bin/javac?
25772        if test ! -x "$BOOT_JDK/bin/javac"; then
25773          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25775          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25776$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25777          BOOT_JDK_FOUND=no
25778        else
25779          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25780          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25781
25782          # Extra M4 quote needed to protect [] in grep expression.
25783          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25784          if test "x$FOUND_CORRECT_VERSION" = x; then
25785            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25787            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25788$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25789            BOOT_JDK_FOUND=no
25790          else
25791            # We're done! :-)
25792            BOOT_JDK_FOUND=yes
25793
25794  # Only process if variable expands to non-empty
25795
25796  if test "x$BOOT_JDK" != x; then
25797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25798
25799  # Input might be given as Windows format, start by converting to
25800  # unix format.
25801  path="$BOOT_JDK"
25802  new_path=`$CYGPATH -u "$path"`
25803
25804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25807  # "foo.exe" is OK but "foo" is an error.
25808  #
25809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25810  # It is also a way to make sure we got the proper file name for the real test later on.
25811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25812  if test "x$test_shortpath" = x; then
25813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25815    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25816  fi
25817
25818  # Call helper function which possibly converts this using DOS-style short mode.
25819  # If so, the updated path is stored in $new_path.
25820
25821  input_path="$new_path"
25822  # Check if we need to convert this using DOS-style short mode. If the path
25823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25824  # take no chances and rewrite it.
25825  # Note: m4 eats our [], so we need to use [ and ] instead.
25826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25827  if test "x$has_forbidden_chars" != x; then
25828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25832      # Going to short mode and back again did indeed matter. Since short mode is
25833      # case insensitive, let's make it lowercase to improve readability.
25834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25835      # Now convert it back to Unix-style (cygpath)
25836      input_path=`$CYGPATH -u "$shortmode_path"`
25837      new_path="$input_path"
25838    fi
25839  fi
25840
25841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25842  if test "x$test_cygdrive_prefix" = x; then
25843    # As a simple fix, exclude /usr/bin since it's not a real path.
25844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25846      # a path prefixed by /cygdrive for fixpath to work.
25847      new_path="$CYGWIN_ROOT_PATH$input_path"
25848    fi
25849  fi
25850
25851
25852  if test "x$path" != "x$new_path"; then
25853    BOOT_JDK="$new_path"
25854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25856  fi
25857
25858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25859
25860  path="$BOOT_JDK"
25861  has_colon=`$ECHO $path | $GREP ^.:`
25862  new_path="$path"
25863  if test "x$has_colon" = x; then
25864    # Not in mixed or Windows style, start by that.
25865    new_path=`cmd //c echo $path`
25866  fi
25867
25868
25869  input_path="$new_path"
25870  # Check if we need to convert this using DOS-style short mode. If the path
25871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25872  # take no chances and rewrite it.
25873  # Note: m4 eats our [], so we need to use [ and ] instead.
25874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25875  if test "x$has_forbidden_chars" != x; then
25876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25878  fi
25879
25880
25881  windows_path="$new_path"
25882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25883    unix_path=`$CYGPATH -u "$windows_path"`
25884    new_path="$unix_path"
25885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25887    new_path="$unix_path"
25888  fi
25889
25890  if test "x$path" != "x$new_path"; then
25891    BOOT_JDK="$new_path"
25892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25894  fi
25895
25896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25898
25899    else
25900      # We're on a unix platform. Hooray! :)
25901      path="$BOOT_JDK"
25902      has_space=`$ECHO "$path" | $GREP " "`
25903      if test "x$has_space" != x; then
25904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25907      fi
25908
25909      # Use eval to expand a potential ~
25910      eval path="$path"
25911      if test ! -f "$path" && test ! -d "$path"; then
25912        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25913      fi
25914
25915      if test -d "$path"; then
25916        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25917      else
25918        dir="`$DIRNAME "$path"`"
25919        base="`$BASENAME "$path"`"
25920        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25921      fi
25922    fi
25923  fi
25924
25925            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25926$as_echo_n "checking for Boot JDK... " >&6; }
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25928$as_echo "$BOOT_JDK" >&6; }
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25930$as_echo_n "checking Boot JDK version... " >&6; }
25931            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25933$as_echo "$BOOT_JDK_VERSION" >&6; }
25934          fi # end check jdk version
25935        fi # end check javac
25936      fi # end check java
25937    fi # end check boot jdk found
25938  fi
25939
25940
25941  if test "x$BOOT_JDK_FOUND" = xno; then
25942    # Now execute the test
25943
25944  if test "x$PROGRAMW6432" != x; then
25945    VIRTUAL_DIR="$PROGRAMW6432/Java"
25946
25947  windows_path="$VIRTUAL_DIR"
25948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25949    unix_path=`$CYGPATH -u "$windows_path"`
25950    VIRTUAL_DIR="$unix_path"
25951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25953    VIRTUAL_DIR="$unix_path"
25954  fi
25955
25956
25957  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25958  BOOT_JDK_SUFFIX=""
25959  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25960  if test "x$ALL_JDKS_FOUND" != x; then
25961    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25962
25963  if test "x$BOOT_JDK_FOUND" = xno; then
25964    # Now execute the test
25965
25966        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25967        if test -d "$BOOT_JDK"; then
25968          BOOT_JDK_FOUND=maybe
25969          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25970$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25971        fi
25972
25973
25974    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25975    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25976      # Do we have a bin/java?
25977      if test ! -x "$BOOT_JDK/bin/java"; then
25978        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25980        BOOT_JDK_FOUND=no
25981      else
25982        # Do we have a bin/javac?
25983        if test ! -x "$BOOT_JDK/bin/javac"; then
25984          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25986          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25987$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25988          BOOT_JDK_FOUND=no
25989        else
25990          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25991          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25992
25993          # Extra M4 quote needed to protect [] in grep expression.
25994          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25995          if test "x$FOUND_CORRECT_VERSION" = x; then
25996            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25998            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25999$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26000            BOOT_JDK_FOUND=no
26001          else
26002            # We're done! :-)
26003            BOOT_JDK_FOUND=yes
26004
26005  # Only process if variable expands to non-empty
26006
26007  if test "x$BOOT_JDK" != x; then
26008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26009
26010  # Input might be given as Windows format, start by converting to
26011  # unix format.
26012  path="$BOOT_JDK"
26013  new_path=`$CYGPATH -u "$path"`
26014
26015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26018  # "foo.exe" is OK but "foo" is an error.
26019  #
26020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26021  # It is also a way to make sure we got the proper file name for the real test later on.
26022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26023  if test "x$test_shortpath" = x; then
26024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26027  fi
26028
26029  # Call helper function which possibly converts this using DOS-style short mode.
26030  # If so, the updated path is stored in $new_path.
26031
26032  input_path="$new_path"
26033  # Check if we need to convert this using DOS-style short mode. If the path
26034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26035  # take no chances and rewrite it.
26036  # Note: m4 eats our [], so we need to use [ and ] instead.
26037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26038  if test "x$has_forbidden_chars" != x; then
26039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26043      # Going to short mode and back again did indeed matter. Since short mode is
26044      # case insensitive, let's make it lowercase to improve readability.
26045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26046      # Now convert it back to Unix-style (cygpath)
26047      input_path=`$CYGPATH -u "$shortmode_path"`
26048      new_path="$input_path"
26049    fi
26050  fi
26051
26052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26053  if test "x$test_cygdrive_prefix" = x; then
26054    # As a simple fix, exclude /usr/bin since it's not a real path.
26055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26057      # a path prefixed by /cygdrive for fixpath to work.
26058      new_path="$CYGWIN_ROOT_PATH$input_path"
26059    fi
26060  fi
26061
26062
26063  if test "x$path" != "x$new_path"; then
26064    BOOT_JDK="$new_path"
26065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26067  fi
26068
26069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26070
26071  path="$BOOT_JDK"
26072  has_colon=`$ECHO $path | $GREP ^.:`
26073  new_path="$path"
26074  if test "x$has_colon" = x; then
26075    # Not in mixed or Windows style, start by that.
26076    new_path=`cmd //c echo $path`
26077  fi
26078
26079
26080  input_path="$new_path"
26081  # Check if we need to convert this using DOS-style short mode. If the path
26082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26083  # take no chances and rewrite it.
26084  # Note: m4 eats our [], so we need to use [ and ] instead.
26085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26086  if test "x$has_forbidden_chars" != x; then
26087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26089  fi
26090
26091
26092  windows_path="$new_path"
26093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26094    unix_path=`$CYGPATH -u "$windows_path"`
26095    new_path="$unix_path"
26096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26098    new_path="$unix_path"
26099  fi
26100
26101  if test "x$path" != "x$new_path"; then
26102    BOOT_JDK="$new_path"
26103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26105  fi
26106
26107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26109
26110    else
26111      # We're on a unix platform. Hooray! :)
26112      path="$BOOT_JDK"
26113      has_space=`$ECHO "$path" | $GREP " "`
26114      if test "x$has_space" != x; then
26115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26118      fi
26119
26120      # Use eval to expand a potential ~
26121      eval path="$path"
26122      if test ! -f "$path" && test ! -d "$path"; then
26123        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26124      fi
26125
26126      if test -d "$path"; then
26127        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26128      else
26129        dir="`$DIRNAME "$path"`"
26130        base="`$BASENAME "$path"`"
26131        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26132      fi
26133    fi
26134  fi
26135
26136            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26137$as_echo_n "checking for Boot JDK... " >&6; }
26138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26139$as_echo "$BOOT_JDK" >&6; }
26140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26141$as_echo_n "checking Boot JDK version... " >&6; }
26142            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26144$as_echo "$BOOT_JDK_VERSION" >&6; }
26145          fi # end check jdk version
26146        fi # end check javac
26147      fi # end check java
26148    fi # end check boot jdk found
26149  fi
26150
26151    done
26152  fi
26153
26154  fi
26155
26156
26157    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26158    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26159      # Do we have a bin/java?
26160      if test ! -x "$BOOT_JDK/bin/java"; then
26161        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26163        BOOT_JDK_FOUND=no
26164      else
26165        # Do we have a bin/javac?
26166        if test ! -x "$BOOT_JDK/bin/javac"; then
26167          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26169          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26170$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26171          BOOT_JDK_FOUND=no
26172        else
26173          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26174          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26175
26176          # Extra M4 quote needed to protect [] in grep expression.
26177          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26178          if test "x$FOUND_CORRECT_VERSION" = x; then
26179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26181            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26182$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26183            BOOT_JDK_FOUND=no
26184          else
26185            # We're done! :-)
26186            BOOT_JDK_FOUND=yes
26187
26188  # Only process if variable expands to non-empty
26189
26190  if test "x$BOOT_JDK" != x; then
26191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26192
26193  # Input might be given as Windows format, start by converting to
26194  # unix format.
26195  path="$BOOT_JDK"
26196  new_path=`$CYGPATH -u "$path"`
26197
26198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26201  # "foo.exe" is OK but "foo" is an error.
26202  #
26203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26204  # It is also a way to make sure we got the proper file name for the real test later on.
26205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26206  if test "x$test_shortpath" = x; then
26207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26209    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26210  fi
26211
26212  # Call helper function which possibly converts this using DOS-style short mode.
26213  # If so, the updated path is stored in $new_path.
26214
26215  input_path="$new_path"
26216  # Check if we need to convert this using DOS-style short mode. If the path
26217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26218  # take no chances and rewrite it.
26219  # Note: m4 eats our [], so we need to use [ and ] instead.
26220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26221  if test "x$has_forbidden_chars" != x; then
26222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26226      # Going to short mode and back again did indeed matter. Since short mode is
26227      # case insensitive, let's make it lowercase to improve readability.
26228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26229      # Now convert it back to Unix-style (cygpath)
26230      input_path=`$CYGPATH -u "$shortmode_path"`
26231      new_path="$input_path"
26232    fi
26233  fi
26234
26235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26236  if test "x$test_cygdrive_prefix" = x; then
26237    # As a simple fix, exclude /usr/bin since it's not a real path.
26238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26240      # a path prefixed by /cygdrive for fixpath to work.
26241      new_path="$CYGWIN_ROOT_PATH$input_path"
26242    fi
26243  fi
26244
26245
26246  if test "x$path" != "x$new_path"; then
26247    BOOT_JDK="$new_path"
26248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26249$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26250  fi
26251
26252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26253
26254  path="$BOOT_JDK"
26255  has_colon=`$ECHO $path | $GREP ^.:`
26256  new_path="$path"
26257  if test "x$has_colon" = x; then
26258    # Not in mixed or Windows style, start by that.
26259    new_path=`cmd //c echo $path`
26260  fi
26261
26262
26263  input_path="$new_path"
26264  # Check if we need to convert this using DOS-style short mode. If the path
26265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26266  # take no chances and rewrite it.
26267  # Note: m4 eats our [], so we need to use [ and ] instead.
26268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26269  if test "x$has_forbidden_chars" != x; then
26270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26272  fi
26273
26274
26275  windows_path="$new_path"
26276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26277    unix_path=`$CYGPATH -u "$windows_path"`
26278    new_path="$unix_path"
26279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26281    new_path="$unix_path"
26282  fi
26283
26284  if test "x$path" != "x$new_path"; then
26285    BOOT_JDK="$new_path"
26286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26288  fi
26289
26290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26292
26293    else
26294      # We're on a unix platform. Hooray! :)
26295      path="$BOOT_JDK"
26296      has_space=`$ECHO "$path" | $GREP " "`
26297      if test "x$has_space" != x; then
26298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26301      fi
26302
26303      # Use eval to expand a potential ~
26304      eval path="$path"
26305      if test ! -f "$path" && test ! -d "$path"; then
26306        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26307      fi
26308
26309      if test -d "$path"; then
26310        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26311      else
26312        dir="`$DIRNAME "$path"`"
26313        base="`$BASENAME "$path"`"
26314        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26315      fi
26316    fi
26317  fi
26318
26319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26320$as_echo_n "checking for Boot JDK... " >&6; }
26321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26322$as_echo "$BOOT_JDK" >&6; }
26323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26324$as_echo_n "checking Boot JDK version... " >&6; }
26325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26327$as_echo "$BOOT_JDK_VERSION" >&6; }
26328          fi # end check jdk version
26329        fi # end check javac
26330      fi # end check java
26331    fi # end check boot jdk found
26332  fi
26333
26334
26335  if test "x$BOOT_JDK_FOUND" = xno; then
26336    # Now execute the test
26337
26338  if test "x$PROGRAMFILES" != x; then
26339    VIRTUAL_DIR="$PROGRAMFILES/Java"
26340
26341  windows_path="$VIRTUAL_DIR"
26342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26343    unix_path=`$CYGPATH -u "$windows_path"`
26344    VIRTUAL_DIR="$unix_path"
26345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26347    VIRTUAL_DIR="$unix_path"
26348  fi
26349
26350
26351  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26352  BOOT_JDK_SUFFIX=""
26353  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26354  if test "x$ALL_JDKS_FOUND" != x; then
26355    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26356
26357  if test "x$BOOT_JDK_FOUND" = xno; then
26358    # Now execute the test
26359
26360        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26361        if test -d "$BOOT_JDK"; then
26362          BOOT_JDK_FOUND=maybe
26363          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26364$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26365        fi
26366
26367
26368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26370      # Do we have a bin/java?
26371      if test ! -x "$BOOT_JDK/bin/java"; then
26372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26374        BOOT_JDK_FOUND=no
26375      else
26376        # Do we have a bin/javac?
26377        if test ! -x "$BOOT_JDK/bin/javac"; then
26378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26382          BOOT_JDK_FOUND=no
26383        else
26384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26386
26387          # Extra M4 quote needed to protect [] in grep expression.
26388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26389          if test "x$FOUND_CORRECT_VERSION" = x; then
26390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26394            BOOT_JDK_FOUND=no
26395          else
26396            # We're done! :-)
26397            BOOT_JDK_FOUND=yes
26398
26399  # Only process if variable expands to non-empty
26400
26401  if test "x$BOOT_JDK" != x; then
26402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26403
26404  # Input might be given as Windows format, start by converting to
26405  # unix format.
26406  path="$BOOT_JDK"
26407  new_path=`$CYGPATH -u "$path"`
26408
26409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26412  # "foo.exe" is OK but "foo" is an error.
26413  #
26414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26415  # It is also a way to make sure we got the proper file name for the real test later on.
26416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26417  if test "x$test_shortpath" = x; then
26418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26421  fi
26422
26423  # Call helper function which possibly converts this using DOS-style short mode.
26424  # If so, the updated path is stored in $new_path.
26425
26426  input_path="$new_path"
26427  # Check if we need to convert this using DOS-style short mode. If the path
26428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26429  # take no chances and rewrite it.
26430  # Note: m4 eats our [], so we need to use [ and ] instead.
26431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26432  if test "x$has_forbidden_chars" != x; then
26433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26437      # Going to short mode and back again did indeed matter. Since short mode is
26438      # case insensitive, let's make it lowercase to improve readability.
26439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26440      # Now convert it back to Unix-style (cygpath)
26441      input_path=`$CYGPATH -u "$shortmode_path"`
26442      new_path="$input_path"
26443    fi
26444  fi
26445
26446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26447  if test "x$test_cygdrive_prefix" = x; then
26448    # As a simple fix, exclude /usr/bin since it's not a real path.
26449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26451      # a path prefixed by /cygdrive for fixpath to work.
26452      new_path="$CYGWIN_ROOT_PATH$input_path"
26453    fi
26454  fi
26455
26456
26457  if test "x$path" != "x$new_path"; then
26458    BOOT_JDK="$new_path"
26459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26461  fi
26462
26463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26464
26465  path="$BOOT_JDK"
26466  has_colon=`$ECHO $path | $GREP ^.:`
26467  new_path="$path"
26468  if test "x$has_colon" = x; then
26469    # Not in mixed or Windows style, start by that.
26470    new_path=`cmd //c echo $path`
26471  fi
26472
26473
26474  input_path="$new_path"
26475  # Check if we need to convert this using DOS-style short mode. If the path
26476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26477  # take no chances and rewrite it.
26478  # Note: m4 eats our [], so we need to use [ and ] instead.
26479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26480  if test "x$has_forbidden_chars" != x; then
26481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26483  fi
26484
26485
26486  windows_path="$new_path"
26487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488    unix_path=`$CYGPATH -u "$windows_path"`
26489    new_path="$unix_path"
26490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26492    new_path="$unix_path"
26493  fi
26494
26495  if test "x$path" != "x$new_path"; then
26496    BOOT_JDK="$new_path"
26497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26499  fi
26500
26501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26503
26504    else
26505      # We're on a unix platform. Hooray! :)
26506      path="$BOOT_JDK"
26507      has_space=`$ECHO "$path" | $GREP " "`
26508      if test "x$has_space" != x; then
26509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26512      fi
26513
26514      # Use eval to expand a potential ~
26515      eval path="$path"
26516      if test ! -f "$path" && test ! -d "$path"; then
26517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26518      fi
26519
26520      if test -d "$path"; then
26521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26522      else
26523        dir="`$DIRNAME "$path"`"
26524        base="`$BASENAME "$path"`"
26525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26526      fi
26527    fi
26528  fi
26529
26530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26531$as_echo_n "checking for Boot JDK... " >&6; }
26532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26533$as_echo "$BOOT_JDK" >&6; }
26534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26535$as_echo_n "checking Boot JDK version... " >&6; }
26536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26538$as_echo "$BOOT_JDK_VERSION" >&6; }
26539          fi # end check jdk version
26540        fi # end check javac
26541      fi # end check java
26542    fi # end check boot jdk found
26543  fi
26544
26545    done
26546  fi
26547
26548  fi
26549
26550
26551    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26552    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26553      # Do we have a bin/java?
26554      if test ! -x "$BOOT_JDK/bin/java"; then
26555        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26557        BOOT_JDK_FOUND=no
26558      else
26559        # Do we have a bin/javac?
26560        if test ! -x "$BOOT_JDK/bin/javac"; then
26561          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26563          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26564$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26565          BOOT_JDK_FOUND=no
26566        else
26567          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26568          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26569
26570          # Extra M4 quote needed to protect [] in grep expression.
26571          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26572          if test "x$FOUND_CORRECT_VERSION" = x; then
26573            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26575            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26576$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26577            BOOT_JDK_FOUND=no
26578          else
26579            # We're done! :-)
26580            BOOT_JDK_FOUND=yes
26581
26582  # Only process if variable expands to non-empty
26583
26584  if test "x$BOOT_JDK" != x; then
26585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26586
26587  # Input might be given as Windows format, start by converting to
26588  # unix format.
26589  path="$BOOT_JDK"
26590  new_path=`$CYGPATH -u "$path"`
26591
26592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26595  # "foo.exe" is OK but "foo" is an error.
26596  #
26597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26598  # It is also a way to make sure we got the proper file name for the real test later on.
26599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26600  if test "x$test_shortpath" = x; then
26601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26603    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26604  fi
26605
26606  # Call helper function which possibly converts this using DOS-style short mode.
26607  # If so, the updated path is stored in $new_path.
26608
26609  input_path="$new_path"
26610  # Check if we need to convert this using DOS-style short mode. If the path
26611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26612  # take no chances and rewrite it.
26613  # Note: m4 eats our [], so we need to use [ and ] instead.
26614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26615  if test "x$has_forbidden_chars" != x; then
26616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26620      # Going to short mode and back again did indeed matter. Since short mode is
26621      # case insensitive, let's make it lowercase to improve readability.
26622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26623      # Now convert it back to Unix-style (cygpath)
26624      input_path=`$CYGPATH -u "$shortmode_path"`
26625      new_path="$input_path"
26626    fi
26627  fi
26628
26629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26630  if test "x$test_cygdrive_prefix" = x; then
26631    # As a simple fix, exclude /usr/bin since it's not a real path.
26632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26634      # a path prefixed by /cygdrive for fixpath to work.
26635      new_path="$CYGWIN_ROOT_PATH$input_path"
26636    fi
26637  fi
26638
26639
26640  if test "x$path" != "x$new_path"; then
26641    BOOT_JDK="$new_path"
26642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26644  fi
26645
26646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26647
26648  path="$BOOT_JDK"
26649  has_colon=`$ECHO $path | $GREP ^.:`
26650  new_path="$path"
26651  if test "x$has_colon" = x; then
26652    # Not in mixed or Windows style, start by that.
26653    new_path=`cmd //c echo $path`
26654  fi
26655
26656
26657  input_path="$new_path"
26658  # Check if we need to convert this using DOS-style short mode. If the path
26659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26660  # take no chances and rewrite it.
26661  # Note: m4 eats our [], so we need to use [ and ] instead.
26662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26663  if test "x$has_forbidden_chars" != x; then
26664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26666  fi
26667
26668
26669  windows_path="$new_path"
26670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26671    unix_path=`$CYGPATH -u "$windows_path"`
26672    new_path="$unix_path"
26673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26675    new_path="$unix_path"
26676  fi
26677
26678  if test "x$path" != "x$new_path"; then
26679    BOOT_JDK="$new_path"
26680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26682  fi
26683
26684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26686
26687    else
26688      # We're on a unix platform. Hooray! :)
26689      path="$BOOT_JDK"
26690      has_space=`$ECHO "$path" | $GREP " "`
26691      if test "x$has_space" != x; then
26692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26695      fi
26696
26697      # Use eval to expand a potential ~
26698      eval path="$path"
26699      if test ! -f "$path" && test ! -d "$path"; then
26700        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26701      fi
26702
26703      if test -d "$path"; then
26704        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26705      else
26706        dir="`$DIRNAME "$path"`"
26707        base="`$BASENAME "$path"`"
26708        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26709      fi
26710    fi
26711  fi
26712
26713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26714$as_echo_n "checking for Boot JDK... " >&6; }
26715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26716$as_echo "$BOOT_JDK" >&6; }
26717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26718$as_echo_n "checking Boot JDK version... " >&6; }
26719            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26721$as_echo "$BOOT_JDK_VERSION" >&6; }
26722          fi # end check jdk version
26723        fi # end check javac
26724      fi # end check java
26725    fi # end check boot jdk found
26726  fi
26727
26728
26729  if test "x$BOOT_JDK_FOUND" = xno; then
26730    # Now execute the test
26731
26732  if test "x$ProgramFiles" != x; then
26733    VIRTUAL_DIR="$ProgramFiles/Java"
26734
26735  windows_path="$VIRTUAL_DIR"
26736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26737    unix_path=`$CYGPATH -u "$windows_path"`
26738    VIRTUAL_DIR="$unix_path"
26739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26741    VIRTUAL_DIR="$unix_path"
26742  fi
26743
26744
26745  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26746  BOOT_JDK_SUFFIX=""
26747  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26748  if test "x$ALL_JDKS_FOUND" != x; then
26749    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26750
26751  if test "x$BOOT_JDK_FOUND" = xno; then
26752    # Now execute the test
26753
26754        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26755        if test -d "$BOOT_JDK"; then
26756          BOOT_JDK_FOUND=maybe
26757          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26758$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26759        fi
26760
26761
26762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26764      # Do we have a bin/java?
26765      if test ! -x "$BOOT_JDK/bin/java"; then
26766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26768        BOOT_JDK_FOUND=no
26769      else
26770        # Do we have a bin/javac?
26771        if test ! -x "$BOOT_JDK/bin/javac"; then
26772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26776          BOOT_JDK_FOUND=no
26777        else
26778          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26779          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26780
26781          # Extra M4 quote needed to protect [] in grep expression.
26782          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26783          if test "x$FOUND_CORRECT_VERSION" = x; then
26784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26787$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26788            BOOT_JDK_FOUND=no
26789          else
26790            # We're done! :-)
26791            BOOT_JDK_FOUND=yes
26792
26793  # Only process if variable expands to non-empty
26794
26795  if test "x$BOOT_JDK" != x; then
26796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26797
26798  # Input might be given as Windows format, start by converting to
26799  # unix format.
26800  path="$BOOT_JDK"
26801  new_path=`$CYGPATH -u "$path"`
26802
26803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26806  # "foo.exe" is OK but "foo" is an error.
26807  #
26808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26809  # It is also a way to make sure we got the proper file name for the real test later on.
26810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26811  if test "x$test_shortpath" = x; then
26812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26814    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26815  fi
26816
26817  # Call helper function which possibly converts this using DOS-style short mode.
26818  # If so, the updated path is stored in $new_path.
26819
26820  input_path="$new_path"
26821  # Check if we need to convert this using DOS-style short mode. If the path
26822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26823  # take no chances and rewrite it.
26824  # Note: m4 eats our [], so we need to use [ and ] instead.
26825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26826  if test "x$has_forbidden_chars" != x; then
26827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26831      # Going to short mode and back again did indeed matter. Since short mode is
26832      # case insensitive, let's make it lowercase to improve readability.
26833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26834      # Now convert it back to Unix-style (cygpath)
26835      input_path=`$CYGPATH -u "$shortmode_path"`
26836      new_path="$input_path"
26837    fi
26838  fi
26839
26840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26841  if test "x$test_cygdrive_prefix" = x; then
26842    # As a simple fix, exclude /usr/bin since it's not a real path.
26843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26845      # a path prefixed by /cygdrive for fixpath to work.
26846      new_path="$CYGWIN_ROOT_PATH$input_path"
26847    fi
26848  fi
26849
26850
26851  if test "x$path" != "x$new_path"; then
26852    BOOT_JDK="$new_path"
26853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26855  fi
26856
26857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26858
26859  path="$BOOT_JDK"
26860  has_colon=`$ECHO $path | $GREP ^.:`
26861  new_path="$path"
26862  if test "x$has_colon" = x; then
26863    # Not in mixed or Windows style, start by that.
26864    new_path=`cmd //c echo $path`
26865  fi
26866
26867
26868  input_path="$new_path"
26869  # Check if we need to convert this using DOS-style short mode. If the path
26870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26871  # take no chances and rewrite it.
26872  # Note: m4 eats our [], so we need to use [ and ] instead.
26873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26874  if test "x$has_forbidden_chars" != x; then
26875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26877  fi
26878
26879
26880  windows_path="$new_path"
26881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26882    unix_path=`$CYGPATH -u "$windows_path"`
26883    new_path="$unix_path"
26884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26886    new_path="$unix_path"
26887  fi
26888
26889  if test "x$path" != "x$new_path"; then
26890    BOOT_JDK="$new_path"
26891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26893  fi
26894
26895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26897
26898    else
26899      # We're on a unix platform. Hooray! :)
26900      path="$BOOT_JDK"
26901      has_space=`$ECHO "$path" | $GREP " "`
26902      if test "x$has_space" != x; then
26903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26904$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26906      fi
26907
26908      # Use eval to expand a potential ~
26909      eval path="$path"
26910      if test ! -f "$path" && test ! -d "$path"; then
26911        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26912      fi
26913
26914      if test -d "$path"; then
26915        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26916      else
26917        dir="`$DIRNAME "$path"`"
26918        base="`$BASENAME "$path"`"
26919        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26920      fi
26921    fi
26922  fi
26923
26924            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26925$as_echo_n "checking for Boot JDK... " >&6; }
26926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26927$as_echo "$BOOT_JDK" >&6; }
26928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26929$as_echo_n "checking Boot JDK version... " >&6; }
26930            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26932$as_echo "$BOOT_JDK_VERSION" >&6; }
26933          fi # end check jdk version
26934        fi # end check javac
26935      fi # end check java
26936    fi # end check boot jdk found
26937  fi
26938
26939    done
26940  fi
26941
26942  fi
26943
26944
26945    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26946    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26947      # Do we have a bin/java?
26948      if test ! -x "$BOOT_JDK/bin/java"; then
26949        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26951        BOOT_JDK_FOUND=no
26952      else
26953        # Do we have a bin/javac?
26954        if test ! -x "$BOOT_JDK/bin/javac"; then
26955          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26957          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26958$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26959          BOOT_JDK_FOUND=no
26960        else
26961          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26962          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26963
26964          # Extra M4 quote needed to protect [] in grep expression.
26965          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26966          if test "x$FOUND_CORRECT_VERSION" = x; then
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26970$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26971            BOOT_JDK_FOUND=no
26972          else
26973            # We're done! :-)
26974            BOOT_JDK_FOUND=yes
26975
26976  # Only process if variable expands to non-empty
26977
26978  if test "x$BOOT_JDK" != x; then
26979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26980
26981  # Input might be given as Windows format, start by converting to
26982  # unix format.
26983  path="$BOOT_JDK"
26984  new_path=`$CYGPATH -u "$path"`
26985
26986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26989  # "foo.exe" is OK but "foo" is an error.
26990  #
26991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26992  # It is also a way to make sure we got the proper file name for the real test later on.
26993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26994  if test "x$test_shortpath" = x; then
26995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26998  fi
26999
27000  # Call helper function which possibly converts this using DOS-style short mode.
27001  # If so, the updated path is stored in $new_path.
27002
27003  input_path="$new_path"
27004  # Check if we need to convert this using DOS-style short mode. If the path
27005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27006  # take no chances and rewrite it.
27007  # Note: m4 eats our [], so we need to use [ and ] instead.
27008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27009  if test "x$has_forbidden_chars" != x; then
27010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27014      # Going to short mode and back again did indeed matter. Since short mode is
27015      # case insensitive, let's make it lowercase to improve readability.
27016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27017      # Now convert it back to Unix-style (cygpath)
27018      input_path=`$CYGPATH -u "$shortmode_path"`
27019      new_path="$input_path"
27020    fi
27021  fi
27022
27023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27024  if test "x$test_cygdrive_prefix" = x; then
27025    # As a simple fix, exclude /usr/bin since it's not a real path.
27026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27028      # a path prefixed by /cygdrive for fixpath to work.
27029      new_path="$CYGWIN_ROOT_PATH$input_path"
27030    fi
27031  fi
27032
27033
27034  if test "x$path" != "x$new_path"; then
27035    BOOT_JDK="$new_path"
27036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27038  fi
27039
27040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27041
27042  path="$BOOT_JDK"
27043  has_colon=`$ECHO $path | $GREP ^.:`
27044  new_path="$path"
27045  if test "x$has_colon" = x; then
27046    # Not in mixed or Windows style, start by that.
27047    new_path=`cmd //c echo $path`
27048  fi
27049
27050
27051  input_path="$new_path"
27052  # Check if we need to convert this using DOS-style short mode. If the path
27053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27054  # take no chances and rewrite it.
27055  # Note: m4 eats our [], so we need to use [ and ] instead.
27056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27057  if test "x$has_forbidden_chars" != x; then
27058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27060  fi
27061
27062
27063  windows_path="$new_path"
27064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27065    unix_path=`$CYGPATH -u "$windows_path"`
27066    new_path="$unix_path"
27067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27069    new_path="$unix_path"
27070  fi
27071
27072  if test "x$path" != "x$new_path"; then
27073    BOOT_JDK="$new_path"
27074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27076  fi
27077
27078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27080
27081    else
27082      # We're on a unix platform. Hooray! :)
27083      path="$BOOT_JDK"
27084      has_space=`$ECHO "$path" | $GREP " "`
27085      if test "x$has_space" != x; then
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27089      fi
27090
27091      # Use eval to expand a potential ~
27092      eval path="$path"
27093      if test ! -f "$path" && test ! -d "$path"; then
27094        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27095      fi
27096
27097      if test -d "$path"; then
27098        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27099      else
27100        dir="`$DIRNAME "$path"`"
27101        base="`$BASENAME "$path"`"
27102        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27103      fi
27104    fi
27105  fi
27106
27107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27108$as_echo_n "checking for Boot JDK... " >&6; }
27109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27110$as_echo "$BOOT_JDK" >&6; }
27111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27112$as_echo_n "checking Boot JDK version... " >&6; }
27113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27115$as_echo "$BOOT_JDK_VERSION" >&6; }
27116          fi # end check jdk version
27117        fi # end check javac
27118      fi # end check java
27119    fi # end check boot jdk found
27120  fi
27121
27122
27123  if test "x$BOOT_JDK_FOUND" = xno; then
27124    # Now execute the test
27125
27126  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27127  BOOT_JDK_SUFFIX=""
27128  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27129  if test "x$ALL_JDKS_FOUND" != x; then
27130    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27131
27132  if test "x$BOOT_JDK_FOUND" = xno; then
27133    # Now execute the test
27134
27135        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27136        if test -d "$BOOT_JDK"; then
27137          BOOT_JDK_FOUND=maybe
27138          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27139$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27140        fi
27141
27142
27143    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27144    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27145      # Do we have a bin/java?
27146      if test ! -x "$BOOT_JDK/bin/java"; then
27147        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27149        BOOT_JDK_FOUND=no
27150      else
27151        # Do we have a bin/javac?
27152        if test ! -x "$BOOT_JDK/bin/javac"; then
27153          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27155          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27156$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27157          BOOT_JDK_FOUND=no
27158        else
27159          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27160          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27161
27162          # Extra M4 quote needed to protect [] in grep expression.
27163          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27164          if test "x$FOUND_CORRECT_VERSION" = x; then
27165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27167            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27168$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27169            BOOT_JDK_FOUND=no
27170          else
27171            # We're done! :-)
27172            BOOT_JDK_FOUND=yes
27173
27174  # Only process if variable expands to non-empty
27175
27176  if test "x$BOOT_JDK" != x; then
27177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27178
27179  # Input might be given as Windows format, start by converting to
27180  # unix format.
27181  path="$BOOT_JDK"
27182  new_path=`$CYGPATH -u "$path"`
27183
27184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27187  # "foo.exe" is OK but "foo" is an error.
27188  #
27189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27190  # It is also a way to make sure we got the proper file name for the real test later on.
27191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27192  if test "x$test_shortpath" = x; then
27193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27195    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27196  fi
27197
27198  # Call helper function which possibly converts this using DOS-style short mode.
27199  # If so, the updated path is stored in $new_path.
27200
27201  input_path="$new_path"
27202  # Check if we need to convert this using DOS-style short mode. If the path
27203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27204  # take no chances and rewrite it.
27205  # Note: m4 eats our [], so we need to use [ and ] instead.
27206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27207  if test "x$has_forbidden_chars" != x; then
27208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27212      # Going to short mode and back again did indeed matter. Since short mode is
27213      # case insensitive, let's make it lowercase to improve readability.
27214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27215      # Now convert it back to Unix-style (cygpath)
27216      input_path=`$CYGPATH -u "$shortmode_path"`
27217      new_path="$input_path"
27218    fi
27219  fi
27220
27221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27222  if test "x$test_cygdrive_prefix" = x; then
27223    # As a simple fix, exclude /usr/bin since it's not a real path.
27224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27226      # a path prefixed by /cygdrive for fixpath to work.
27227      new_path="$CYGWIN_ROOT_PATH$input_path"
27228    fi
27229  fi
27230
27231
27232  if test "x$path" != "x$new_path"; then
27233    BOOT_JDK="$new_path"
27234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27236  fi
27237
27238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27239
27240  path="$BOOT_JDK"
27241  has_colon=`$ECHO $path | $GREP ^.:`
27242  new_path="$path"
27243  if test "x$has_colon" = x; then
27244    # Not in mixed or Windows style, start by that.
27245    new_path=`cmd //c echo $path`
27246  fi
27247
27248
27249  input_path="$new_path"
27250  # Check if we need to convert this using DOS-style short mode. If the path
27251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27252  # take no chances and rewrite it.
27253  # Note: m4 eats our [], so we need to use [ and ] instead.
27254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27255  if test "x$has_forbidden_chars" != x; then
27256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27258  fi
27259
27260
27261  windows_path="$new_path"
27262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27263    unix_path=`$CYGPATH -u "$windows_path"`
27264    new_path="$unix_path"
27265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27267    new_path="$unix_path"
27268  fi
27269
27270  if test "x$path" != "x$new_path"; then
27271    BOOT_JDK="$new_path"
27272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27274  fi
27275
27276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27278
27279    else
27280      # We're on a unix platform. Hooray! :)
27281      path="$BOOT_JDK"
27282      has_space=`$ECHO "$path" | $GREP " "`
27283      if test "x$has_space" != x; then
27284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27287      fi
27288
27289      # Use eval to expand a potential ~
27290      eval path="$path"
27291      if test ! -f "$path" && test ! -d "$path"; then
27292        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27293      fi
27294
27295      if test -d "$path"; then
27296        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27297      else
27298        dir="`$DIRNAME "$path"`"
27299        base="`$BASENAME "$path"`"
27300        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27301      fi
27302    fi
27303  fi
27304
27305            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27306$as_echo_n "checking for Boot JDK... " >&6; }
27307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27308$as_echo "$BOOT_JDK" >&6; }
27309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27310$as_echo_n "checking Boot JDK version... " >&6; }
27311            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27313$as_echo "$BOOT_JDK_VERSION" >&6; }
27314          fi # end check jdk version
27315        fi # end check javac
27316      fi # end check java
27317    fi # end check boot jdk found
27318  fi
27319
27320    done
27321  fi
27322
27323
27324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27326      # Do we have a bin/java?
27327      if test ! -x "$BOOT_JDK/bin/java"; then
27328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27330        BOOT_JDK_FOUND=no
27331      else
27332        # Do we have a bin/javac?
27333        if test ! -x "$BOOT_JDK/bin/javac"; then
27334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27338          BOOT_JDK_FOUND=no
27339        else
27340          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27341          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27342
27343          # Extra M4 quote needed to protect [] in grep expression.
27344          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27345          if test "x$FOUND_CORRECT_VERSION" = x; then
27346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27348            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27349$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27350            BOOT_JDK_FOUND=no
27351          else
27352            # We're done! :-)
27353            BOOT_JDK_FOUND=yes
27354
27355  # Only process if variable expands to non-empty
27356
27357  if test "x$BOOT_JDK" != x; then
27358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27359
27360  # Input might be given as Windows format, start by converting to
27361  # unix format.
27362  path="$BOOT_JDK"
27363  new_path=`$CYGPATH -u "$path"`
27364
27365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27368  # "foo.exe" is OK but "foo" is an error.
27369  #
27370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27371  # It is also a way to make sure we got the proper file name for the real test later on.
27372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27373  if test "x$test_shortpath" = x; then
27374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27377  fi
27378
27379  # Call helper function which possibly converts this using DOS-style short mode.
27380  # If so, the updated path is stored in $new_path.
27381
27382  input_path="$new_path"
27383  # Check if we need to convert this using DOS-style short mode. If the path
27384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27385  # take no chances and rewrite it.
27386  # Note: m4 eats our [], so we need to use [ and ] instead.
27387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27388  if test "x$has_forbidden_chars" != x; then
27389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27393      # Going to short mode and back again did indeed matter. Since short mode is
27394      # case insensitive, let's make it lowercase to improve readability.
27395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27396      # Now convert it back to Unix-style (cygpath)
27397      input_path=`$CYGPATH -u "$shortmode_path"`
27398      new_path="$input_path"
27399    fi
27400  fi
27401
27402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27403  if test "x$test_cygdrive_prefix" = x; then
27404    # As a simple fix, exclude /usr/bin since it's not a real path.
27405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27407      # a path prefixed by /cygdrive for fixpath to work.
27408      new_path="$CYGWIN_ROOT_PATH$input_path"
27409    fi
27410  fi
27411
27412
27413  if test "x$path" != "x$new_path"; then
27414    BOOT_JDK="$new_path"
27415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27417  fi
27418
27419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27420
27421  path="$BOOT_JDK"
27422  has_colon=`$ECHO $path | $GREP ^.:`
27423  new_path="$path"
27424  if test "x$has_colon" = x; then
27425    # Not in mixed or Windows style, start by that.
27426    new_path=`cmd //c echo $path`
27427  fi
27428
27429
27430  input_path="$new_path"
27431  # Check if we need to convert this using DOS-style short mode. If the path
27432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27433  # take no chances and rewrite it.
27434  # Note: m4 eats our [], so we need to use [ and ] instead.
27435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27436  if test "x$has_forbidden_chars" != x; then
27437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27439  fi
27440
27441
27442  windows_path="$new_path"
27443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27444    unix_path=`$CYGPATH -u "$windows_path"`
27445    new_path="$unix_path"
27446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27448    new_path="$unix_path"
27449  fi
27450
27451  if test "x$path" != "x$new_path"; then
27452    BOOT_JDK="$new_path"
27453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27455  fi
27456
27457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27459
27460    else
27461      # We're on a unix platform. Hooray! :)
27462      path="$BOOT_JDK"
27463      has_space=`$ECHO "$path" | $GREP " "`
27464      if test "x$has_space" != x; then
27465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27468      fi
27469
27470      # Use eval to expand a potential ~
27471      eval path="$path"
27472      if test ! -f "$path" && test ! -d "$path"; then
27473        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27474      fi
27475
27476      if test -d "$path"; then
27477        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27478      else
27479        dir="`$DIRNAME "$path"`"
27480        base="`$BASENAME "$path"`"
27481        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27482      fi
27483    fi
27484  fi
27485
27486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27487$as_echo_n "checking for Boot JDK... " >&6; }
27488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27489$as_echo "$BOOT_JDK" >&6; }
27490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27491$as_echo_n "checking Boot JDK version... " >&6; }
27492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27494$as_echo "$BOOT_JDK_VERSION" >&6; }
27495          fi # end check jdk version
27496        fi # end check javac
27497      fi # end check java
27498    fi # end check boot jdk found
27499  fi
27500
27501  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27502
27503  if test "x$BOOT_JDK_FOUND" = xno; then
27504    # Now execute the test
27505
27506  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27507  BOOT_JDK_SUFFIX="/Contents/Home"
27508  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27509  if test "x$ALL_JDKS_FOUND" != x; then
27510    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27511
27512  if test "x$BOOT_JDK_FOUND" = xno; then
27513    # Now execute the test
27514
27515        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27516        if test -d "$BOOT_JDK"; then
27517          BOOT_JDK_FOUND=maybe
27518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27519$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27520        fi
27521
27522
27523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27525      # Do we have a bin/java?
27526      if test ! -x "$BOOT_JDK/bin/java"; then
27527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27529        BOOT_JDK_FOUND=no
27530      else
27531        # Do we have a bin/javac?
27532        if test ! -x "$BOOT_JDK/bin/javac"; then
27533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27537          BOOT_JDK_FOUND=no
27538        else
27539          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27540          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27541
27542          # Extra M4 quote needed to protect [] in grep expression.
27543          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27544          if test "x$FOUND_CORRECT_VERSION" = x; then
27545            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27547            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27548$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27549            BOOT_JDK_FOUND=no
27550          else
27551            # We're done! :-)
27552            BOOT_JDK_FOUND=yes
27553
27554  # Only process if variable expands to non-empty
27555
27556  if test "x$BOOT_JDK" != x; then
27557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27558
27559  # Input might be given as Windows format, start by converting to
27560  # unix format.
27561  path="$BOOT_JDK"
27562  new_path=`$CYGPATH -u "$path"`
27563
27564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27567  # "foo.exe" is OK but "foo" is an error.
27568  #
27569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27570  # It is also a way to make sure we got the proper file name for the real test later on.
27571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27572  if test "x$test_shortpath" = x; then
27573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27575    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27576  fi
27577
27578  # Call helper function which possibly converts this using DOS-style short mode.
27579  # If so, the updated path is stored in $new_path.
27580
27581  input_path="$new_path"
27582  # Check if we need to convert this using DOS-style short mode. If the path
27583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27584  # take no chances and rewrite it.
27585  # Note: m4 eats our [], so we need to use [ and ] instead.
27586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27587  if test "x$has_forbidden_chars" != x; then
27588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27592      # Going to short mode and back again did indeed matter. Since short mode is
27593      # case insensitive, let's make it lowercase to improve readability.
27594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27595      # Now convert it back to Unix-style (cygpath)
27596      input_path=`$CYGPATH -u "$shortmode_path"`
27597      new_path="$input_path"
27598    fi
27599  fi
27600
27601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27602  if test "x$test_cygdrive_prefix" = x; then
27603    # As a simple fix, exclude /usr/bin since it's not a real path.
27604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27606      # a path prefixed by /cygdrive for fixpath to work.
27607      new_path="$CYGWIN_ROOT_PATH$input_path"
27608    fi
27609  fi
27610
27611
27612  if test "x$path" != "x$new_path"; then
27613    BOOT_JDK="$new_path"
27614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27616  fi
27617
27618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27619
27620  path="$BOOT_JDK"
27621  has_colon=`$ECHO $path | $GREP ^.:`
27622  new_path="$path"
27623  if test "x$has_colon" = x; then
27624    # Not in mixed or Windows style, start by that.
27625    new_path=`cmd //c echo $path`
27626  fi
27627
27628
27629  input_path="$new_path"
27630  # Check if we need to convert this using DOS-style short mode. If the path
27631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27632  # take no chances and rewrite it.
27633  # Note: m4 eats our [], so we need to use [ and ] instead.
27634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27635  if test "x$has_forbidden_chars" != x; then
27636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27638  fi
27639
27640
27641  windows_path="$new_path"
27642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27643    unix_path=`$CYGPATH -u "$windows_path"`
27644    new_path="$unix_path"
27645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27647    new_path="$unix_path"
27648  fi
27649
27650  if test "x$path" != "x$new_path"; then
27651    BOOT_JDK="$new_path"
27652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27654  fi
27655
27656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27658
27659    else
27660      # We're on a unix platform. Hooray! :)
27661      path="$BOOT_JDK"
27662      has_space=`$ECHO "$path" | $GREP " "`
27663      if test "x$has_space" != x; then
27664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27665$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27667      fi
27668
27669      # Use eval to expand a potential ~
27670      eval path="$path"
27671      if test ! -f "$path" && test ! -d "$path"; then
27672        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27673      fi
27674
27675      if test -d "$path"; then
27676        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27677      else
27678        dir="`$DIRNAME "$path"`"
27679        base="`$BASENAME "$path"`"
27680        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27681      fi
27682    fi
27683  fi
27684
27685            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27686$as_echo_n "checking for Boot JDK... " >&6; }
27687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27688$as_echo "$BOOT_JDK" >&6; }
27689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27690$as_echo_n "checking Boot JDK version... " >&6; }
27691            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27692            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27693$as_echo "$BOOT_JDK_VERSION" >&6; }
27694          fi # end check jdk version
27695        fi # end check javac
27696      fi # end check java
27697    fi # end check boot jdk found
27698  fi
27699
27700    done
27701  fi
27702
27703
27704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27706      # Do we have a bin/java?
27707      if test ! -x "$BOOT_JDK/bin/java"; then
27708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27710        BOOT_JDK_FOUND=no
27711      else
27712        # Do we have a bin/javac?
27713        if test ! -x "$BOOT_JDK/bin/javac"; then
27714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27718          BOOT_JDK_FOUND=no
27719        else
27720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27722
27723          # Extra M4 quote needed to protect [] in grep expression.
27724          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27725          if test "x$FOUND_CORRECT_VERSION" = x; then
27726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27730            BOOT_JDK_FOUND=no
27731          else
27732            # We're done! :-)
27733            BOOT_JDK_FOUND=yes
27734
27735  # Only process if variable expands to non-empty
27736
27737  if test "x$BOOT_JDK" != x; then
27738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27739
27740  # Input might be given as Windows format, start by converting to
27741  # unix format.
27742  path="$BOOT_JDK"
27743  new_path=`$CYGPATH -u "$path"`
27744
27745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27748  # "foo.exe" is OK but "foo" is an error.
27749  #
27750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27751  # It is also a way to make sure we got the proper file name for the real test later on.
27752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27753  if test "x$test_shortpath" = x; then
27754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27757  fi
27758
27759  # Call helper function which possibly converts this using DOS-style short mode.
27760  # If so, the updated path is stored in $new_path.
27761
27762  input_path="$new_path"
27763  # Check if we need to convert this using DOS-style short mode. If the path
27764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27765  # take no chances and rewrite it.
27766  # Note: m4 eats our [], so we need to use [ and ] instead.
27767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27768  if test "x$has_forbidden_chars" != x; then
27769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27773      # Going to short mode and back again did indeed matter. Since short mode is
27774      # case insensitive, let's make it lowercase to improve readability.
27775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27776      # Now convert it back to Unix-style (cygpath)
27777      input_path=`$CYGPATH -u "$shortmode_path"`
27778      new_path="$input_path"
27779    fi
27780  fi
27781
27782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27783  if test "x$test_cygdrive_prefix" = x; then
27784    # As a simple fix, exclude /usr/bin since it's not a real path.
27785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27787      # a path prefixed by /cygdrive for fixpath to work.
27788      new_path="$CYGWIN_ROOT_PATH$input_path"
27789    fi
27790  fi
27791
27792
27793  if test "x$path" != "x$new_path"; then
27794    BOOT_JDK="$new_path"
27795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27797  fi
27798
27799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27800
27801  path="$BOOT_JDK"
27802  has_colon=`$ECHO $path | $GREP ^.:`
27803  new_path="$path"
27804  if test "x$has_colon" = x; then
27805    # Not in mixed or Windows style, start by that.
27806    new_path=`cmd //c echo $path`
27807  fi
27808
27809
27810  input_path="$new_path"
27811  # Check if we need to convert this using DOS-style short mode. If the path
27812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27813  # take no chances and rewrite it.
27814  # Note: m4 eats our [], so we need to use [ and ] instead.
27815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27816  if test "x$has_forbidden_chars" != x; then
27817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27819  fi
27820
27821
27822  windows_path="$new_path"
27823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27824    unix_path=`$CYGPATH -u "$windows_path"`
27825    new_path="$unix_path"
27826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27828    new_path="$unix_path"
27829  fi
27830
27831  if test "x$path" != "x$new_path"; then
27832    BOOT_JDK="$new_path"
27833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27835  fi
27836
27837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27839
27840    else
27841      # We're on a unix platform. Hooray! :)
27842      path="$BOOT_JDK"
27843      has_space=`$ECHO "$path" | $GREP " "`
27844      if test "x$has_space" != x; then
27845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27848      fi
27849
27850      # Use eval to expand a potential ~
27851      eval path="$path"
27852      if test ! -f "$path" && test ! -d "$path"; then
27853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27854      fi
27855
27856      if test -d "$path"; then
27857        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27858      else
27859        dir="`$DIRNAME "$path"`"
27860        base="`$BASENAME "$path"`"
27861        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27862      fi
27863    fi
27864  fi
27865
27866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27867$as_echo_n "checking for Boot JDK... " >&6; }
27868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27869$as_echo "$BOOT_JDK" >&6; }
27870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27871$as_echo_n "checking Boot JDK version... " >&6; }
27872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27874$as_echo "$BOOT_JDK_VERSION" >&6; }
27875          fi # end check jdk version
27876        fi # end check javac
27877      fi # end check java
27878    fi # end check boot jdk found
27879  fi
27880
27881
27882  if test "x$BOOT_JDK_FOUND" = xno; then
27883    # Now execute the test
27884
27885  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27886  BOOT_JDK_SUFFIX="/Contents/Home"
27887  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27888  if test "x$ALL_JDKS_FOUND" != x; then
27889    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27890
27891  if test "x$BOOT_JDK_FOUND" = xno; then
27892    # Now execute the test
27893
27894        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27895        if test -d "$BOOT_JDK"; then
27896          BOOT_JDK_FOUND=maybe
27897          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27898$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27899        fi
27900
27901
27902    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27903    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27904      # Do we have a bin/java?
27905      if test ! -x "$BOOT_JDK/bin/java"; then
27906        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27908        BOOT_JDK_FOUND=no
27909      else
27910        # Do we have a bin/javac?
27911        if test ! -x "$BOOT_JDK/bin/javac"; then
27912          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27914          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27915$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27916          BOOT_JDK_FOUND=no
27917        else
27918          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27919          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27920
27921          # Extra M4 quote needed to protect [] in grep expression.
27922          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27923          if test "x$FOUND_CORRECT_VERSION" = x; then
27924            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27926            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27927$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27928            BOOT_JDK_FOUND=no
27929          else
27930            # We're done! :-)
27931            BOOT_JDK_FOUND=yes
27932
27933  # Only process if variable expands to non-empty
27934
27935  if test "x$BOOT_JDK" != x; then
27936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27937
27938  # Input might be given as Windows format, start by converting to
27939  # unix format.
27940  path="$BOOT_JDK"
27941  new_path=`$CYGPATH -u "$path"`
27942
27943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27946  # "foo.exe" is OK but "foo" is an error.
27947  #
27948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27949  # It is also a way to make sure we got the proper file name for the real test later on.
27950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27951  if test "x$test_shortpath" = x; then
27952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27955  fi
27956
27957  # Call helper function which possibly converts this using DOS-style short mode.
27958  # If so, the updated path is stored in $new_path.
27959
27960  input_path="$new_path"
27961  # Check if we need to convert this using DOS-style short mode. If the path
27962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27963  # take no chances and rewrite it.
27964  # Note: m4 eats our [], so we need to use [ and ] instead.
27965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27966  if test "x$has_forbidden_chars" != x; then
27967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27971      # Going to short mode and back again did indeed matter. Since short mode is
27972      # case insensitive, let's make it lowercase to improve readability.
27973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27974      # Now convert it back to Unix-style (cygpath)
27975      input_path=`$CYGPATH -u "$shortmode_path"`
27976      new_path="$input_path"
27977    fi
27978  fi
27979
27980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27981  if test "x$test_cygdrive_prefix" = x; then
27982    # As a simple fix, exclude /usr/bin since it's not a real path.
27983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27985      # a path prefixed by /cygdrive for fixpath to work.
27986      new_path="$CYGWIN_ROOT_PATH$input_path"
27987    fi
27988  fi
27989
27990
27991  if test "x$path" != "x$new_path"; then
27992    BOOT_JDK="$new_path"
27993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27995  fi
27996
27997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27998
27999  path="$BOOT_JDK"
28000  has_colon=`$ECHO $path | $GREP ^.:`
28001  new_path="$path"
28002  if test "x$has_colon" = x; then
28003    # Not in mixed or Windows style, start by that.
28004    new_path=`cmd //c echo $path`
28005  fi
28006
28007
28008  input_path="$new_path"
28009  # Check if we need to convert this using DOS-style short mode. If the path
28010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28011  # take no chances and rewrite it.
28012  # Note: m4 eats our [], so we need to use [ and ] instead.
28013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28014  if test "x$has_forbidden_chars" != x; then
28015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28017  fi
28018
28019
28020  windows_path="$new_path"
28021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28022    unix_path=`$CYGPATH -u "$windows_path"`
28023    new_path="$unix_path"
28024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28026    new_path="$unix_path"
28027  fi
28028
28029  if test "x$path" != "x$new_path"; then
28030    BOOT_JDK="$new_path"
28031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28033  fi
28034
28035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28037
28038    else
28039      # We're on a unix platform. Hooray! :)
28040      path="$BOOT_JDK"
28041      has_space=`$ECHO "$path" | $GREP " "`
28042      if test "x$has_space" != x; then
28043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28045        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28046      fi
28047
28048      # Use eval to expand a potential ~
28049      eval path="$path"
28050      if test ! -f "$path" && test ! -d "$path"; then
28051        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28052      fi
28053
28054      if test -d "$path"; then
28055        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28056      else
28057        dir="`$DIRNAME "$path"`"
28058        base="`$BASENAME "$path"`"
28059        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28060      fi
28061    fi
28062  fi
28063
28064            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28065$as_echo_n "checking for Boot JDK... " >&6; }
28066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28067$as_echo "$BOOT_JDK" >&6; }
28068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28069$as_echo_n "checking Boot JDK version... " >&6; }
28070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28072$as_echo "$BOOT_JDK_VERSION" >&6; }
28073          fi # end check jdk version
28074        fi # end check javac
28075      fi # end check java
28076    fi # end check boot jdk found
28077  fi
28078
28079    done
28080  fi
28081
28082
28083    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28084    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28085      # Do we have a bin/java?
28086      if test ! -x "$BOOT_JDK/bin/java"; then
28087        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28089        BOOT_JDK_FOUND=no
28090      else
28091        # Do we have a bin/javac?
28092        if test ! -x "$BOOT_JDK/bin/javac"; then
28093          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28095          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28096$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28097          BOOT_JDK_FOUND=no
28098        else
28099          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28100          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28101
28102          # Extra M4 quote needed to protect [] in grep expression.
28103          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28104          if test "x$FOUND_CORRECT_VERSION" = x; then
28105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28107            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28108$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28109            BOOT_JDK_FOUND=no
28110          else
28111            # We're done! :-)
28112            BOOT_JDK_FOUND=yes
28113
28114  # Only process if variable expands to non-empty
28115
28116  if test "x$BOOT_JDK" != x; then
28117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28118
28119  # Input might be given as Windows format, start by converting to
28120  # unix format.
28121  path="$BOOT_JDK"
28122  new_path=`$CYGPATH -u "$path"`
28123
28124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28127  # "foo.exe" is OK but "foo" is an error.
28128  #
28129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28130  # It is also a way to make sure we got the proper file name for the real test later on.
28131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28132  if test "x$test_shortpath" = x; then
28133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28134$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28135    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28136  fi
28137
28138  # Call helper function which possibly converts this using DOS-style short mode.
28139  # If so, the updated path is stored in $new_path.
28140
28141  input_path="$new_path"
28142  # Check if we need to convert this using DOS-style short mode. If the path
28143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28144  # take no chances and rewrite it.
28145  # Note: m4 eats our [], so we need to use [ and ] instead.
28146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28147  if test "x$has_forbidden_chars" != x; then
28148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28152      # Going to short mode and back again did indeed matter. Since short mode is
28153      # case insensitive, let's make it lowercase to improve readability.
28154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28155      # Now convert it back to Unix-style (cygpath)
28156      input_path=`$CYGPATH -u "$shortmode_path"`
28157      new_path="$input_path"
28158    fi
28159  fi
28160
28161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28162  if test "x$test_cygdrive_prefix" = x; then
28163    # As a simple fix, exclude /usr/bin since it's not a real path.
28164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28166      # a path prefixed by /cygdrive for fixpath to work.
28167      new_path="$CYGWIN_ROOT_PATH$input_path"
28168    fi
28169  fi
28170
28171
28172  if test "x$path" != "x$new_path"; then
28173    BOOT_JDK="$new_path"
28174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28176  fi
28177
28178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28179
28180  path="$BOOT_JDK"
28181  has_colon=`$ECHO $path | $GREP ^.:`
28182  new_path="$path"
28183  if test "x$has_colon" = x; then
28184    # Not in mixed or Windows style, start by that.
28185    new_path=`cmd //c echo $path`
28186  fi
28187
28188
28189  input_path="$new_path"
28190  # Check if we need to convert this using DOS-style short mode. If the path
28191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28192  # take no chances and rewrite it.
28193  # Note: m4 eats our [], so we need to use [ and ] instead.
28194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28195  if test "x$has_forbidden_chars" != x; then
28196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28198  fi
28199
28200
28201  windows_path="$new_path"
28202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28203    unix_path=`$CYGPATH -u "$windows_path"`
28204    new_path="$unix_path"
28205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28207    new_path="$unix_path"
28208  fi
28209
28210  if test "x$path" != "x$new_path"; then
28211    BOOT_JDK="$new_path"
28212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28214  fi
28215
28216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28218
28219    else
28220      # We're on a unix platform. Hooray! :)
28221      path="$BOOT_JDK"
28222      has_space=`$ECHO "$path" | $GREP " "`
28223      if test "x$has_space" != x; then
28224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28227      fi
28228
28229      # Use eval to expand a potential ~
28230      eval path="$path"
28231      if test ! -f "$path" && test ! -d "$path"; then
28232        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28233      fi
28234
28235      if test -d "$path"; then
28236        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28237      else
28238        dir="`$DIRNAME "$path"`"
28239        base="`$BASENAME "$path"`"
28240        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28241      fi
28242    fi
28243  fi
28244
28245            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28246$as_echo_n "checking for Boot JDK... " >&6; }
28247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28248$as_echo "$BOOT_JDK" >&6; }
28249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28250$as_echo_n "checking Boot JDK version... " >&6; }
28251            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28253$as_echo "$BOOT_JDK_VERSION" >&6; }
28254          fi # end check jdk version
28255        fi # end check javac
28256      fi # end check java
28257    fi # end check boot jdk found
28258  fi
28259
28260  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28261
28262  if test "x$BOOT_JDK_FOUND" = xno; then
28263    # Now execute the test
28264
28265  BOOT_JDK_PREFIX="/usr/lib/jvm"
28266  BOOT_JDK_SUFFIX=""
28267  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28268  if test "x$ALL_JDKS_FOUND" != x; then
28269    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28270
28271  if test "x$BOOT_JDK_FOUND" = xno; then
28272    # Now execute the test
28273
28274        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28275        if test -d "$BOOT_JDK"; then
28276          BOOT_JDK_FOUND=maybe
28277          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28278$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28279        fi
28280
28281
28282    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28283    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28284      # Do we have a bin/java?
28285      if test ! -x "$BOOT_JDK/bin/java"; then
28286        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28288        BOOT_JDK_FOUND=no
28289      else
28290        # Do we have a bin/javac?
28291        if test ! -x "$BOOT_JDK/bin/javac"; then
28292          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28294          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28295$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28296          BOOT_JDK_FOUND=no
28297        else
28298          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28299          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28300
28301          # Extra M4 quote needed to protect [] in grep expression.
28302          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28303          if test "x$FOUND_CORRECT_VERSION" = x; then
28304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28306            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28307$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28308            BOOT_JDK_FOUND=no
28309          else
28310            # We're done! :-)
28311            BOOT_JDK_FOUND=yes
28312
28313  # Only process if variable expands to non-empty
28314
28315  if test "x$BOOT_JDK" != x; then
28316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28317
28318  # Input might be given as Windows format, start by converting to
28319  # unix format.
28320  path="$BOOT_JDK"
28321  new_path=`$CYGPATH -u "$path"`
28322
28323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28326  # "foo.exe" is OK but "foo" is an error.
28327  #
28328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28329  # It is also a way to make sure we got the proper file name for the real test later on.
28330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28331  if test "x$test_shortpath" = x; then
28332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28334    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28335  fi
28336
28337  # Call helper function which possibly converts this using DOS-style short mode.
28338  # If so, the updated path is stored in $new_path.
28339
28340  input_path="$new_path"
28341  # Check if we need to convert this using DOS-style short mode. If the path
28342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28343  # take no chances and rewrite it.
28344  # Note: m4 eats our [], so we need to use [ and ] instead.
28345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28346  if test "x$has_forbidden_chars" != x; then
28347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28351      # Going to short mode and back again did indeed matter. Since short mode is
28352      # case insensitive, let's make it lowercase to improve readability.
28353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28354      # Now convert it back to Unix-style (cygpath)
28355      input_path=`$CYGPATH -u "$shortmode_path"`
28356      new_path="$input_path"
28357    fi
28358  fi
28359
28360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28361  if test "x$test_cygdrive_prefix" = x; then
28362    # As a simple fix, exclude /usr/bin since it's not a real path.
28363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28365      # a path prefixed by /cygdrive for fixpath to work.
28366      new_path="$CYGWIN_ROOT_PATH$input_path"
28367    fi
28368  fi
28369
28370
28371  if test "x$path" != "x$new_path"; then
28372    BOOT_JDK="$new_path"
28373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28375  fi
28376
28377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28378
28379  path="$BOOT_JDK"
28380  has_colon=`$ECHO $path | $GREP ^.:`
28381  new_path="$path"
28382  if test "x$has_colon" = x; then
28383    # Not in mixed or Windows style, start by that.
28384    new_path=`cmd //c echo $path`
28385  fi
28386
28387
28388  input_path="$new_path"
28389  # Check if we need to convert this using DOS-style short mode. If the path
28390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28391  # take no chances and rewrite it.
28392  # Note: m4 eats our [], so we need to use [ and ] instead.
28393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28394  if test "x$has_forbidden_chars" != x; then
28395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28397  fi
28398
28399
28400  windows_path="$new_path"
28401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28402    unix_path=`$CYGPATH -u "$windows_path"`
28403    new_path="$unix_path"
28404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28406    new_path="$unix_path"
28407  fi
28408
28409  if test "x$path" != "x$new_path"; then
28410    BOOT_JDK="$new_path"
28411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28413  fi
28414
28415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28417
28418    else
28419      # We're on a unix platform. Hooray! :)
28420      path="$BOOT_JDK"
28421      has_space=`$ECHO "$path" | $GREP " "`
28422      if test "x$has_space" != x; then
28423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28426      fi
28427
28428      # Use eval to expand a potential ~
28429      eval path="$path"
28430      if test ! -f "$path" && test ! -d "$path"; then
28431        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28432      fi
28433
28434      if test -d "$path"; then
28435        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28436      else
28437        dir="`$DIRNAME "$path"`"
28438        base="`$BASENAME "$path"`"
28439        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28440      fi
28441    fi
28442  fi
28443
28444            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28445$as_echo_n "checking for Boot JDK... " >&6; }
28446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28447$as_echo "$BOOT_JDK" >&6; }
28448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28449$as_echo_n "checking Boot JDK version... " >&6; }
28450            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28451            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28452$as_echo "$BOOT_JDK_VERSION" >&6; }
28453          fi # end check jdk version
28454        fi # end check javac
28455      fi # end check java
28456    fi # end check boot jdk found
28457  fi
28458
28459    done
28460  fi
28461
28462
28463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28465      # Do we have a bin/java?
28466      if test ! -x "$BOOT_JDK/bin/java"; then
28467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28469        BOOT_JDK_FOUND=no
28470      else
28471        # Do we have a bin/javac?
28472        if test ! -x "$BOOT_JDK/bin/javac"; then
28473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28477          BOOT_JDK_FOUND=no
28478        else
28479          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28480          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28481
28482          # Extra M4 quote needed to protect [] in grep expression.
28483          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28484          if test "x$FOUND_CORRECT_VERSION" = x; then
28485            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28487            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28488$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28489            BOOT_JDK_FOUND=no
28490          else
28491            # We're done! :-)
28492            BOOT_JDK_FOUND=yes
28493
28494  # Only process if variable expands to non-empty
28495
28496  if test "x$BOOT_JDK" != x; then
28497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28498
28499  # Input might be given as Windows format, start by converting to
28500  # unix format.
28501  path="$BOOT_JDK"
28502  new_path=`$CYGPATH -u "$path"`
28503
28504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28507  # "foo.exe" is OK but "foo" is an error.
28508  #
28509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28510  # It is also a way to make sure we got the proper file name for the real test later on.
28511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28512  if test "x$test_shortpath" = x; then
28513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28515    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28516  fi
28517
28518  # Call helper function which possibly converts this using DOS-style short mode.
28519  # If so, the updated path is stored in $new_path.
28520
28521  input_path="$new_path"
28522  # Check if we need to convert this using DOS-style short mode. If the path
28523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28524  # take no chances and rewrite it.
28525  # Note: m4 eats our [], so we need to use [ and ] instead.
28526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28527  if test "x$has_forbidden_chars" != x; then
28528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28532      # Going to short mode and back again did indeed matter. Since short mode is
28533      # case insensitive, let's make it lowercase to improve readability.
28534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28535      # Now convert it back to Unix-style (cygpath)
28536      input_path=`$CYGPATH -u "$shortmode_path"`
28537      new_path="$input_path"
28538    fi
28539  fi
28540
28541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28542  if test "x$test_cygdrive_prefix" = x; then
28543    # As a simple fix, exclude /usr/bin since it's not a real path.
28544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28546      # a path prefixed by /cygdrive for fixpath to work.
28547      new_path="$CYGWIN_ROOT_PATH$input_path"
28548    fi
28549  fi
28550
28551
28552  if test "x$path" != "x$new_path"; then
28553    BOOT_JDK="$new_path"
28554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28556  fi
28557
28558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28559
28560  path="$BOOT_JDK"
28561  has_colon=`$ECHO $path | $GREP ^.:`
28562  new_path="$path"
28563  if test "x$has_colon" = x; then
28564    # Not in mixed or Windows style, start by that.
28565    new_path=`cmd //c echo $path`
28566  fi
28567
28568
28569  input_path="$new_path"
28570  # Check if we need to convert this using DOS-style short mode. If the path
28571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28572  # take no chances and rewrite it.
28573  # Note: m4 eats our [], so we need to use [ and ] instead.
28574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28575  if test "x$has_forbidden_chars" != x; then
28576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28578  fi
28579
28580
28581  windows_path="$new_path"
28582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28583    unix_path=`$CYGPATH -u "$windows_path"`
28584    new_path="$unix_path"
28585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28587    new_path="$unix_path"
28588  fi
28589
28590  if test "x$path" != "x$new_path"; then
28591    BOOT_JDK="$new_path"
28592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28594  fi
28595
28596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28598
28599    else
28600      # We're on a unix platform. Hooray! :)
28601      path="$BOOT_JDK"
28602      has_space=`$ECHO "$path" | $GREP " "`
28603      if test "x$has_space" != x; then
28604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28607      fi
28608
28609      # Use eval to expand a potential ~
28610      eval path="$path"
28611      if test ! -f "$path" && test ! -d "$path"; then
28612        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28613      fi
28614
28615      if test -d "$path"; then
28616        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28617      else
28618        dir="`$DIRNAME "$path"`"
28619        base="`$BASENAME "$path"`"
28620        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28621      fi
28622    fi
28623  fi
28624
28625            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28626$as_echo_n "checking for Boot JDK... " >&6; }
28627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28628$as_echo "$BOOT_JDK" >&6; }
28629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28630$as_echo_n "checking Boot JDK version... " >&6; }
28631            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28633$as_echo "$BOOT_JDK_VERSION" >&6; }
28634          fi # end check jdk version
28635        fi # end check javac
28636      fi # end check java
28637    fi # end check boot jdk found
28638  fi
28639
28640  fi
28641
28642
28643    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28644    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28645      # Do we have a bin/java?
28646      if test ! -x "$BOOT_JDK/bin/java"; then
28647        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28649        BOOT_JDK_FOUND=no
28650      else
28651        # Do we have a bin/javac?
28652        if test ! -x "$BOOT_JDK/bin/javac"; then
28653          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28655          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28656$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28657          BOOT_JDK_FOUND=no
28658        else
28659          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28660          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28661
28662          # Extra M4 quote needed to protect [] in grep expression.
28663          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28664          if test "x$FOUND_CORRECT_VERSION" = x; then
28665            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28667            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28668$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28669            BOOT_JDK_FOUND=no
28670          else
28671            # We're done! :-)
28672            BOOT_JDK_FOUND=yes
28673
28674  # Only process if variable expands to non-empty
28675
28676  if test "x$BOOT_JDK" != x; then
28677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28678
28679  # Input might be given as Windows format, start by converting to
28680  # unix format.
28681  path="$BOOT_JDK"
28682  new_path=`$CYGPATH -u "$path"`
28683
28684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28687  # "foo.exe" is OK but "foo" is an error.
28688  #
28689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28690  # It is also a way to make sure we got the proper file name for the real test later on.
28691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28692  if test "x$test_shortpath" = x; then
28693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28694$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28695    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28696  fi
28697
28698  # Call helper function which possibly converts this using DOS-style short mode.
28699  # If so, the updated path is stored in $new_path.
28700
28701  input_path="$new_path"
28702  # Check if we need to convert this using DOS-style short mode. If the path
28703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28704  # take no chances and rewrite it.
28705  # Note: m4 eats our [], so we need to use [ and ] instead.
28706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28707  if test "x$has_forbidden_chars" != x; then
28708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28712      # Going to short mode and back again did indeed matter. Since short mode is
28713      # case insensitive, let's make it lowercase to improve readability.
28714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28715      # Now convert it back to Unix-style (cygpath)
28716      input_path=`$CYGPATH -u "$shortmode_path"`
28717      new_path="$input_path"
28718    fi
28719  fi
28720
28721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28722  if test "x$test_cygdrive_prefix" = x; then
28723    # As a simple fix, exclude /usr/bin since it's not a real path.
28724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28726      # a path prefixed by /cygdrive for fixpath to work.
28727      new_path="$CYGWIN_ROOT_PATH$input_path"
28728    fi
28729  fi
28730
28731
28732  if test "x$path" != "x$new_path"; then
28733    BOOT_JDK="$new_path"
28734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28736  fi
28737
28738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28739
28740  path="$BOOT_JDK"
28741  has_colon=`$ECHO $path | $GREP ^.:`
28742  new_path="$path"
28743  if test "x$has_colon" = x; then
28744    # Not in mixed or Windows style, start by that.
28745    new_path=`cmd //c echo $path`
28746  fi
28747
28748
28749  input_path="$new_path"
28750  # Check if we need to convert this using DOS-style short mode. If the path
28751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28752  # take no chances and rewrite it.
28753  # Note: m4 eats our [], so we need to use [ and ] instead.
28754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28755  if test "x$has_forbidden_chars" != x; then
28756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28758  fi
28759
28760
28761  windows_path="$new_path"
28762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28763    unix_path=`$CYGPATH -u "$windows_path"`
28764    new_path="$unix_path"
28765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28767    new_path="$unix_path"
28768  fi
28769
28770  if test "x$path" != "x$new_path"; then
28771    BOOT_JDK="$new_path"
28772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28774  fi
28775
28776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28778
28779    else
28780      # We're on a unix platform. Hooray! :)
28781      path="$BOOT_JDK"
28782      has_space=`$ECHO "$path" | $GREP " "`
28783      if test "x$has_space" != x; then
28784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28785$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28786        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28787      fi
28788
28789      # Use eval to expand a potential ~
28790      eval path="$path"
28791      if test ! -f "$path" && test ! -d "$path"; then
28792        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28793      fi
28794
28795      if test -d "$path"; then
28796        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28797      else
28798        dir="`$DIRNAME "$path"`"
28799        base="`$BASENAME "$path"`"
28800        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28801      fi
28802    fi
28803  fi
28804
28805            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28806$as_echo_n "checking for Boot JDK... " >&6; }
28807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28808$as_echo "$BOOT_JDK" >&6; }
28809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28810$as_echo_n "checking Boot JDK version... " >&6; }
28811            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28813$as_echo "$BOOT_JDK_VERSION" >&6; }
28814          fi # end check jdk version
28815        fi # end check javac
28816      fi # end check java
28817    fi # end check boot jdk found
28818  fi
28819
28820
28821  # If we haven't found anything yet, we've truly lost. Give up.
28822  if test "x$BOOT_JDK_FOUND" = xno; then
28823
28824  # Print a helpful message on how to acquire the necessary build dependency.
28825  # openjdk is the help tag: freetype, cups, alsa etc
28826  MISSING_DEPENDENCY=openjdk
28827
28828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28829    cygwin_help $MISSING_DEPENDENCY
28830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28831    msys_help $MISSING_DEPENDENCY
28832  else
28833    PKGHANDLER_COMMAND=
28834
28835    case $PKGHANDLER in
28836      apt-get)
28837        apt_help     $MISSING_DEPENDENCY ;;
28838      yum)
28839        yum_help     $MISSING_DEPENDENCY ;;
28840      port)
28841        port_help    $MISSING_DEPENDENCY ;;
28842      pkgutil)
28843        pkgutil_help $MISSING_DEPENDENCY ;;
28844      pkgadd)
28845        pkgadd_help  $MISSING_DEPENDENCY ;;
28846    esac
28847
28848    if test "x$PKGHANDLER_COMMAND" != x; then
28849      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28850    fi
28851  fi
28852
28853    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28854$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28855    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28856$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28857    as_fn_error $? "Cannot continue" "$LINENO" 5
28858  fi
28859
28860
28861
28862  # Setup tools from the Boot JDK.
28863
28864  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28865
28866  # Publish this variable in the help.
28867
28868
28869  if [ -z "${JAVA+x}" ]; then
28870    # The variable is not set by user, try to locate tool using the code snippet
28871
28872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28873$as_echo_n "checking for java in Boot JDK... " >&6; }
28874      JAVA=$BOOT_JDK/bin/java
28875      if test ! -x $JAVA; then
28876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28877$as_echo "not found" >&6; }
28878        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28879$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28880        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28881      fi
28882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28883$as_echo "ok" >&6; }
28884
28885
28886  else
28887    # The variable is set, but is it from the command line or the environment?
28888
28889    # Try to remove the string !JAVA! from our list.
28890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28892      # If it failed, the variable was not from the command line. Ignore it,
28893      # but warn the user (except for BASH, which is always set by the calling BASH).
28894      if test "xJAVA" != xBASH; then
28895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28896$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28897      fi
28898      # Try to locate tool using the code snippet
28899
28900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28901$as_echo_n "checking for java in Boot JDK... " >&6; }
28902      JAVA=$BOOT_JDK/bin/java
28903      if test ! -x $JAVA; then
28904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28905$as_echo "not found" >&6; }
28906        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28907$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28908        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28909      fi
28910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28911$as_echo "ok" >&6; }
28912
28913
28914    else
28915      # If it succeeded, then it was overridden by the user. We will use it
28916      # for the tool.
28917
28918      # First remove it from the list of overridden variables, so we can test
28919      # for unknown variables in the end.
28920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28921
28922      # Check if we try to supply an empty value
28923      if test "x$JAVA" = x; then
28924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28925$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28927$as_echo_n "checking for JAVA... " >&6; }
28928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28929$as_echo "disabled" >&6; }
28930      else
28931        # Check if the provided tool contains a complete path.
28932        tool_specified="$JAVA"
28933        tool_basename="${tool_specified##*/}"
28934        if test "x$tool_basename" = "x$tool_specified"; then
28935          # A command without a complete path is provided, search $PATH.
28936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28937$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28938          # Extract the first word of "$tool_basename", so it can be a program name with args.
28939set dummy $tool_basename; ac_word=$2
28940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28941$as_echo_n "checking for $ac_word... " >&6; }
28942if ${ac_cv_path_JAVA+:} false; then :
28943  $as_echo_n "(cached) " >&6
28944else
28945  case $JAVA in
28946  [\\/]* | ?:[\\/]*)
28947  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28948  ;;
28949  *)
28950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28951for as_dir in $PATH
28952do
28953  IFS=$as_save_IFS
28954  test -z "$as_dir" && as_dir=.
28955    for ac_exec_ext in '' $ac_executable_extensions; do
28956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28957    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28959    break 2
28960  fi
28961done
28962  done
28963IFS=$as_save_IFS
28964
28965  ;;
28966esac
28967fi
28968JAVA=$ac_cv_path_JAVA
28969if test -n "$JAVA"; then
28970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28971$as_echo "$JAVA" >&6; }
28972else
28973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28974$as_echo "no" >&6; }
28975fi
28976
28977
28978          if test "x$JAVA" = x; then
28979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28980          fi
28981        else
28982          # Otherwise we believe it is a complete path. Use it as it is.
28983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28984$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28986$as_echo_n "checking for JAVA... " >&6; }
28987          if test ! -x "$tool_specified"; then
28988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28989$as_echo "not found" >&6; }
28990            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28991          fi
28992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28993$as_echo "$tool_specified" >&6; }
28994        fi
28995      fi
28996    fi
28997
28998  fi
28999
29000
29001
29002  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29003
29004  # Publish this variable in the help.
29005
29006
29007  if [ -z "${JAVAC+x}" ]; then
29008    # The variable is not set by user, try to locate tool using the code snippet
29009
29010      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29011$as_echo_n "checking for javac in Boot JDK... " >&6; }
29012      JAVAC=$BOOT_JDK/bin/javac
29013      if test ! -x $JAVAC; then
29014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29015$as_echo "not found" >&6; }
29016        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29017$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29018        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29019      fi
29020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29021$as_echo "ok" >&6; }
29022
29023
29024  else
29025    # The variable is set, but is it from the command line or the environment?
29026
29027    # Try to remove the string !JAVAC! from our list.
29028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29030      # If it failed, the variable was not from the command line. Ignore it,
29031      # but warn the user (except for BASH, which is always set by the calling BASH).
29032      if test "xJAVAC" != xBASH; then
29033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29034$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29035      fi
29036      # Try to locate tool using the code snippet
29037
29038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29039$as_echo_n "checking for javac in Boot JDK... " >&6; }
29040      JAVAC=$BOOT_JDK/bin/javac
29041      if test ! -x $JAVAC; then
29042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29043$as_echo "not found" >&6; }
29044        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29045$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29046        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29047      fi
29048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29049$as_echo "ok" >&6; }
29050
29051
29052    else
29053      # If it succeeded, then it was overridden by the user. We will use it
29054      # for the tool.
29055
29056      # First remove it from the list of overridden variables, so we can test
29057      # for unknown variables in the end.
29058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29059
29060      # Check if we try to supply an empty value
29061      if test "x$JAVAC" = x; then
29062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29063$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29065$as_echo_n "checking for JAVAC... " >&6; }
29066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29067$as_echo "disabled" >&6; }
29068      else
29069        # Check if the provided tool contains a complete path.
29070        tool_specified="$JAVAC"
29071        tool_basename="${tool_specified##*/}"
29072        if test "x$tool_basename" = "x$tool_specified"; then
29073          # A command without a complete path is provided, search $PATH.
29074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29075$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29076          # Extract the first word of "$tool_basename", so it can be a program name with args.
29077set dummy $tool_basename; ac_word=$2
29078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29079$as_echo_n "checking for $ac_word... " >&6; }
29080if ${ac_cv_path_JAVAC+:} false; then :
29081  $as_echo_n "(cached) " >&6
29082else
29083  case $JAVAC in
29084  [\\/]* | ?:[\\/]*)
29085  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29086  ;;
29087  *)
29088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29089for as_dir in $PATH
29090do
29091  IFS=$as_save_IFS
29092  test -z "$as_dir" && as_dir=.
29093    for ac_exec_ext in '' $ac_executable_extensions; do
29094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29095    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29097    break 2
29098  fi
29099done
29100  done
29101IFS=$as_save_IFS
29102
29103  ;;
29104esac
29105fi
29106JAVAC=$ac_cv_path_JAVAC
29107if test -n "$JAVAC"; then
29108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29109$as_echo "$JAVAC" >&6; }
29110else
29111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29112$as_echo "no" >&6; }
29113fi
29114
29115
29116          if test "x$JAVAC" = x; then
29117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29118          fi
29119        else
29120          # Otherwise we believe it is a complete path. Use it as it is.
29121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29122$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29124$as_echo_n "checking for JAVAC... " >&6; }
29125          if test ! -x "$tool_specified"; then
29126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29127$as_echo "not found" >&6; }
29128            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29129          fi
29130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29131$as_echo "$tool_specified" >&6; }
29132        fi
29133      fi
29134    fi
29135
29136  fi
29137
29138
29139
29140  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29141
29142  # Publish this variable in the help.
29143
29144
29145  if [ -z "${JAVAH+x}" ]; then
29146    # The variable is not set by user, try to locate tool using the code snippet
29147
29148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29149$as_echo_n "checking for javah in Boot JDK... " >&6; }
29150      JAVAH=$BOOT_JDK/bin/javah
29151      if test ! -x $JAVAH; then
29152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29153$as_echo "not found" >&6; }
29154        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29155$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29156        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29157      fi
29158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29159$as_echo "ok" >&6; }
29160
29161
29162  else
29163    # The variable is set, but is it from the command line or the environment?
29164
29165    # Try to remove the string !JAVAH! from our list.
29166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29168      # If it failed, the variable was not from the command line. Ignore it,
29169      # but warn the user (except for BASH, which is always set by the calling BASH).
29170      if test "xJAVAH" != xBASH; then
29171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29172$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29173      fi
29174      # Try to locate tool using the code snippet
29175
29176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29177$as_echo_n "checking for javah in Boot JDK... " >&6; }
29178      JAVAH=$BOOT_JDK/bin/javah
29179      if test ! -x $JAVAH; then
29180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29181$as_echo "not found" >&6; }
29182        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29183$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29184        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29185      fi
29186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29187$as_echo "ok" >&6; }
29188
29189
29190    else
29191      # If it succeeded, then it was overridden by the user. We will use it
29192      # for the tool.
29193
29194      # First remove it from the list of overridden variables, so we can test
29195      # for unknown variables in the end.
29196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29197
29198      # Check if we try to supply an empty value
29199      if test "x$JAVAH" = x; then
29200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29201$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29203$as_echo_n "checking for JAVAH... " >&6; }
29204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29205$as_echo "disabled" >&6; }
29206      else
29207        # Check if the provided tool contains a complete path.
29208        tool_specified="$JAVAH"
29209        tool_basename="${tool_specified##*/}"
29210        if test "x$tool_basename" = "x$tool_specified"; then
29211          # A command without a complete path is provided, search $PATH.
29212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29213$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29214          # Extract the first word of "$tool_basename", so it can be a program name with args.
29215set dummy $tool_basename; ac_word=$2
29216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29217$as_echo_n "checking for $ac_word... " >&6; }
29218if ${ac_cv_path_JAVAH+:} false; then :
29219  $as_echo_n "(cached) " >&6
29220else
29221  case $JAVAH in
29222  [\\/]* | ?:[\\/]*)
29223  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29224  ;;
29225  *)
29226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29227for as_dir in $PATH
29228do
29229  IFS=$as_save_IFS
29230  test -z "$as_dir" && as_dir=.
29231    for ac_exec_ext in '' $ac_executable_extensions; do
29232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29233    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29235    break 2
29236  fi
29237done
29238  done
29239IFS=$as_save_IFS
29240
29241  ;;
29242esac
29243fi
29244JAVAH=$ac_cv_path_JAVAH
29245if test -n "$JAVAH"; then
29246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29247$as_echo "$JAVAH" >&6; }
29248else
29249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29250$as_echo "no" >&6; }
29251fi
29252
29253
29254          if test "x$JAVAH" = x; then
29255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29256          fi
29257        else
29258          # Otherwise we believe it is a complete path. Use it as it is.
29259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29260$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29262$as_echo_n "checking for JAVAH... " >&6; }
29263          if test ! -x "$tool_specified"; then
29264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29265$as_echo "not found" >&6; }
29266            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29267          fi
29268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29269$as_echo "$tool_specified" >&6; }
29270        fi
29271      fi
29272    fi
29273
29274  fi
29275
29276
29277
29278  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29279
29280  # Publish this variable in the help.
29281
29282
29283  if [ -z "${JAR+x}" ]; then
29284    # The variable is not set by user, try to locate tool using the code snippet
29285
29286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29287$as_echo_n "checking for jar in Boot JDK... " >&6; }
29288      JAR=$BOOT_JDK/bin/jar
29289      if test ! -x $JAR; then
29290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29291$as_echo "not found" >&6; }
29292        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29293$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29294        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29295      fi
29296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29297$as_echo "ok" >&6; }
29298
29299
29300  else
29301    # The variable is set, but is it from the command line or the environment?
29302
29303    # Try to remove the string !JAR! from our list.
29304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29306      # If it failed, the variable was not from the command line. Ignore it,
29307      # but warn the user (except for BASH, which is always set by the calling BASH).
29308      if test "xJAR" != xBASH; then
29309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29310$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29311      fi
29312      # Try to locate tool using the code snippet
29313
29314      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29315$as_echo_n "checking for jar in Boot JDK... " >&6; }
29316      JAR=$BOOT_JDK/bin/jar
29317      if test ! -x $JAR; then
29318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29319$as_echo "not found" >&6; }
29320        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29321$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29322        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29323      fi
29324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29325$as_echo "ok" >&6; }
29326
29327
29328    else
29329      # If it succeeded, then it was overridden by the user. We will use it
29330      # for the tool.
29331
29332      # First remove it from the list of overridden variables, so we can test
29333      # for unknown variables in the end.
29334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29335
29336      # Check if we try to supply an empty value
29337      if test "x$JAR" = x; then
29338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29339$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29341$as_echo_n "checking for JAR... " >&6; }
29342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29343$as_echo "disabled" >&6; }
29344      else
29345        # Check if the provided tool contains a complete path.
29346        tool_specified="$JAR"
29347        tool_basename="${tool_specified##*/}"
29348        if test "x$tool_basename" = "x$tool_specified"; then
29349          # A command without a complete path is provided, search $PATH.
29350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29351$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29352          # Extract the first word of "$tool_basename", so it can be a program name with args.
29353set dummy $tool_basename; ac_word=$2
29354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29355$as_echo_n "checking for $ac_word... " >&6; }
29356if ${ac_cv_path_JAR+:} false; then :
29357  $as_echo_n "(cached) " >&6
29358else
29359  case $JAR in
29360  [\\/]* | ?:[\\/]*)
29361  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29362  ;;
29363  *)
29364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29365for as_dir in $PATH
29366do
29367  IFS=$as_save_IFS
29368  test -z "$as_dir" && as_dir=.
29369    for ac_exec_ext in '' $ac_executable_extensions; do
29370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29371    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29373    break 2
29374  fi
29375done
29376  done
29377IFS=$as_save_IFS
29378
29379  ;;
29380esac
29381fi
29382JAR=$ac_cv_path_JAR
29383if test -n "$JAR"; then
29384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29385$as_echo "$JAR" >&6; }
29386else
29387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29388$as_echo "no" >&6; }
29389fi
29390
29391
29392          if test "x$JAR" = x; then
29393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29394          fi
29395        else
29396          # Otherwise we believe it is a complete path. Use it as it is.
29397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29398$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29400$as_echo_n "checking for JAR... " >&6; }
29401          if test ! -x "$tool_specified"; then
29402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29403$as_echo "not found" >&6; }
29404            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29405          fi
29406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29407$as_echo "$tool_specified" >&6; }
29408        fi
29409      fi
29410    fi
29411
29412  fi
29413
29414
29415
29416  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29417
29418  # Publish this variable in the help.
29419
29420
29421  if [ -z "${JARSIGNER+x}" ]; then
29422    # The variable is not set by user, try to locate tool using the code snippet
29423
29424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29425$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29426      JARSIGNER=$BOOT_JDK/bin/jarsigner
29427      if test ! -x $JARSIGNER; then
29428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29429$as_echo "not found" >&6; }
29430        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29431$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29432        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29433      fi
29434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29435$as_echo "ok" >&6; }
29436
29437
29438  else
29439    # The variable is set, but is it from the command line or the environment?
29440
29441    # Try to remove the string !JARSIGNER! from our list.
29442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29444      # If it failed, the variable was not from the command line. Ignore it,
29445      # but warn the user (except for BASH, which is always set by the calling BASH).
29446      if test "xJARSIGNER" != xBASH; then
29447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29448$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29449      fi
29450      # Try to locate tool using the code snippet
29451
29452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29453$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29454      JARSIGNER=$BOOT_JDK/bin/jarsigner
29455      if test ! -x $JARSIGNER; then
29456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29457$as_echo "not found" >&6; }
29458        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29459$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29460        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29461      fi
29462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29463$as_echo "ok" >&6; }
29464
29465
29466    else
29467      # If it succeeded, then it was overridden by the user. We will use it
29468      # for the tool.
29469
29470      # First remove it from the list of overridden variables, so we can test
29471      # for unknown variables in the end.
29472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29473
29474      # Check if we try to supply an empty value
29475      if test "x$JARSIGNER" = x; then
29476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29477$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29479$as_echo_n "checking for JARSIGNER... " >&6; }
29480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29481$as_echo "disabled" >&6; }
29482      else
29483        # Check if the provided tool contains a complete path.
29484        tool_specified="$JARSIGNER"
29485        tool_basename="${tool_specified##*/}"
29486        if test "x$tool_basename" = "x$tool_specified"; then
29487          # A command without a complete path is provided, search $PATH.
29488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29489$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29490          # Extract the first word of "$tool_basename", so it can be a program name with args.
29491set dummy $tool_basename; ac_word=$2
29492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29493$as_echo_n "checking for $ac_word... " >&6; }
29494if ${ac_cv_path_JARSIGNER+:} false; then :
29495  $as_echo_n "(cached) " >&6
29496else
29497  case $JARSIGNER in
29498  [\\/]* | ?:[\\/]*)
29499  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29500  ;;
29501  *)
29502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29503for as_dir in $PATH
29504do
29505  IFS=$as_save_IFS
29506  test -z "$as_dir" && as_dir=.
29507    for ac_exec_ext in '' $ac_executable_extensions; do
29508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29509    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29511    break 2
29512  fi
29513done
29514  done
29515IFS=$as_save_IFS
29516
29517  ;;
29518esac
29519fi
29520JARSIGNER=$ac_cv_path_JARSIGNER
29521if test -n "$JARSIGNER"; then
29522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29523$as_echo "$JARSIGNER" >&6; }
29524else
29525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29526$as_echo "no" >&6; }
29527fi
29528
29529
29530          if test "x$JARSIGNER" = x; then
29531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29532          fi
29533        else
29534          # Otherwise we believe it is a complete path. Use it as it is.
29535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29536$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29538$as_echo_n "checking for JARSIGNER... " >&6; }
29539          if test ! -x "$tool_specified"; then
29540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29541$as_echo "not found" >&6; }
29542            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29543          fi
29544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29545$as_echo "$tool_specified" >&6; }
29546        fi
29547      fi
29548    fi
29549
29550  fi
29551
29552
29553
29554  # Finally, set some other options...
29555
29556  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29557  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29558
29559
29560
29561  # Check if the boot jdk is 32 or 64 bit
29562  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29563    BOOT_JDK_BITS="64"
29564  else
29565    BOOT_JDK_BITS="32"
29566  fi
29567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29568$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29570$as_echo "$BOOT_JDK_BITS" >&6; }
29571
29572
29573
29574###############################################################################
29575#
29576# Configure the sources to use. We can add or override individual directories.
29577#
29578###############################################################################
29579
29580
29581  # Where are the sources.
29582  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29583  CORBA_TOPDIR="$SRC_ROOT/corba"
29584  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29585  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29586  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29587  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29588  JDK_TOPDIR="$SRC_ROOT/jdk"
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598  # This feature is no longer supported.
29599
29600
29601
29602# Check whether --with-add-source-root was given.
29603if test "${with_add_source_root+set}" = set; then :
29604  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
29605$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29606fi
29607
29608
29609
29610
29611# Check whether --with-override-source-root was given.
29612if test "${with_override_source_root+set}" = set; then :
29613  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
29614$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29615fi
29616
29617
29618
29619
29620# Check whether --with-adds-and-overrides was given.
29621if test "${with_adds_and_overrides+set}" = set; then :
29622  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
29623$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29624fi
29625
29626
29627
29628
29629# Check whether --with-override-langtools was given.
29630if test "${with_override_langtools+set}" = set; then :
29631  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29632$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29633fi
29634
29635
29636
29637
29638# Check whether --with-override-corba was given.
29639if test "${with_override_corba+set}" = set; then :
29640  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29641$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29642fi
29643
29644
29645
29646
29647# Check whether --with-override-jaxp was given.
29648if test "${with_override_jaxp+set}" = set; then :
29649  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29650$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29651fi
29652
29653
29654
29655
29656# Check whether --with-override-jaxws was given.
29657if test "${with_override_jaxws+set}" = set; then :
29658  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29659$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29660fi
29661
29662
29663
29664
29665# Check whether --with-override-hotspot was given.
29666if test "${with_override_hotspot+set}" = set; then :
29667  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29668$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29669fi
29670
29671
29672
29673
29674# Check whether --with-override-nashorn was given.
29675if test "${with_override_nashorn+set}" = set; then :
29676  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29677$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29678fi
29679
29680
29681
29682
29683# Check whether --with-override-jdk was given.
29684if test "${with_override_jdk+set}" = set; then :
29685  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29686$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29687fi
29688
29689
29690
29691
29692  BUILD_OUTPUT="$OUTPUT_ROOT"
29693
29694
29695  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29696  BUILD_HOTSPOT=true
29697
29698
29699
29700# Check whether --with-import-hotspot was given.
29701if test "${with_import_hotspot+set}" = set; then :
29702  withval=$with_import_hotspot;
29703fi
29704
29705  if test "x$with_import_hotspot" != x; then
29706    CURDIR="$PWD"
29707    cd "$with_import_hotspot"
29708    HOTSPOT_DIST="`pwd`"
29709    cd "$CURDIR"
29710    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29711      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29712    fi
29713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29714$as_echo_n "checking if hotspot should be imported... " >&6; }
29715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29716$as_echo "yes from $HOTSPOT_DIST" >&6; }
29717    BUILD_HOTSPOT=false
29718  fi
29719
29720  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29721
29722
29723###############################################################################
29724#
29725# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29726# native code.
29727#
29728###############################################################################
29729
29730# See if we are doing a complete static build or not
29731
29732  # Check whether --enable-static-build was given.
29733if test "${enable_static_build+set}" = set; then :
29734  enableval=$enable_static_build;
29735fi
29736
29737  STATIC_BUILD=false
29738  if test "x$enable_static_build" = "xyes"; then
29739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29740$as_echo_n "checking if static build is enabled... " >&6; }
29741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29742$as_echo "yes" >&6; }
29743    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29744      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29745    fi
29746    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29747    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29748    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29749    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29750    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29751    STATIC_BUILD=true
29752  elif test "x$enable_static_build" = "xno"; then
29753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29754$as_echo_n "checking if static build is enabled... " >&6; }
29755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29756$as_echo "no" >&6; }
29757  elif test "x$enable_static_build" != "x"; then
29758    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29759  fi
29760
29761
29762
29763
29764# First determine the toolchain type (compiler family)
29765
29766
29767# Check whether --with-toolchain-type was given.
29768if test "${with_toolchain_type+set}" = set; then :
29769  withval=$with_toolchain_type;
29770fi
29771
29772
29773  # Use indirect variable referencing
29774  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29775  VALID_TOOLCHAINS=${!toolchain_var_name}
29776
29777  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29778    if test -n "$XCODEBUILD"; then
29779      # On Mac OS X, default toolchain to clang after Xcode 5
29780      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29781      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29782      if test $? -ne 0; then
29783        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29784      fi
29785      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29786          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29787          $CUT -f 1 -d .`
29788      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29789$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29790      if test $XCODE_MAJOR_VERSION -ge 5; then
29791          DEFAULT_TOOLCHAIN="clang"
29792      else
29793          DEFAULT_TOOLCHAIN="gcc"
29794      fi
29795    else
29796      # If Xcode is not installed, but the command line tools are
29797      # then we can't run xcodebuild. On these systems we should
29798      # default to clang
29799      DEFAULT_TOOLCHAIN="clang"
29800    fi
29801  else
29802    # First toolchain type in the list is the default
29803    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29804  fi
29805
29806  if test "x$with_toolchain_type" = xlist; then
29807    # List all toolchains
29808    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29809$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29810    for toolchain in $VALID_TOOLCHAINS; do
29811      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29812      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29813      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29814    done
29815
29816    exit 0
29817  elif test "x$with_toolchain_type" != x; then
29818    # User override; check that it is valid
29819    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29820      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29821$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29822      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29823$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29824      as_fn_error $? "Cannot continue." "$LINENO" 5
29825    fi
29826    TOOLCHAIN_TYPE=$with_toolchain_type
29827  else
29828    # No flag given, use default
29829    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29830  fi
29831
29832
29833  TOOLCHAIN_CC_BINARY_clang="clang"
29834  TOOLCHAIN_CC_BINARY_gcc="gcc"
29835  TOOLCHAIN_CC_BINARY_microsoft="cl"
29836  TOOLCHAIN_CC_BINARY_solstudio="cc"
29837  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29838
29839  TOOLCHAIN_CXX_BINARY_clang="clang++"
29840  TOOLCHAIN_CXX_BINARY_gcc="g++"
29841  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29842  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29843  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29844
29845  # Use indirect variable referencing
29846  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29847  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29848  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29849  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29850  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29851  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29852
29853
29854  # Define filename patterns
29855  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29856    LIBRARY_PREFIX=
29857    SHARED_LIBRARY_SUFFIX='.dll'
29858    STATIC_LIBRARY_SUFFIX='.lib'
29859    SHARED_LIBRARY='$1.dll'
29860    STATIC_LIBRARY='$1.lib'
29861    OBJ_SUFFIX='.obj'
29862    EXE_SUFFIX='.exe'
29863  else
29864    LIBRARY_PREFIX=lib
29865    SHARED_LIBRARY_SUFFIX='.so'
29866    STATIC_LIBRARY_SUFFIX='.a'
29867    SHARED_LIBRARY='lib$1.so'
29868    STATIC_LIBRARY='lib$1.a'
29869    OBJ_SUFFIX='.o'
29870    EXE_SUFFIX=''
29871    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29872      # For full static builds, we're overloading the SHARED_LIBRARY
29873      # variables in order to limit the amount of changes required.
29874      # It would be better to remove SHARED and just use LIBRARY and
29875      # LIBRARY_SUFFIX for libraries that can be built either
29876      # shared or static and use STATIC_* for libraries that are
29877      # always built statically.
29878      if test "x$STATIC_BUILD" = xtrue; then
29879        SHARED_LIBRARY='lib$1.a'
29880        SHARED_LIBRARY_SUFFIX='.a'
29881      else
29882        SHARED_LIBRARY='lib$1.dylib'
29883        SHARED_LIBRARY_SUFFIX='.dylib'
29884      fi
29885    fi
29886  fi
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29898    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29899$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29900  else
29901    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29902$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29903  fi
29904
29905
29906# User supplied flags should be used when configure detects compilers
29907
29908  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29909    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29910$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29911  fi
29912
29913  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29914    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29915$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29916  fi
29917
29918  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29920$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29921  fi
29922
29923
29924# Check whether --with-extra-cflags was given.
29925if test "${with_extra_cflags+set}" = set; then :
29926  withval=$with_extra_cflags;
29927fi
29928
29929
29930
29931# Check whether --with-extra-cxxflags was given.
29932if test "${with_extra_cxxflags+set}" = set; then :
29933  withval=$with_extra_cxxflags;
29934fi
29935
29936
29937
29938# Check whether --with-extra-ldflags was given.
29939if test "${with_extra_ldflags+set}" = set; then :
29940  withval=$with_extra_ldflags;
29941fi
29942
29943
29944  EXTRA_CFLAGS="$with_extra_cflags"
29945  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29946  EXTRA_LDFLAGS="$with_extra_ldflags"
29947
29948  # Hotspot needs these set in their legacy form
29949  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29950  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29951  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29952
29953
29954
29955
29956
29957  # The global CFLAGS and LDLAGS variables are used by configure tests and
29958  # should include the extra parameters
29959  CFLAGS="$EXTRA_CFLAGS"
29960  CXXFLAGS="$EXTRA_CXXFLAGS"
29961  LDFLAGS="$EXTRA_LDFLAGS"
29962  CPPFLAGS=""
29963
29964# The sysroot cflags are needed for configure to be able to run the compilers
29965
29966  if test "x$SYSROOT" != "x"; then
29967    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29968      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29969        # Solaris Studio does not have a concept of sysroot. Instead we must
29970        # make sure the default include and lib dirs are appended to each
29971        # compile and link command line.
29972        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29973        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29974            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29975            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29976      fi
29977    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29978      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29979      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29980    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29981      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29982      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29983    fi
29984    # Propagate the sysroot args to hotspot
29985    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29986    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29987    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29988    # The global CFLAGS and LDFLAGS variables need these for configure to function
29989    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29990    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29991    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29992    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29993  fi
29994
29995  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29996    # We also need -iframework<path>/System/Library/Frameworks
29997    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29998    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29999    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30000    # set this here so it doesn't have to be peppered throughout the forest
30001    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30002    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30003  fi
30004
30005
30006
30007
30008
30009# Then detect the actual binaries needed
30010
30011  # FIXME: Is this needed?
30012  ac_ext=cpp
30013ac_cpp='$CXXCPP $CPPFLAGS'
30014ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30015ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30016ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30017
30018
30019  # Store the CFLAGS etc passed to the configure script.
30020  ORG_CFLAGS="$CFLAGS"
30021  ORG_CXXFLAGS="$CXXFLAGS"
30022
30023  # autoconf magic only relies on PATH, so update it if tools dir is specified
30024  OLD_PATH="$PATH"
30025
30026  # On Windows, we need to detect the visual studio installation first.
30027  # This will change the PATH, but we need to keep that new PATH even
30028  # after toolchain detection is done, since the compiler (on x86) uses
30029  # it for DLL resolution in runtime.
30030  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30031      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30032
30033  # Store path to cygwin link.exe to help excluding it when searching for
30034  # VS linker. This must be done before changing the PATH when looking for VS.
30035  # Extract the first word of "link", so it can be a program name with args.
30036set dummy link; ac_word=$2
30037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30038$as_echo_n "checking for $ac_word... " >&6; }
30039if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30040  $as_echo_n "(cached) " >&6
30041else
30042  case $CYGWIN_LINK in
30043  [\\/]* | ?:[\\/]*)
30044  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30045  ;;
30046  *)
30047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30048for as_dir in $PATH
30049do
30050  IFS=$as_save_IFS
30051  test -z "$as_dir" && as_dir=.
30052    for ac_exec_ext in '' $ac_executable_extensions; do
30053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30054    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30056    break 2
30057  fi
30058done
30059  done
30060IFS=$as_save_IFS
30061
30062  ;;
30063esac
30064fi
30065CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30066if test -n "$CYGWIN_LINK"; then
30067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30068$as_echo "$CYGWIN_LINK" >&6; }
30069else
30070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30071$as_echo "no" >&6; }
30072fi
30073
30074
30075  if test "x$CYGWIN_LINK" != x; then
30076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30077$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30078    "$CYGWIN_LINK" --version > /dev/null
30079    if test $? -eq 0 ; then
30080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30081$as_echo "yes" >&6; }
30082    else
30083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30084$as_echo "no" >&6; }
30085      # This might be the VS linker. Don't exclude it later on.
30086      CYGWIN_LINK=""
30087    fi
30088  fi
30089
30090  # First-hand choice is to locate and run the vsvars bat file.
30091
30092
30093# Check whether --with-toolchain-version was given.
30094if test "${with_toolchain_version+set}" = set; then :
30095  withval=$with_toolchain_version;
30096fi
30097
30098
30099  if test "x$with_toolchain_version" = xlist; then
30100    # List all toolchains
30101    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30102$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30103    for version in $VALID_VS_VERSIONS; do
30104      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30105      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30106    done
30107
30108    exit 0
30109  elif test "x$DEVKIT_VS_VERSION" != x; then
30110    VS_VERSION=$DEVKIT_VS_VERSION
30111    TOOLCHAIN_VERSION=$VS_VERSION
30112    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30113    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30114    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30115    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30116    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30117    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30118
30119    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30120    # can still be exported as INCLUDE for compiler invocations without
30121    # SYSROOT_CFLAGS
30122    OLDIFS="$IFS"
30123    IFS=";"
30124    for i in $DEVKIT_VS_INCLUDE; do
30125      ipath=$i
30126
30127  unix_path="$ipath"
30128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30129    windows_path=`$CYGPATH -m "$unix_path"`
30130    ipath="$windows_path"
30131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30132    windows_path=`cmd //c echo $unix_path`
30133    ipath="$windows_path"
30134  fi
30135
30136      VS_INCLUDE="$VS_INCLUDE;$ipath"
30137    done
30138    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30139    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30140    for i in $DEVKIT_VS_LIB; do
30141      libpath=$i
30142
30143  unix_path="$libpath"
30144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30145    windows_path=`$CYGPATH -m "$unix_path"`
30146    libpath="$windows_path"
30147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30148    windows_path=`cmd //c echo $unix_path`
30149    libpath="$windows_path"
30150  fi
30151
30152      VS_LIB="$VS_LIB;$libpath"
30153    done
30154    IFS="$OLDIFS"
30155
30156    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30157$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30158
30159  elif test "x$with_toolchain_version" != x; then
30160    # User override; check that it is valid
30161    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30162      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30163$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30164      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30165$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30166      as_fn_error $? "Cannot continue." "$LINENO" 5
30167    fi
30168    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30169  else
30170    # No flag given, use default
30171    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30172  fi
30173
30174  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30175
30176  VS_VERSION="$VS_VERSION"
30177  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30178  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30179  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30180  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30181
30182  # When using --with-tools-dir, assume it points to the correct and default
30183  # version of Visual Studio or that --with-toolchain-version was also set.
30184  if test "x$with_tools_dir" != x; then
30185
30186  if test "x$VS_ENV_CMD" = x; then
30187    VS_VERSION="${VS_VERSION}"
30188    VS_BASE="$with_tools_dir/../.."
30189    METHOD="--with-tools-dir"
30190
30191    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30192      VCVARSFILE="vc/bin/vcvars32.bat"
30193    else
30194      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30195    fi
30196
30197
30198  windows_path="$VS_BASE"
30199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30200    unix_path=`$CYGPATH -u "$windows_path"`
30201    VS_BASE="$unix_path"
30202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30204    VS_BASE="$unix_path"
30205  fi
30206
30207    if test -d "$VS_BASE"; then
30208      if test -f "$VS_BASE/$VCVARSFILE"; then
30209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30210$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30211        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30212        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30213        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30214        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30215      else
30216        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30217$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30218        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30219$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30220      fi
30221    fi
30222  fi
30223
30224
30225  if test "x$VS_ENV_CMD" = x; then
30226    VS_VERSION="${VS_VERSION}"
30227    VS_BASE="$with_tools_dir/../../.."
30228    METHOD="--with-tools-dir"
30229
30230    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30231      VCVARSFILE="vc/bin/vcvars32.bat"
30232    else
30233      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30234    fi
30235
30236
30237  windows_path="$VS_BASE"
30238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30239    unix_path=`$CYGPATH -u "$windows_path"`
30240    VS_BASE="$unix_path"
30241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30243    VS_BASE="$unix_path"
30244  fi
30245
30246    if test -d "$VS_BASE"; then
30247      if test -f "$VS_BASE/$VCVARSFILE"; then
30248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30249$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30250        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30251        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30252        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30253        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30254      else
30255        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30256$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30257        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30258$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30259      fi
30260    fi
30261  fi
30262
30263    if test "x$VS_ENV_CMD" = x; then
30264      # Having specified an argument which is incorrect will produce an instant failure;
30265      # we should not go on looking
30266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30267$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30268      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30269$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30270      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30271$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30272      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30273    fi
30274  fi
30275
30276  VS_ENV_CMD=""
30277  VS_ENV_ARGS=""
30278
30279  if test "x$VS_COMNTOOLS" != x; then
30280
30281  if test "x$VS_ENV_CMD" = x; then
30282    VS_VERSION="${VS_VERSION}"
30283    VS_BASE="$VS_COMNTOOLS/../.."
30284    METHOD="$VS_COMNTOOLS_VAR variable"
30285
30286    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30287      VCVARSFILE="vc/bin/vcvars32.bat"
30288    else
30289      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30290    fi
30291
30292
30293  windows_path="$VS_BASE"
30294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30295    unix_path=`$CYGPATH -u "$windows_path"`
30296    VS_BASE="$unix_path"
30297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30299    VS_BASE="$unix_path"
30300  fi
30301
30302    if test -d "$VS_BASE"; then
30303      if test -f "$VS_BASE/$VCVARSFILE"; then
30304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30305$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30306        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30307        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30308        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30309        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30310      else
30311        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30312$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30313        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30314$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30315      fi
30316    fi
30317  fi
30318
30319  fi
30320  if test "x$PROGRAMFILES" != x; then
30321
30322  if test "x$VS_ENV_CMD" = x; then
30323    VS_VERSION="${VS_VERSION}"
30324    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30325    METHOD="well-known name"
30326
30327    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30328      VCVARSFILE="vc/bin/vcvars32.bat"
30329    else
30330      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30331    fi
30332
30333
30334  windows_path="$VS_BASE"
30335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30336    unix_path=`$CYGPATH -u "$windows_path"`
30337    VS_BASE="$unix_path"
30338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30340    VS_BASE="$unix_path"
30341  fi
30342
30343    if test -d "$VS_BASE"; then
30344      if test -f "$VS_BASE/$VCVARSFILE"; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30346$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30347        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30348        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30349        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30350        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30351      else
30352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30353$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30354        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30355$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30356      fi
30357    fi
30358  fi
30359
30360  fi
30361  # Work around the insanely named ProgramFiles(x86) env variable
30362  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30363  if test "x$PROGRAMFILES_X86" != x; then
30364
30365  if test "x$VS_ENV_CMD" = x; then
30366    VS_VERSION="${VS_VERSION}"
30367    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30368    METHOD="well-known name"
30369
30370    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30371      VCVARSFILE="vc/bin/vcvars32.bat"
30372    else
30373      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30374    fi
30375
30376
30377  windows_path="$VS_BASE"
30378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30379    unix_path=`$CYGPATH -u "$windows_path"`
30380    VS_BASE="$unix_path"
30381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30383    VS_BASE="$unix_path"
30384  fi
30385
30386    if test -d "$VS_BASE"; then
30387      if test -f "$VS_BASE/$VCVARSFILE"; then
30388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30389$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30390        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30391        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30392        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30393        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30394      else
30395        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30396$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30397        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30398$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30399      fi
30400    fi
30401  fi
30402
30403  fi
30404
30405  if test "x$VS_ENV_CMD" = x; then
30406    VS_VERSION="${VS_VERSION}"
30407    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30408    METHOD="well-known name"
30409
30410    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30411      VCVARSFILE="vc/bin/vcvars32.bat"
30412    else
30413      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30414    fi
30415
30416
30417  windows_path="$VS_BASE"
30418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30419    unix_path=`$CYGPATH -u "$windows_path"`
30420    VS_BASE="$unix_path"
30421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30423    VS_BASE="$unix_path"
30424  fi
30425
30426    if test -d "$VS_BASE"; then
30427      if test -f "$VS_BASE/$VCVARSFILE"; then
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30429$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30430        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30431        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30432        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30433        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30434      else
30435        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30436$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30437        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30438$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30439      fi
30440    fi
30441  fi
30442
30443
30444  if test "x$VS_ENV_CMD" = x; then
30445    VS_VERSION="${VS_VERSION}"
30446    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30447    METHOD="well-known name"
30448
30449    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30450      VCVARSFILE="vc/bin/vcvars32.bat"
30451    else
30452      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30453    fi
30454
30455
30456  windows_path="$VS_BASE"
30457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30458    unix_path=`$CYGPATH -u "$windows_path"`
30459    VS_BASE="$unix_path"
30460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30462    VS_BASE="$unix_path"
30463  fi
30464
30465    if test -d "$VS_BASE"; then
30466      if test -f "$VS_BASE/$VCVARSFILE"; then
30467        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30468$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30469        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30470        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30471        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30472        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30473      else
30474        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30475$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30476        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30477$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30478      fi
30479    fi
30480  fi
30481
30482
30483  if test "x$SDK_INSTALL_DIR" != x; then
30484    if test "x$ProgramW6432" != x; then
30485
30486  if test "x$VS_ENV_CMD" = x; then
30487    VS_VERSION="${VS_VERSION}"
30488    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30489    METHOD="well-known name"
30490
30491  windows_path="$WIN_SDK_BASE"
30492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30493    unix_path=`$CYGPATH -u "$windows_path"`
30494    WIN_SDK_BASE="$unix_path"
30495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30497    WIN_SDK_BASE="$unix_path"
30498  fi
30499
30500    if test -d "$WIN_SDK_BASE"; then
30501      # There have been cases of partial or broken SDK installations. A missing
30502      # lib dir is not going to work.
30503      if test ! -d "$WIN_SDK_BASE/lib"; then
30504        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30505$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30506        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30507$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30508      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30510$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30511        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30512        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30513          VS_ENV_ARGS="/x86"
30514        else
30515          VS_ENV_ARGS="/x64"
30516        fi
30517        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30518        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30519        # TODO: improve detection for other versions of SDK
30520        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30521      else
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30523$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30524        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30525$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30526      fi
30527    fi
30528  fi
30529
30530    fi
30531    if test "x$PROGRAMW6432" != x; then
30532
30533  if test "x$VS_ENV_CMD" = x; then
30534    VS_VERSION="${VS_VERSION}"
30535    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30536    METHOD="well-known name"
30537
30538  windows_path="$WIN_SDK_BASE"
30539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30540    unix_path=`$CYGPATH -u "$windows_path"`
30541    WIN_SDK_BASE="$unix_path"
30542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30544    WIN_SDK_BASE="$unix_path"
30545  fi
30546
30547    if test -d "$WIN_SDK_BASE"; then
30548      # There have been cases of partial or broken SDK installations. A missing
30549      # lib dir is not going to work.
30550      if test ! -d "$WIN_SDK_BASE/lib"; then
30551        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30552$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30553        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30554$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30555      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30556        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30557$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30558        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30559        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30560          VS_ENV_ARGS="/x86"
30561        else
30562          VS_ENV_ARGS="/x64"
30563        fi
30564        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30565        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30566        # TODO: improve detection for other versions of SDK
30567        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30568      else
30569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30570$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30571        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30572$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30573      fi
30574    fi
30575  fi
30576
30577    fi
30578    if test "x$PROGRAMFILES" != x; then
30579
30580  if test "x$VS_ENV_CMD" = x; then
30581    VS_VERSION="${VS_VERSION}"
30582    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30583    METHOD="well-known name"
30584
30585  windows_path="$WIN_SDK_BASE"
30586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30587    unix_path=`$CYGPATH -u "$windows_path"`
30588    WIN_SDK_BASE="$unix_path"
30589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30591    WIN_SDK_BASE="$unix_path"
30592  fi
30593
30594    if test -d "$WIN_SDK_BASE"; then
30595      # There have been cases of partial or broken SDK installations. A missing
30596      # lib dir is not going to work.
30597      if test ! -d "$WIN_SDK_BASE/lib"; then
30598        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30599$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30600        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30601$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30602      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30603        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30604$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30605        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30606        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30607          VS_ENV_ARGS="/x86"
30608        else
30609          VS_ENV_ARGS="/x64"
30610        fi
30611        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30612        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30613        # TODO: improve detection for other versions of SDK
30614        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30615      else
30616        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30617$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30618        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30619$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30620      fi
30621    fi
30622  fi
30623
30624    fi
30625
30626  if test "x$VS_ENV_CMD" = x; then
30627    VS_VERSION="${VS_VERSION}"
30628    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30629    METHOD="well-known name"
30630
30631  windows_path="$WIN_SDK_BASE"
30632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30633    unix_path=`$CYGPATH -u "$windows_path"`
30634    WIN_SDK_BASE="$unix_path"
30635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30637    WIN_SDK_BASE="$unix_path"
30638  fi
30639
30640    if test -d "$WIN_SDK_BASE"; then
30641      # There have been cases of partial or broken SDK installations. A missing
30642      # lib dir is not going to work.
30643      if test ! -d "$WIN_SDK_BASE/lib"; then
30644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30645$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30646        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30647$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30648      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30649        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30650$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30651        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30652        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30653          VS_ENV_ARGS="/x86"
30654        else
30655          VS_ENV_ARGS="/x64"
30656        fi
30657        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30658        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30659        # TODO: improve detection for other versions of SDK
30660        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30661      else
30662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30663$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30664        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30665$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30666      fi
30667    fi
30668  fi
30669
30670
30671  if test "x$VS_ENV_CMD" = x; then
30672    VS_VERSION="${VS_VERSION}"
30673    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30674    METHOD="well-known name"
30675
30676  windows_path="$WIN_SDK_BASE"
30677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30678    unix_path=`$CYGPATH -u "$windows_path"`
30679    WIN_SDK_BASE="$unix_path"
30680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30682    WIN_SDK_BASE="$unix_path"
30683  fi
30684
30685    if test -d "$WIN_SDK_BASE"; then
30686      # There have been cases of partial or broken SDK installations. A missing
30687      # lib dir is not going to work.
30688      if test ! -d "$WIN_SDK_BASE/lib"; then
30689        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30690$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30691        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30692$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30693      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30695$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30696        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30697        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30698          VS_ENV_ARGS="/x86"
30699        else
30700          VS_ENV_ARGS="/x64"
30701        fi
30702        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30703        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30704        # TODO: improve detection for other versions of SDK
30705        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30706      else
30707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30708$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30709        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30710$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30711      fi
30712    fi
30713  fi
30714
30715  fi
30716
30717    if test "x$VS_ENV_CMD" != x; then
30718      TOOLCHAIN_VERSION=$VS_VERSION
30719      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30720      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30721      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30722      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30723      # The rest of the variables are already evaled while probing
30724      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30725$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30726      break
30727    fi
30728  done
30729
30730
30731  # If we have a devkit, skip all of the below.
30732  if test "x$DEVKIT_VS_VERSION" = x; then
30733    if test "x$VS_ENV_CMD" != x; then
30734      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30735
30736  # Only process if variable expands to non-empty
30737
30738  if test "x$VS_ENV_CMD" != x; then
30739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30740
30741  # First separate the path from the arguments. This will split at the first
30742  # space.
30743  complete="$VS_ENV_CMD"
30744  path="${complete%% *}"
30745  tmp="$complete EOL"
30746  arguments="${tmp#* }"
30747
30748  # Input might be given as Windows format, start by converting to
30749  # unix format.
30750  new_path=`$CYGPATH -u "$path"`
30751
30752  # Now try to locate executable using which
30753  new_path=`$WHICH "$new_path" 2> /dev/null`
30754  # bat and cmd files are not always considered executable in cygwin causing which
30755  # to not find them
30756  if test "x$new_path" = x \
30757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30759    new_path=`$CYGPATH -u "$path"`
30760  fi
30761  if test "x$new_path" = x; then
30762    # Oops. Which didn't find the executable.
30763    # The splitting of arguments from the executable at a space might have been incorrect,
30764    # since paths with space are more likely in Windows. Give it another try with the whole
30765    # argument.
30766    path="$complete"
30767    arguments="EOL"
30768    new_path=`$CYGPATH -u "$path"`
30769    new_path=`$WHICH "$new_path" 2> /dev/null`
30770    # bat and cmd files are not always considered executable in cygwin causing which
30771    # to not find them
30772    if test "x$new_path" = x \
30773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30775      new_path=`$CYGPATH -u "$path"`
30776    fi
30777    if test "x$new_path" = x; then
30778      # It's still not found. Now this is an unrecoverable error.
30779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30780$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30781      has_space=`$ECHO "$complete" | $GREP " "`
30782      if test "x$has_space" != x; then
30783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30785      fi
30786      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30787    fi
30788  fi
30789
30790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30793  # "foo.exe" is OK but "foo" is an error.
30794  #
30795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30796  # It is also a way to make sure we got the proper file name for the real test later on.
30797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30798  if test "x$test_shortpath" = x; then
30799    # Short path failed, file does not exist as specified.
30800    # Try adding .exe or .cmd
30801    if test -f "${new_path}.exe"; then
30802      input_to_shortpath="${new_path}.exe"
30803    elif test -f "${new_path}.cmd"; then
30804      input_to_shortpath="${new_path}.cmd"
30805    else
30806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30807$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30810      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30811    fi
30812  else
30813    input_to_shortpath="$new_path"
30814  fi
30815
30816  # Call helper function which possibly converts this using DOS-style short mode.
30817  # If so, the updated path is stored in $new_path.
30818  new_path="$input_to_shortpath"
30819
30820  input_path="$input_to_shortpath"
30821  # Check if we need to convert this using DOS-style short mode. If the path
30822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30823  # take no chances and rewrite it.
30824  # Note: m4 eats our [], so we need to use [ and ] instead.
30825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30826  if test "x$has_forbidden_chars" != x; then
30827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30831      # Going to short mode and back again did indeed matter. Since short mode is
30832      # case insensitive, let's make it lowercase to improve readability.
30833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30834      # Now convert it back to Unix-style (cygpath)
30835      input_path=`$CYGPATH -u "$shortmode_path"`
30836      new_path="$input_path"
30837    fi
30838  fi
30839
30840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30841  if test "x$test_cygdrive_prefix" = x; then
30842    # As a simple fix, exclude /usr/bin since it's not a real path.
30843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30845      # a path prefixed by /cygdrive for fixpath to work.
30846      new_path="$CYGWIN_ROOT_PATH$input_path"
30847    fi
30848  fi
30849
30850  # remove trailing .exe if any
30851  new_path="${new_path/%.exe/}"
30852
30853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30854
30855  # First separate the path from the arguments. This will split at the first
30856  # space.
30857  complete="$VS_ENV_CMD"
30858  path="${complete%% *}"
30859  tmp="$complete EOL"
30860  arguments="${tmp#* }"
30861
30862  # Input might be given as Windows format, start by converting to
30863  # unix format.
30864  new_path="$path"
30865
30866  windows_path="$new_path"
30867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30868    unix_path=`$CYGPATH -u "$windows_path"`
30869    new_path="$unix_path"
30870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30872    new_path="$unix_path"
30873  fi
30874
30875
30876  # Now try to locate executable using which
30877  new_path=`$WHICH "$new_path" 2> /dev/null`
30878
30879  if test "x$new_path" = x; then
30880    # Oops. Which didn't find the executable.
30881    # The splitting of arguments from the executable at a space might have been incorrect,
30882    # since paths with space are more likely in Windows. Give it another try with the whole
30883    # argument.
30884    path="$complete"
30885    arguments="EOL"
30886    new_path="$path"
30887
30888  windows_path="$new_path"
30889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30890    unix_path=`$CYGPATH -u "$windows_path"`
30891    new_path="$unix_path"
30892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30894    new_path="$unix_path"
30895  fi
30896
30897
30898    new_path=`$WHICH "$new_path" 2> /dev/null`
30899    # bat and cmd files are not always considered executable in MSYS causing which
30900    # to not find them
30901    if test "x$new_path" = x \
30902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30904      new_path="$path"
30905
30906  windows_path="$new_path"
30907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30908    unix_path=`$CYGPATH -u "$windows_path"`
30909    new_path="$unix_path"
30910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30912    new_path="$unix_path"
30913  fi
30914
30915    fi
30916
30917    if test "x$new_path" = x; then
30918      # It's still not found. Now this is an unrecoverable error.
30919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30920$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30921      has_space=`$ECHO "$complete" | $GREP " "`
30922      if test "x$has_space" != x; then
30923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30925      fi
30926      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30927    fi
30928  fi
30929
30930  # Now new_path has a complete unix path to the binary
30931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30932    # Keep paths in /bin as-is, but remove trailing .exe if any
30933    new_path="${new_path/%.exe/}"
30934    # Do not save /bin paths to all_fixpath_prefixes!
30935  else
30936    # Not in mixed or Windows style, start by that.
30937    new_path=`cmd //c echo $new_path`
30938
30939  input_path="$new_path"
30940  # Check if we need to convert this using DOS-style short mode. If the path
30941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30942  # take no chances and rewrite it.
30943  # Note: m4 eats our [], so we need to use [ and ] instead.
30944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30945  if test "x$has_forbidden_chars" != x; then
30946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30948  fi
30949
30950    # Output is in $new_path
30951
30952  windows_path="$new_path"
30953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30954    unix_path=`$CYGPATH -u "$windows_path"`
30955    new_path="$unix_path"
30956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30958    new_path="$unix_path"
30959  fi
30960
30961    # remove trailing .exe if any
30962    new_path="${new_path/%.exe/}"
30963
30964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30966  fi
30967
30968    else
30969      # We're on a unix platform. Hooray! :)
30970      # First separate the path from the arguments. This will split at the first
30971      # space.
30972      complete="$VS_ENV_CMD"
30973      path="${complete%% *}"
30974      tmp="$complete EOL"
30975      arguments="${tmp#* }"
30976
30977      # Cannot rely on the command "which" here since it doesn't always work.
30978      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30979      if test -z "$is_absolute_path"; then
30980        # Path to executable is not absolute. Find it.
30981        IFS_save="$IFS"
30982        IFS=:
30983        for p in $PATH; do
30984          if test -f "$p/$path" && test -x "$p/$path"; then
30985            new_path="$p/$path"
30986            break
30987          fi
30988        done
30989        IFS="$IFS_save"
30990      else
30991        # This is an absolute path, we can use it without further modifications.
30992        new_path="$path"
30993      fi
30994
30995      if test "x$new_path" = x; then
30996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30997$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30998        has_space=`$ECHO "$complete" | $GREP " "`
30999        if test "x$has_space" != x; then
31000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31002        fi
31003        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31004      fi
31005    fi
31006
31007    # Now join together the path and the arguments once again
31008    if test "x$arguments" != xEOL; then
31009      new_complete="$new_path ${arguments% *}"
31010    else
31011      new_complete="$new_path"
31012    fi
31013
31014    if test "x$complete" != "x$new_complete"; then
31015      VS_ENV_CMD="$new_complete"
31016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31017$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31018    fi
31019  fi
31020
31021
31022      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31023      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31024$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31025
31026      # We need to create a couple of temporary files.
31027      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31028      $MKDIR -p $VS_ENV_TMP_DIR
31029
31030      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31031      # Instead create a shell script which will set the relevant variables when run.
31032      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31033
31034  unix_path="$WINPATH_VS_ENV_CMD"
31035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31036    windows_path=`$CYGPATH -m "$unix_path"`
31037    WINPATH_VS_ENV_CMD="$windows_path"
31038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31039    windows_path=`cmd //c echo $unix_path`
31040    WINPATH_VS_ENV_CMD="$windows_path"
31041  fi
31042
31043      WINPATH_BASH="$BASH"
31044
31045  unix_path="$WINPATH_BASH"
31046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31047    windows_path=`$CYGPATH -m "$unix_path"`
31048    WINPATH_BASH="$windows_path"
31049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31050    windows_path=`cmd //c echo $unix_path`
31051    WINPATH_BASH="$windows_path"
31052  fi
31053
31054
31055      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31056      # script (executable by bash) that will setup the important variables.
31057      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31058      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31059      # This will end up something like:
31060      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31061      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31062      # These will end up something like:
31063      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31064      # The trailing space for everyone except PATH is no typo, but is needed due
31065      # to trailing \ in the Windows paths. These will be stripped later.
31066      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31067          >> $EXTRACT_VC_ENV_BAT_FILE
31068      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31069          >> $EXTRACT_VC_ENV_BAT_FILE
31070      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31071          >> $EXTRACT_VC_ENV_BAT_FILE
31072      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31073          >> $EXTRACT_VC_ENV_BAT_FILE
31074      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31075          >> $EXTRACT_VC_ENV_BAT_FILE
31076      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31077          >> $EXTRACT_VC_ENV_BAT_FILE
31078
31079      # Now execute the newly created bat file.
31080      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31081      # Change directory so we don't need to mess with Windows paths in redirects.
31082      cd $VS_ENV_TMP_DIR
31083      cmd /c extract-vs-env.bat | $CAT
31084      cd $CURDIR
31085
31086      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31088$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31089        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31090$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31091        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31092$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31093        as_fn_error $? "Cannot continue" "$LINENO" 5
31094      fi
31095
31096      # Now set all paths and other env variables. This will allow the rest of
31097      # the configure script to find and run the compiler in the proper way.
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31099$as_echo "$as_me: Setting extracted environment variables" >&6;}
31100      . $VS_ENV_TMP_DIR/set-vs-env.sh
31101      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31102      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31103    else
31104      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31105      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31106$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31107    fi
31108  fi
31109
31110  # At this point, we should have correct variables in the environment, or we can't continue.
31111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31112$as_echo_n "checking for Visual Studio variables... " >&6; }
31113
31114  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31115      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31116    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31117      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31118$as_echo "present but broken" >&6; }
31119      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31120    else
31121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31122$as_echo "ok" >&6; }
31123      # Remove any trailing "\" ";" and " " from the variables.
31124      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31125      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31126      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31127      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31128      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31129      # Remove any paths containing # (typically F#) as that messes up make. This
31130      # is needed if visual studio was installed with F# support.
31131      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31132
31133
31134
31135
31136
31137      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31138      OLDIFS="$IFS"
31139      IFS=";"
31140      for i in $VS_INCLUDE; do
31141        ipath=$i
31142        # Only process non-empty elements
31143        if test "x$ipath" != x; then
31144          IFS="$OLDIFS"
31145          # Check that directory exists before calling fixup_path
31146          testpath=$ipath
31147
31148  windows_path="$testpath"
31149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31150    unix_path=`$CYGPATH -u "$windows_path"`
31151    testpath="$unix_path"
31152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31154    testpath="$unix_path"
31155  fi
31156
31157          if test -d "$testpath"; then
31158
31159  # Only process if variable expands to non-empty
31160
31161  if test "x$ipath" != x; then
31162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31163
31164  # Input might be given as Windows format, start by converting to
31165  # unix format.
31166  path="$ipath"
31167  new_path=`$CYGPATH -u "$path"`
31168
31169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31172  # "foo.exe" is OK but "foo" is an error.
31173  #
31174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31175  # It is also a way to make sure we got the proper file name for the real test later on.
31176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31177  if test "x$test_shortpath" = x; then
31178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31179$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31180    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31181  fi
31182
31183  # Call helper function which possibly converts this using DOS-style short mode.
31184  # If so, the updated path is stored in $new_path.
31185
31186  input_path="$new_path"
31187  # Check if we need to convert this using DOS-style short mode. If the path
31188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31189  # take no chances and rewrite it.
31190  # Note: m4 eats our [], so we need to use [ and ] instead.
31191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31192  if test "x$has_forbidden_chars" != x; then
31193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31197      # Going to short mode and back again did indeed matter. Since short mode is
31198      # case insensitive, let's make it lowercase to improve readability.
31199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31200      # Now convert it back to Unix-style (cygpath)
31201      input_path=`$CYGPATH -u "$shortmode_path"`
31202      new_path="$input_path"
31203    fi
31204  fi
31205
31206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31207  if test "x$test_cygdrive_prefix" = x; then
31208    # As a simple fix, exclude /usr/bin since it's not a real path.
31209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31211      # a path prefixed by /cygdrive for fixpath to work.
31212      new_path="$CYGWIN_ROOT_PATH$input_path"
31213    fi
31214  fi
31215
31216
31217  if test "x$path" != "x$new_path"; then
31218    ipath="$new_path"
31219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31220$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31221  fi
31222
31223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31224
31225  path="$ipath"
31226  has_colon=`$ECHO $path | $GREP ^.:`
31227  new_path="$path"
31228  if test "x$has_colon" = x; then
31229    # Not in mixed or Windows style, start by that.
31230    new_path=`cmd //c echo $path`
31231  fi
31232
31233
31234  input_path="$new_path"
31235  # Check if we need to convert this using DOS-style short mode. If the path
31236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31237  # take no chances and rewrite it.
31238  # Note: m4 eats our [], so we need to use [ and ] instead.
31239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31240  if test "x$has_forbidden_chars" != x; then
31241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31243  fi
31244
31245
31246  windows_path="$new_path"
31247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31248    unix_path=`$CYGPATH -u "$windows_path"`
31249    new_path="$unix_path"
31250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31252    new_path="$unix_path"
31253  fi
31254
31255  if test "x$path" != "x$new_path"; then
31256    ipath="$new_path"
31257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31258$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31259  fi
31260
31261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31263
31264    else
31265      # We're on a unix platform. Hooray! :)
31266      path="$ipath"
31267      has_space=`$ECHO "$path" | $GREP " "`
31268      if test "x$has_space" != x; then
31269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31270$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31272      fi
31273
31274      # Use eval to expand a potential ~
31275      eval path="$path"
31276      if test ! -f "$path" && test ! -d "$path"; then
31277        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31278      fi
31279
31280      if test -d "$path"; then
31281        ipath="`cd "$path"; $THEPWDCMD -L`"
31282      else
31283        dir="`$DIRNAME "$path"`"
31284        base="`$BASENAME "$path"`"
31285        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31286      fi
31287    fi
31288  fi
31289
31290            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31291          fi
31292          IFS=";"
31293        fi
31294      done
31295      # Convert VS_LIB into SYSROOT_LDFLAGS
31296      for i in $VS_LIB; do
31297        libpath=$i
31298        # Only process non-empty elements
31299        if test "x$libpath" != x; then
31300          IFS="$OLDIFS"
31301          # Check that directory exists before calling fixup_path
31302          testpath=$libpath
31303
31304  windows_path="$testpath"
31305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31306    unix_path=`$CYGPATH -u "$windows_path"`
31307    testpath="$unix_path"
31308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31310    testpath="$unix_path"
31311  fi
31312
31313          if test -d "$testpath"; then
31314
31315  # Only process if variable expands to non-empty
31316
31317  if test "x$libpath" != x; then
31318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31319
31320  # Input might be given as Windows format, start by converting to
31321  # unix format.
31322  path="$libpath"
31323  new_path=`$CYGPATH -u "$path"`
31324
31325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31328  # "foo.exe" is OK but "foo" is an error.
31329  #
31330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31331  # It is also a way to make sure we got the proper file name for the real test later on.
31332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31333  if test "x$test_shortpath" = x; then
31334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31335$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31336    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31337  fi
31338
31339  # Call helper function which possibly converts this using DOS-style short mode.
31340  # If so, the updated path is stored in $new_path.
31341
31342  input_path="$new_path"
31343  # Check if we need to convert this using DOS-style short mode. If the path
31344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31345  # take no chances and rewrite it.
31346  # Note: m4 eats our [], so we need to use [ and ] instead.
31347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31348  if test "x$has_forbidden_chars" != x; then
31349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31353      # Going to short mode and back again did indeed matter. Since short mode is
31354      # case insensitive, let's make it lowercase to improve readability.
31355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31356      # Now convert it back to Unix-style (cygpath)
31357      input_path=`$CYGPATH -u "$shortmode_path"`
31358      new_path="$input_path"
31359    fi
31360  fi
31361
31362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31363  if test "x$test_cygdrive_prefix" = x; then
31364    # As a simple fix, exclude /usr/bin since it's not a real path.
31365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31367      # a path prefixed by /cygdrive for fixpath to work.
31368      new_path="$CYGWIN_ROOT_PATH$input_path"
31369    fi
31370  fi
31371
31372
31373  if test "x$path" != "x$new_path"; then
31374    libpath="$new_path"
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31376$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31377  fi
31378
31379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31380
31381  path="$libpath"
31382  has_colon=`$ECHO $path | $GREP ^.:`
31383  new_path="$path"
31384  if test "x$has_colon" = x; then
31385    # Not in mixed or Windows style, start by that.
31386    new_path=`cmd //c echo $path`
31387  fi
31388
31389
31390  input_path="$new_path"
31391  # Check if we need to convert this using DOS-style short mode. If the path
31392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31393  # take no chances and rewrite it.
31394  # Note: m4 eats our [], so we need to use [ and ] instead.
31395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31396  if test "x$has_forbidden_chars" != x; then
31397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31399  fi
31400
31401
31402  windows_path="$new_path"
31403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31404    unix_path=`$CYGPATH -u "$windows_path"`
31405    new_path="$unix_path"
31406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31408    new_path="$unix_path"
31409  fi
31410
31411  if test "x$path" != "x$new_path"; then
31412    libpath="$new_path"
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31414$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31415  fi
31416
31417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31419
31420    else
31421      # We're on a unix platform. Hooray! :)
31422      path="$libpath"
31423      has_space=`$ECHO "$path" | $GREP " "`
31424      if test "x$has_space" != x; then
31425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31426$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31428      fi
31429
31430      # Use eval to expand a potential ~
31431      eval path="$path"
31432      if test ! -f "$path" && test ! -d "$path"; then
31433        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31434      fi
31435
31436      if test -d "$path"; then
31437        libpath="`cd "$path"; $THEPWDCMD -L`"
31438      else
31439        dir="`$DIRNAME "$path"`"
31440        base="`$BASENAME "$path"`"
31441        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31442      fi
31443    fi
31444  fi
31445
31446            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31447          fi
31448          IFS=";"
31449        fi
31450      done
31451      IFS="$OLDIFS"
31452    fi
31453  else
31454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31455$as_echo "not found" >&6; }
31456
31457    if test "x$VS_ENV_CMD" = x; then
31458      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31459$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31460      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31461$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31462    else
31463      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31464$as_echo "$as_me: Running the extraction script failed." >&6;}
31465    fi
31466    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31467$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31468    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31469$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31470    as_fn_error $? "Cannot continue" "$LINENO" 5
31471  fi
31472
31473    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31474    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31475    PATH="$VS_PATH"
31476    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31477    export INCLUDE="$VS_INCLUDE"
31478    export LIB="$VS_LIB"
31479  else
31480    # Currently we do not define this for other toolchains. This might change as the need arise.
31481    TOOLCHAIN_VERSION=
31482  fi
31483
31484
31485  # For solaris we really need solaris tools, and not the GNU equivalent.
31486  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31487  # so add that to path before starting to probe.
31488  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31489  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31490    PATH="/usr/ccs/bin:$PATH"
31491  fi
31492
31493  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31494  # override all other locations.
31495  if test "x$TOOLCHAIN_PATH" != x; then
31496    PATH=$TOOLCHAIN_PATH:$PATH
31497  fi
31498
31499
31500  #
31501  # Setup the compilers (CC and CXX)
31502  #
31503
31504  COMPILER_NAME=C
31505  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31506
31507  if test "x$CC" != x; then
31508    # User has supplied compiler name already, always let that override.
31509    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31510$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31511    if test "x`basename $CC`" = "x$CC"; then
31512      # A command without a complete path is provided, search $PATH.
31513
31514      for ac_prog in $CC
31515do
31516  # Extract the first word of "$ac_prog", so it can be a program name with args.
31517set dummy $ac_prog; ac_word=$2
31518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31519$as_echo_n "checking for $ac_word... " >&6; }
31520if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31521  $as_echo_n "(cached) " >&6
31522else
31523  case $POTENTIAL_CC in
31524  [\\/]* | ?:[\\/]*)
31525  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31526  ;;
31527  *)
31528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31529for as_dir in $PATH
31530do
31531  IFS=$as_save_IFS
31532  test -z "$as_dir" && as_dir=.
31533    for ac_exec_ext in '' $ac_executable_extensions; do
31534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31535    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31537    break 2
31538  fi
31539done
31540  done
31541IFS=$as_save_IFS
31542
31543  ;;
31544esac
31545fi
31546POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31547if test -n "$POTENTIAL_CC"; then
31548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31549$as_echo "$POTENTIAL_CC" >&6; }
31550else
31551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31552$as_echo "no" >&6; }
31553fi
31554
31555
31556  test -n "$POTENTIAL_CC" && break
31557done
31558
31559      if test "x$POTENTIAL_CC" != x; then
31560        CC=$POTENTIAL_CC
31561      else
31562        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31563      fi
31564    else
31565      # Otherwise it might already be a complete path
31566      if test ! -x "$CC"; then
31567        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31568      fi
31569    fi
31570  else
31571    # No user supplied value. Locate compiler ourselves.
31572
31573    # If we are cross compiling, assume cross compilation tools follows the
31574    # cross compilation standard where they are prefixed with the autoconf
31575    # standard name for the target. For example the binary
31576    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31577    # If we are not cross compiling, then the default compiler name will be
31578    # used.
31579
31580    CC=
31581    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31582    # before checking the rest of the PATH.
31583    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31584    # step, this should not be necessary.
31585    if test -n "$TOOLCHAIN_PATH"; then
31586      PATH_save="$PATH"
31587      PATH="$TOOLCHAIN_PATH"
31588      for ac_prog in $SEARCH_LIST
31589do
31590  # Extract the first word of "$ac_prog", so it can be a program name with args.
31591set dummy $ac_prog; ac_word=$2
31592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31593$as_echo_n "checking for $ac_word... " >&6; }
31594if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31595  $as_echo_n "(cached) " >&6
31596else
31597  case $TOOLCHAIN_PATH_CC in
31598  [\\/]* | ?:[\\/]*)
31599  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31600  ;;
31601  *)
31602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31603for as_dir in $PATH
31604do
31605  IFS=$as_save_IFS
31606  test -z "$as_dir" && as_dir=.
31607    for ac_exec_ext in '' $ac_executable_extensions; do
31608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31609    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31611    break 2
31612  fi
31613done
31614  done
31615IFS=$as_save_IFS
31616
31617  ;;
31618esac
31619fi
31620TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31621if test -n "$TOOLCHAIN_PATH_CC"; then
31622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31623$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31624else
31625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31626$as_echo "no" >&6; }
31627fi
31628
31629
31630  test -n "$TOOLCHAIN_PATH_CC" && break
31631done
31632
31633      CC=$TOOLCHAIN_PATH_CC
31634      PATH="$PATH_save"
31635    fi
31636
31637    # AC_PATH_PROGS can't be run multiple times with the same variable,
31638    # so create a new name for this run.
31639    if test "x$CC" = x; then
31640      for ac_prog in $SEARCH_LIST
31641do
31642  # Extract the first word of "$ac_prog", so it can be a program name with args.
31643set dummy $ac_prog; ac_word=$2
31644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31645$as_echo_n "checking for $ac_word... " >&6; }
31646if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31647  $as_echo_n "(cached) " >&6
31648else
31649  case $POTENTIAL_CC in
31650  [\\/]* | ?:[\\/]*)
31651  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31652  ;;
31653  *)
31654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31655for as_dir in $PATH
31656do
31657  IFS=$as_save_IFS
31658  test -z "$as_dir" && as_dir=.
31659    for ac_exec_ext in '' $ac_executable_extensions; do
31660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31661    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31663    break 2
31664  fi
31665done
31666  done
31667IFS=$as_save_IFS
31668
31669  ;;
31670esac
31671fi
31672POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31673if test -n "$POTENTIAL_CC"; then
31674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31675$as_echo "$POTENTIAL_CC" >&6; }
31676else
31677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31678$as_echo "no" >&6; }
31679fi
31680
31681
31682  test -n "$POTENTIAL_CC" && break
31683done
31684
31685      CC=$POTENTIAL_CC
31686    fi
31687
31688    if test "x$CC" = x; then
31689
31690  # Print a helpful message on how to acquire the necessary build dependency.
31691  # devkit is the help tag: freetype, cups, alsa etc
31692  MISSING_DEPENDENCY=devkit
31693
31694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31695    cygwin_help $MISSING_DEPENDENCY
31696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31697    msys_help $MISSING_DEPENDENCY
31698  else
31699    PKGHANDLER_COMMAND=
31700
31701    case $PKGHANDLER in
31702      apt-get)
31703        apt_help     $MISSING_DEPENDENCY ;;
31704      yum)
31705        yum_help     $MISSING_DEPENDENCY ;;
31706      port)
31707        port_help    $MISSING_DEPENDENCY ;;
31708      pkgutil)
31709        pkgutil_help $MISSING_DEPENDENCY ;;
31710      pkgadd)
31711        pkgadd_help  $MISSING_DEPENDENCY ;;
31712    esac
31713
31714    if test "x$PKGHANDLER_COMMAND" != x; then
31715      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31716    fi
31717  fi
31718
31719      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31720    fi
31721  fi
31722
31723  # Now we have a compiler binary in CC. Make sure it's okay.
31724
31725  # Only process if variable expands to non-empty
31726
31727  if test "x$CC" != x; then
31728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31729
31730  # First separate the path from the arguments. This will split at the first
31731  # space.
31732  complete="$CC"
31733  path="${complete%% *}"
31734  tmp="$complete EOL"
31735  arguments="${tmp#* }"
31736
31737  # Input might be given as Windows format, start by converting to
31738  # unix format.
31739  new_path=`$CYGPATH -u "$path"`
31740
31741  # Now try to locate executable using which
31742  new_path=`$WHICH "$new_path" 2> /dev/null`
31743  # bat and cmd files are not always considered executable in cygwin causing which
31744  # to not find them
31745  if test "x$new_path" = x \
31746      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31747      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31748    new_path=`$CYGPATH -u "$path"`
31749  fi
31750  if test "x$new_path" = x; then
31751    # Oops. Which didn't find the executable.
31752    # The splitting of arguments from the executable at a space might have been incorrect,
31753    # since paths with space are more likely in Windows. Give it another try with the whole
31754    # argument.
31755    path="$complete"
31756    arguments="EOL"
31757    new_path=`$CYGPATH -u "$path"`
31758    new_path=`$WHICH "$new_path" 2> /dev/null`
31759    # bat and cmd files are not always considered executable in cygwin causing which
31760    # to not find them
31761    if test "x$new_path" = x \
31762        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31763        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31764      new_path=`$CYGPATH -u "$path"`
31765    fi
31766    if test "x$new_path" = x; then
31767      # It's still not found. Now this is an unrecoverable error.
31768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31769$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31770      has_space=`$ECHO "$complete" | $GREP " "`
31771      if test "x$has_space" != x; then
31772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31774      fi
31775      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31776    fi
31777  fi
31778
31779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31782  # "foo.exe" is OK but "foo" is an error.
31783  #
31784  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31785  # It is also a way to make sure we got the proper file name for the real test later on.
31786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31787  if test "x$test_shortpath" = x; then
31788    # Short path failed, file does not exist as specified.
31789    # Try adding .exe or .cmd
31790    if test -f "${new_path}.exe"; then
31791      input_to_shortpath="${new_path}.exe"
31792    elif test -f "${new_path}.cmd"; then
31793      input_to_shortpath="${new_path}.cmd"
31794    else
31795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31796$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31797      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31798$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31799      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31800    fi
31801  else
31802    input_to_shortpath="$new_path"
31803  fi
31804
31805  # Call helper function which possibly converts this using DOS-style short mode.
31806  # If so, the updated path is stored in $new_path.
31807  new_path="$input_to_shortpath"
31808
31809  input_path="$input_to_shortpath"
31810  # Check if we need to convert this using DOS-style short mode. If the path
31811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31812  # take no chances and rewrite it.
31813  # Note: m4 eats our [], so we need to use [ and ] instead.
31814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31815  if test "x$has_forbidden_chars" != x; then
31816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31820      # Going to short mode and back again did indeed matter. Since short mode is
31821      # case insensitive, let's make it lowercase to improve readability.
31822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31823      # Now convert it back to Unix-style (cygpath)
31824      input_path=`$CYGPATH -u "$shortmode_path"`
31825      new_path="$input_path"
31826    fi
31827  fi
31828
31829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31830  if test "x$test_cygdrive_prefix" = x; then
31831    # As a simple fix, exclude /usr/bin since it's not a real path.
31832    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31834      # a path prefixed by /cygdrive for fixpath to work.
31835      new_path="$CYGWIN_ROOT_PATH$input_path"
31836    fi
31837  fi
31838
31839  # remove trailing .exe if any
31840  new_path="${new_path/%.exe/}"
31841
31842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31843
31844  # First separate the path from the arguments. This will split at the first
31845  # space.
31846  complete="$CC"
31847  path="${complete%% *}"
31848  tmp="$complete EOL"
31849  arguments="${tmp#* }"
31850
31851  # Input might be given as Windows format, start by converting to
31852  # unix format.
31853  new_path="$path"
31854
31855  windows_path="$new_path"
31856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31857    unix_path=`$CYGPATH -u "$windows_path"`
31858    new_path="$unix_path"
31859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31861    new_path="$unix_path"
31862  fi
31863
31864
31865  # Now try to locate executable using which
31866  new_path=`$WHICH "$new_path" 2> /dev/null`
31867
31868  if test "x$new_path" = x; then
31869    # Oops. Which didn't find the executable.
31870    # The splitting of arguments from the executable at a space might have been incorrect,
31871    # since paths with space are more likely in Windows. Give it another try with the whole
31872    # argument.
31873    path="$complete"
31874    arguments="EOL"
31875    new_path="$path"
31876
31877  windows_path="$new_path"
31878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31879    unix_path=`$CYGPATH -u "$windows_path"`
31880    new_path="$unix_path"
31881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31883    new_path="$unix_path"
31884  fi
31885
31886
31887    new_path=`$WHICH "$new_path" 2> /dev/null`
31888    # bat and cmd files are not always considered executable in MSYS causing which
31889    # to not find them
31890    if test "x$new_path" = x \
31891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31893      new_path="$path"
31894
31895  windows_path="$new_path"
31896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31897    unix_path=`$CYGPATH -u "$windows_path"`
31898    new_path="$unix_path"
31899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31901    new_path="$unix_path"
31902  fi
31903
31904    fi
31905
31906    if test "x$new_path" = x; then
31907      # It's still not found. Now this is an unrecoverable error.
31908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31909$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31910      has_space=`$ECHO "$complete" | $GREP " "`
31911      if test "x$has_space" != x; then
31912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31914      fi
31915      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31916    fi
31917  fi
31918
31919  # Now new_path has a complete unix path to the binary
31920  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31921    # Keep paths in /bin as-is, but remove trailing .exe if any
31922    new_path="${new_path/%.exe/}"
31923    # Do not save /bin paths to all_fixpath_prefixes!
31924  else
31925    # Not in mixed or Windows style, start by that.
31926    new_path=`cmd //c echo $new_path`
31927
31928  input_path="$new_path"
31929  # Check if we need to convert this using DOS-style short mode. If the path
31930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31931  # take no chances and rewrite it.
31932  # Note: m4 eats our [], so we need to use [ and ] instead.
31933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31934  if test "x$has_forbidden_chars" != x; then
31935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31937  fi
31938
31939    # Output is in $new_path
31940
31941  windows_path="$new_path"
31942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31943    unix_path=`$CYGPATH -u "$windows_path"`
31944    new_path="$unix_path"
31945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31947    new_path="$unix_path"
31948  fi
31949
31950    # remove trailing .exe if any
31951    new_path="${new_path/%.exe/}"
31952
31953    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31954    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31955  fi
31956
31957    else
31958      # We're on a unix platform. Hooray! :)
31959      # First separate the path from the arguments. This will split at the first
31960      # space.
31961      complete="$CC"
31962      path="${complete%% *}"
31963      tmp="$complete EOL"
31964      arguments="${tmp#* }"
31965
31966      # Cannot rely on the command "which" here since it doesn't always work.
31967      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31968      if test -z "$is_absolute_path"; then
31969        # Path to executable is not absolute. Find it.
31970        IFS_save="$IFS"
31971        IFS=:
31972        for p in $PATH; do
31973          if test -f "$p/$path" && test -x "$p/$path"; then
31974            new_path="$p/$path"
31975            break
31976          fi
31977        done
31978        IFS="$IFS_save"
31979      else
31980        # This is an absolute path, we can use it without further modifications.
31981        new_path="$path"
31982      fi
31983
31984      if test "x$new_path" = x; then
31985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31986$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31987        has_space=`$ECHO "$complete" | $GREP " "`
31988        if test "x$has_space" != x; then
31989          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31990$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31991        fi
31992        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31993      fi
31994    fi
31995
31996    # Now join together the path and the arguments once again
31997    if test "x$arguments" != xEOL; then
31998      new_complete="$new_path ${arguments% *}"
31999    else
32000      new_complete="$new_path"
32001    fi
32002
32003    if test "x$complete" != "x$new_complete"; then
32004      CC="$new_complete"
32005      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32006$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32007    fi
32008  fi
32009
32010  TEST_COMPILER="$CC"
32011
32012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32013$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32014  SYMLINK_ORIGINAL="$TEST_COMPILER"
32015
32016  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32017    # Follow a chain of symbolic links. Use readlink
32018    # where it exists, else fall back to horribly
32019    # complicated shell code.
32020    if test "x$READLINK_TESTED" != yes; then
32021      # On MacOSX there is a readlink tool with a different
32022      # purpose than the GNU readlink tool. Check the found readlink.
32023      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32024      if test "x$ISGNU" = x; then
32025        # A readlink that we do not know how to use.
32026        # Are there other non-GNU readlinks out there?
32027        READLINK_TESTED=yes
32028        READLINK=
32029      fi
32030    fi
32031
32032    if test "x$READLINK" != x; then
32033      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32034    else
32035      # Save the current directory for restoring afterwards
32036      STARTDIR=$PWD
32037      COUNTER=0
32038      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32039      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32040      cd $sym_link_dir
32041      # Use -P flag to resolve symlinks in directories.
32042      cd `$THEPWDCMD -P`
32043      sym_link_dir=`$THEPWDCMD -P`
32044      # Resolve file symlinks
32045      while test $COUNTER -lt 20; do
32046        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32047        if test "x$ISLINK" == x; then
32048          # This is not a symbolic link! We are done!
32049          break
32050        fi
32051        # Again resolve directory symlinks since the target of the just found
32052        # link could be in a different directory
32053        cd `$DIRNAME $ISLINK`
32054        sym_link_dir=`$THEPWDCMD -P`
32055        sym_link_file=`$BASENAME $ISLINK`
32056        let COUNTER=COUNTER+1
32057      done
32058      cd $STARTDIR
32059      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32060    fi
32061  fi
32062
32063  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32065$as_echo "no symlink" >&6; }
32066  else
32067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32068$as_echo "$SYMLINK_ORIGINAL" >&6; }
32069
32070    # We can't handle ccache by gcc wrappers, since we need to know if we're
32071    # using ccache. Instead ccache usage must be controlled by a configure option.
32072    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32073    if test "x$COMPILER_BASENAME" = "xccache"; then
32074      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32075$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32076      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32077    fi
32078  fi
32079
32080
32081  COMPILER=$CC
32082  COMPILER_NAME=$COMPILER_NAME
32083
32084  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32085    # cc -V output typically looks like
32086    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32087    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32088    # Check that this is likely to be the Solaris Studio cc.
32089    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32090    if test $? -ne 0; then
32091      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32092      { $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
32093$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32095$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32096      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32097$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32098      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32099    fi
32100    # Remove usage instructions (if present), and
32101    # collapse compiler output into a single line
32102    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32103        $SED -e 's/ *[Uu]sage:.*//'`
32104    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32105        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32106  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32107    # xlc -qversion output typically looks like
32108    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32109    #     Version: 11.01.0000.0015
32110    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32111    # Check that this is likely to be the IBM XL C compiler.
32112    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32113    if test $? -ne 0; then
32114      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32115      { $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
32116$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32117      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32118$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32119      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32120$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32121      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32122    fi
32123    # Collapse compiler output into a single line
32124    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32125    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32126        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32127  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32128    # There is no specific version flag, but all output starts with a version string.
32129    # First line typically looks something like:
32130    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32131    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32132    # Check that this is likely to be Microsoft CL.EXE.
32133    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32134    if test $? -ne 0; then
32135      { $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
32136$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32137      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32138$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32139      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32140    fi
32141    # Collapse compiler output into a single line
32142    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32143    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32144        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32145  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32146    # gcc --version output typically looks like
32147    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32148    #     Copyright (C) 2013 Free Software Foundation, Inc.
32149    #     This is free software; see the source for copying conditions.  There is NO
32150    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32151    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32152    # Check that this is likely to be GCC.
32153    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32154    if test $? -ne 0; then
32155      { $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
32156$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32157      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32158$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32159      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32160    fi
32161    # Remove Copyright and legalese from version string, and
32162    # collapse into a single line
32163    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32164        $SED -e 's/ *Copyright .*//'`
32165    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32166        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32167  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32168    # clang --version output typically looks like
32169    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32170    #    clang version 3.3 (tags/RELEASE_33/final)
32171    # or
32172    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32173    #    Target: x86_64-pc-linux-gnu
32174    #    Thread model: posix
32175    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32176    # Check that this is likely to be clang
32177    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32178    if test $? -ne 0; then
32179      { $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
32180$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32181      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32182$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32183      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32184    fi
32185    # Collapse compiler output into a single line
32186    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32187    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32188        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32189  else
32190      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32191  fi
32192  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32193  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32194  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32195  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32196
32197  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32198$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32199
32200
32201  # Now that we have resolved CC ourself, let autoconf have its go at it
32202  ac_ext=c
32203ac_cpp='$CPP $CPPFLAGS'
32204ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32205ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32206ac_compiler_gnu=$ac_cv_c_compiler_gnu
32207if test -n "$ac_tool_prefix"; then
32208  for ac_prog in $CC
32209  do
32210    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32211set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32213$as_echo_n "checking for $ac_word... " >&6; }
32214if ${ac_cv_prog_CC+:} false; then :
32215  $as_echo_n "(cached) " >&6
32216else
32217  if test -n "$CC"; then
32218  ac_cv_prog_CC="$CC" # Let the user override the test.
32219else
32220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32221for as_dir in $PATH
32222do
32223  IFS=$as_save_IFS
32224  test -z "$as_dir" && as_dir=.
32225    for ac_exec_ext in '' $ac_executable_extensions; do
32226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32227    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32229    break 2
32230  fi
32231done
32232  done
32233IFS=$as_save_IFS
32234
32235fi
32236fi
32237CC=$ac_cv_prog_CC
32238if test -n "$CC"; then
32239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32240$as_echo "$CC" >&6; }
32241else
32242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32243$as_echo "no" >&6; }
32244fi
32245
32246
32247    test -n "$CC" && break
32248  done
32249fi
32250if test -z "$CC"; then
32251  ac_ct_CC=$CC
32252  for ac_prog in $CC
32253do
32254  # Extract the first word of "$ac_prog", so it can be a program name with args.
32255set dummy $ac_prog; ac_word=$2
32256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32257$as_echo_n "checking for $ac_word... " >&6; }
32258if ${ac_cv_prog_ac_ct_CC+:} false; then :
32259  $as_echo_n "(cached) " >&6
32260else
32261  if test -n "$ac_ct_CC"; then
32262  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32263else
32264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32265for as_dir in $PATH
32266do
32267  IFS=$as_save_IFS
32268  test -z "$as_dir" && as_dir=.
32269    for ac_exec_ext in '' $ac_executable_extensions; do
32270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32271    ac_cv_prog_ac_ct_CC="$ac_prog"
32272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32273    break 2
32274  fi
32275done
32276  done
32277IFS=$as_save_IFS
32278
32279fi
32280fi
32281ac_ct_CC=$ac_cv_prog_ac_ct_CC
32282if test -n "$ac_ct_CC"; then
32283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32284$as_echo "$ac_ct_CC" >&6; }
32285else
32286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32287$as_echo "no" >&6; }
32288fi
32289
32290
32291  test -n "$ac_ct_CC" && break
32292done
32293
32294  if test "x$ac_ct_CC" = x; then
32295    CC=""
32296  else
32297    case $cross_compiling:$ac_tool_warned in
32298yes:)
32299{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32300$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32301ac_tool_warned=yes ;;
32302esac
32303    CC=$ac_ct_CC
32304  fi
32305fi
32306
32307
32308test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32310as_fn_error $? "no acceptable C compiler found in \$PATH
32311See \`config.log' for more details" "$LINENO" 5; }
32312
32313# Provide some information about the compiler.
32314$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32315set X $ac_compile
32316ac_compiler=$2
32317for ac_option in --version -v -V -qversion; do
32318  { { ac_try="$ac_compiler $ac_option >&5"
32319case "(($ac_try" in
32320  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32321  *) ac_try_echo=$ac_try;;
32322esac
32323eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32324$as_echo "$ac_try_echo"; } >&5
32325  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32326  ac_status=$?
32327  if test -s conftest.err; then
32328    sed '10a\
32329... rest of stderr output deleted ...
32330         10q' conftest.err >conftest.er1
32331    cat conftest.er1 >&5
32332  fi
32333  rm -f conftest.er1 conftest.err
32334  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32335  test $ac_status = 0; }
32336done
32337
32338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32339/* end confdefs.h.  */
32340
32341int
32342main ()
32343{
32344
32345  ;
32346  return 0;
32347}
32348_ACEOF
32349ac_clean_files_save=$ac_clean_files
32350ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32351# Try to create an executable without -o first, disregard a.out.
32352# It will help us diagnose broken compilers, and finding out an intuition
32353# of exeext.
32354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32355$as_echo_n "checking whether the C compiler works... " >&6; }
32356ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32357
32358# The possible output files:
32359ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32360
32361ac_rmfiles=
32362for ac_file in $ac_files
32363do
32364  case $ac_file in
32365    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32366    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32367  esac
32368done
32369rm -f $ac_rmfiles
32370
32371if { { ac_try="$ac_link_default"
32372case "(($ac_try" in
32373  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32374  *) ac_try_echo=$ac_try;;
32375esac
32376eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32377$as_echo "$ac_try_echo"; } >&5
32378  (eval "$ac_link_default") 2>&5
32379  ac_status=$?
32380  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32381  test $ac_status = 0; }; then :
32382  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32383# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32384# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32385# so that the user can short-circuit this test for compilers unknown to
32386# Autoconf.
32387for ac_file in $ac_files ''
32388do
32389  test -f "$ac_file" || continue
32390  case $ac_file in
32391    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32392	;;
32393    [ab].out )
32394	# We found the default executable, but exeext='' is most
32395	# certainly right.
32396	break;;
32397    *.* )
32398	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32399	then :; else
32400	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32401	fi
32402	# We set ac_cv_exeext here because the later test for it is not
32403	# safe: cross compilers may not add the suffix if given an `-o'
32404	# argument, so we may need to know it at that point already.
32405	# Even if this section looks crufty: it has the advantage of
32406	# actually working.
32407	break;;
32408    * )
32409	break;;
32410  esac
32411done
32412test "$ac_cv_exeext" = no && ac_cv_exeext=
32413
32414else
32415  ac_file=''
32416fi
32417if test -z "$ac_file"; then :
32418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32419$as_echo "no" >&6; }
32420$as_echo "$as_me: failed program was:" >&5
32421sed 's/^/| /' conftest.$ac_ext >&5
32422
32423{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32425as_fn_error 77 "C compiler cannot create executables
32426See \`config.log' for more details" "$LINENO" 5; }
32427else
32428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32429$as_echo "yes" >&6; }
32430fi
32431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32432$as_echo_n "checking for C compiler default output file name... " >&6; }
32433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32434$as_echo "$ac_file" >&6; }
32435ac_exeext=$ac_cv_exeext
32436
32437rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32438ac_clean_files=$ac_clean_files_save
32439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32440$as_echo_n "checking for suffix of executables... " >&6; }
32441if { { ac_try="$ac_link"
32442case "(($ac_try" in
32443  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32444  *) ac_try_echo=$ac_try;;
32445esac
32446eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32447$as_echo "$ac_try_echo"; } >&5
32448  (eval "$ac_link") 2>&5
32449  ac_status=$?
32450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32451  test $ac_status = 0; }; then :
32452  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32453# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32454# work properly (i.e., refer to `conftest.exe'), while it won't with
32455# `rm'.
32456for ac_file in conftest.exe conftest conftest.*; do
32457  test -f "$ac_file" || continue
32458  case $ac_file in
32459    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32460    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32461	  break;;
32462    * ) break;;
32463  esac
32464done
32465else
32466  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32468as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32469See \`config.log' for more details" "$LINENO" 5; }
32470fi
32471rm -f conftest conftest$ac_cv_exeext
32472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32473$as_echo "$ac_cv_exeext" >&6; }
32474
32475rm -f conftest.$ac_ext
32476EXEEXT=$ac_cv_exeext
32477ac_exeext=$EXEEXT
32478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32479/* end confdefs.h.  */
32480#include <stdio.h>
32481int
32482main ()
32483{
32484FILE *f = fopen ("conftest.out", "w");
32485 return ferror (f) || fclose (f) != 0;
32486
32487  ;
32488  return 0;
32489}
32490_ACEOF
32491ac_clean_files="$ac_clean_files conftest.out"
32492# Check that the compiler produces executables we can run.  If not, either
32493# the compiler is broken, or we cross compile.
32494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32495$as_echo_n "checking whether we are cross compiling... " >&6; }
32496if test "$cross_compiling" != yes; then
32497  { { ac_try="$ac_link"
32498case "(($ac_try" in
32499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32500  *) ac_try_echo=$ac_try;;
32501esac
32502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32503$as_echo "$ac_try_echo"; } >&5
32504  (eval "$ac_link") 2>&5
32505  ac_status=$?
32506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32507  test $ac_status = 0; }
32508  if { ac_try='./conftest$ac_cv_exeext'
32509  { { case "(($ac_try" in
32510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32511  *) ac_try_echo=$ac_try;;
32512esac
32513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32514$as_echo "$ac_try_echo"; } >&5
32515  (eval "$ac_try") 2>&5
32516  ac_status=$?
32517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32518  test $ac_status = 0; }; }; then
32519    cross_compiling=no
32520  else
32521    if test "$cross_compiling" = maybe; then
32522	cross_compiling=yes
32523    else
32524	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32526as_fn_error $? "cannot run C compiled programs.
32527If you meant to cross compile, use \`--host'.
32528See \`config.log' for more details" "$LINENO" 5; }
32529    fi
32530  fi
32531fi
32532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32533$as_echo "$cross_compiling" >&6; }
32534
32535rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32536ac_clean_files=$ac_clean_files_save
32537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32538$as_echo_n "checking for suffix of object files... " >&6; }
32539if ${ac_cv_objext+:} false; then :
32540  $as_echo_n "(cached) " >&6
32541else
32542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32543/* end confdefs.h.  */
32544
32545int
32546main ()
32547{
32548
32549  ;
32550  return 0;
32551}
32552_ACEOF
32553rm -f conftest.o conftest.obj
32554if { { ac_try="$ac_compile"
32555case "(($ac_try" in
32556  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32557  *) ac_try_echo=$ac_try;;
32558esac
32559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32560$as_echo "$ac_try_echo"; } >&5
32561  (eval "$ac_compile") 2>&5
32562  ac_status=$?
32563  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32564  test $ac_status = 0; }; then :
32565  for ac_file in conftest.o conftest.obj conftest.*; do
32566  test -f "$ac_file" || continue;
32567  case $ac_file in
32568    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32569    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32570       break;;
32571  esac
32572done
32573else
32574  $as_echo "$as_me: failed program was:" >&5
32575sed 's/^/| /' conftest.$ac_ext >&5
32576
32577{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32579as_fn_error $? "cannot compute suffix of object files: cannot compile
32580See \`config.log' for more details" "$LINENO" 5; }
32581fi
32582rm -f conftest.$ac_cv_objext conftest.$ac_ext
32583fi
32584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32585$as_echo "$ac_cv_objext" >&6; }
32586OBJEXT=$ac_cv_objext
32587ac_objext=$OBJEXT
32588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32589$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32590if ${ac_cv_c_compiler_gnu+:} false; then :
32591  $as_echo_n "(cached) " >&6
32592else
32593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32594/* end confdefs.h.  */
32595
32596int
32597main ()
32598{
32599#ifndef __GNUC__
32600       choke me
32601#endif
32602
32603  ;
32604  return 0;
32605}
32606_ACEOF
32607if ac_fn_c_try_compile "$LINENO"; then :
32608  ac_compiler_gnu=yes
32609else
32610  ac_compiler_gnu=no
32611fi
32612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32613ac_cv_c_compiler_gnu=$ac_compiler_gnu
32614
32615fi
32616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32617$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32618if test $ac_compiler_gnu = yes; then
32619  GCC=yes
32620else
32621  GCC=
32622fi
32623ac_test_CFLAGS=${CFLAGS+set}
32624ac_save_CFLAGS=$CFLAGS
32625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32626$as_echo_n "checking whether $CC accepts -g... " >&6; }
32627if ${ac_cv_prog_cc_g+:} false; then :
32628  $as_echo_n "(cached) " >&6
32629else
32630  ac_save_c_werror_flag=$ac_c_werror_flag
32631   ac_c_werror_flag=yes
32632   ac_cv_prog_cc_g=no
32633   CFLAGS="-g"
32634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32635/* end confdefs.h.  */
32636
32637int
32638main ()
32639{
32640
32641  ;
32642  return 0;
32643}
32644_ACEOF
32645if ac_fn_c_try_compile "$LINENO"; then :
32646  ac_cv_prog_cc_g=yes
32647else
32648  CFLAGS=""
32649      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32650/* end confdefs.h.  */
32651
32652int
32653main ()
32654{
32655
32656  ;
32657  return 0;
32658}
32659_ACEOF
32660if ac_fn_c_try_compile "$LINENO"; then :
32661
32662else
32663  ac_c_werror_flag=$ac_save_c_werror_flag
32664	 CFLAGS="-g"
32665	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32666/* end confdefs.h.  */
32667
32668int
32669main ()
32670{
32671
32672  ;
32673  return 0;
32674}
32675_ACEOF
32676if ac_fn_c_try_compile "$LINENO"; then :
32677  ac_cv_prog_cc_g=yes
32678fi
32679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32680fi
32681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32682fi
32683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32684   ac_c_werror_flag=$ac_save_c_werror_flag
32685fi
32686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32687$as_echo "$ac_cv_prog_cc_g" >&6; }
32688if test "$ac_test_CFLAGS" = set; then
32689  CFLAGS=$ac_save_CFLAGS
32690elif test $ac_cv_prog_cc_g = yes; then
32691  if test "$GCC" = yes; then
32692    CFLAGS="-g -O2"
32693  else
32694    CFLAGS="-g"
32695  fi
32696else
32697  if test "$GCC" = yes; then
32698    CFLAGS="-O2"
32699  else
32700    CFLAGS=
32701  fi
32702fi
32703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32704$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32705if ${ac_cv_prog_cc_c89+:} false; then :
32706  $as_echo_n "(cached) " >&6
32707else
32708  ac_cv_prog_cc_c89=no
32709ac_save_CC=$CC
32710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32711/* end confdefs.h.  */
32712#include <stdarg.h>
32713#include <stdio.h>
32714struct stat;
32715/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32716struct buf { int x; };
32717FILE * (*rcsopen) (struct buf *, struct stat *, int);
32718static char *e (p, i)
32719     char **p;
32720     int i;
32721{
32722  return p[i];
32723}
32724static char *f (char * (*g) (char **, int), char **p, ...)
32725{
32726  char *s;
32727  va_list v;
32728  va_start (v,p);
32729  s = g (p, va_arg (v,int));
32730  va_end (v);
32731  return s;
32732}
32733
32734/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32735   function prototypes and stuff, but not '\xHH' hex character constants.
32736   These don't provoke an error unfortunately, instead are silently treated
32737   as 'x'.  The following induces an error, until -std is added to get
32738   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32739   array size at least.  It's necessary to write '\x00'==0 to get something
32740   that's true only with -std.  */
32741int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32742
32743/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32744   inside strings and character constants.  */
32745#define FOO(x) 'x'
32746int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32747
32748int test (int i, double x);
32749struct s1 {int (*f) (int a);};
32750struct s2 {int (*f) (double a);};
32751int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32752int argc;
32753char **argv;
32754int
32755main ()
32756{
32757return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32758  ;
32759  return 0;
32760}
32761_ACEOF
32762for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32763	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32764do
32765  CC="$ac_save_CC $ac_arg"
32766  if ac_fn_c_try_compile "$LINENO"; then :
32767  ac_cv_prog_cc_c89=$ac_arg
32768fi
32769rm -f core conftest.err conftest.$ac_objext
32770  test "x$ac_cv_prog_cc_c89" != "xno" && break
32771done
32772rm -f conftest.$ac_ext
32773CC=$ac_save_CC
32774
32775fi
32776# AC_CACHE_VAL
32777case "x$ac_cv_prog_cc_c89" in
32778  x)
32779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32780$as_echo "none needed" >&6; } ;;
32781  xno)
32782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32783$as_echo "unsupported" >&6; } ;;
32784  *)
32785    CC="$CC $ac_cv_prog_cc_c89"
32786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32787$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32788esac
32789if test "x$ac_cv_prog_cc_c89" != xno; then :
32790
32791fi
32792
32793ac_ext=cpp
32794ac_cpp='$CXXCPP $CPPFLAGS'
32795ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32796ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32797ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32798
32799
32800
32801  COMPILER_NAME=C++
32802  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32803
32804  if test "x$CXX" != x; then
32805    # User has supplied compiler name already, always let that override.
32806    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32807$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32808    if test "x`basename $CXX`" = "x$CXX"; then
32809      # A command without a complete path is provided, search $PATH.
32810
32811      for ac_prog in $CXX
32812do
32813  # Extract the first word of "$ac_prog", so it can be a program name with args.
32814set dummy $ac_prog; ac_word=$2
32815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32816$as_echo_n "checking for $ac_word... " >&6; }
32817if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32818  $as_echo_n "(cached) " >&6
32819else
32820  case $POTENTIAL_CXX in
32821  [\\/]* | ?:[\\/]*)
32822  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32823  ;;
32824  *)
32825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32826for as_dir in $PATH
32827do
32828  IFS=$as_save_IFS
32829  test -z "$as_dir" && as_dir=.
32830    for ac_exec_ext in '' $ac_executable_extensions; do
32831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32832    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32834    break 2
32835  fi
32836done
32837  done
32838IFS=$as_save_IFS
32839
32840  ;;
32841esac
32842fi
32843POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32844if test -n "$POTENTIAL_CXX"; then
32845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32846$as_echo "$POTENTIAL_CXX" >&6; }
32847else
32848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32849$as_echo "no" >&6; }
32850fi
32851
32852
32853  test -n "$POTENTIAL_CXX" && break
32854done
32855
32856      if test "x$POTENTIAL_CXX" != x; then
32857        CXX=$POTENTIAL_CXX
32858      else
32859        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32860      fi
32861    else
32862      # Otherwise it might already be a complete path
32863      if test ! -x "$CXX"; then
32864        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32865      fi
32866    fi
32867  else
32868    # No user supplied value. Locate compiler ourselves.
32869
32870    # If we are cross compiling, assume cross compilation tools follows the
32871    # cross compilation standard where they are prefixed with the autoconf
32872    # standard name for the target. For example the binary
32873    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32874    # If we are not cross compiling, then the default compiler name will be
32875    # used.
32876
32877    CXX=
32878    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32879    # before checking the rest of the PATH.
32880    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32881    # step, this should not be necessary.
32882    if test -n "$TOOLCHAIN_PATH"; then
32883      PATH_save="$PATH"
32884      PATH="$TOOLCHAIN_PATH"
32885      for ac_prog in $SEARCH_LIST
32886do
32887  # Extract the first word of "$ac_prog", so it can be a program name with args.
32888set dummy $ac_prog; ac_word=$2
32889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32890$as_echo_n "checking for $ac_word... " >&6; }
32891if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32892  $as_echo_n "(cached) " >&6
32893else
32894  case $TOOLCHAIN_PATH_CXX in
32895  [\\/]* | ?:[\\/]*)
32896  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32897  ;;
32898  *)
32899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32900for as_dir in $PATH
32901do
32902  IFS=$as_save_IFS
32903  test -z "$as_dir" && as_dir=.
32904    for ac_exec_ext in '' $ac_executable_extensions; do
32905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32906    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32908    break 2
32909  fi
32910done
32911  done
32912IFS=$as_save_IFS
32913
32914  ;;
32915esac
32916fi
32917TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32918if test -n "$TOOLCHAIN_PATH_CXX"; then
32919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32920$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32921else
32922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32923$as_echo "no" >&6; }
32924fi
32925
32926
32927  test -n "$TOOLCHAIN_PATH_CXX" && break
32928done
32929
32930      CXX=$TOOLCHAIN_PATH_CXX
32931      PATH="$PATH_save"
32932    fi
32933
32934    # AC_PATH_PROGS can't be run multiple times with the same variable,
32935    # so create a new name for this run.
32936    if test "x$CXX" = x; then
32937      for ac_prog in $SEARCH_LIST
32938do
32939  # Extract the first word of "$ac_prog", so it can be a program name with args.
32940set dummy $ac_prog; ac_word=$2
32941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32942$as_echo_n "checking for $ac_word... " >&6; }
32943if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32944  $as_echo_n "(cached) " >&6
32945else
32946  case $POTENTIAL_CXX in
32947  [\\/]* | ?:[\\/]*)
32948  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32949  ;;
32950  *)
32951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32952for as_dir in $PATH
32953do
32954  IFS=$as_save_IFS
32955  test -z "$as_dir" && as_dir=.
32956    for ac_exec_ext in '' $ac_executable_extensions; do
32957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32958    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32960    break 2
32961  fi
32962done
32963  done
32964IFS=$as_save_IFS
32965
32966  ;;
32967esac
32968fi
32969POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32970if test -n "$POTENTIAL_CXX"; then
32971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32972$as_echo "$POTENTIAL_CXX" >&6; }
32973else
32974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32975$as_echo "no" >&6; }
32976fi
32977
32978
32979  test -n "$POTENTIAL_CXX" && break
32980done
32981
32982      CXX=$POTENTIAL_CXX
32983    fi
32984
32985    if test "x$CXX" = x; then
32986
32987  # Print a helpful message on how to acquire the necessary build dependency.
32988  # devkit is the help tag: freetype, cups, alsa etc
32989  MISSING_DEPENDENCY=devkit
32990
32991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32992    cygwin_help $MISSING_DEPENDENCY
32993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32994    msys_help $MISSING_DEPENDENCY
32995  else
32996    PKGHANDLER_COMMAND=
32997
32998    case $PKGHANDLER in
32999      apt-get)
33000        apt_help     $MISSING_DEPENDENCY ;;
33001      yum)
33002        yum_help     $MISSING_DEPENDENCY ;;
33003      port)
33004        port_help    $MISSING_DEPENDENCY ;;
33005      pkgutil)
33006        pkgutil_help $MISSING_DEPENDENCY ;;
33007      pkgadd)
33008        pkgadd_help  $MISSING_DEPENDENCY ;;
33009    esac
33010
33011    if test "x$PKGHANDLER_COMMAND" != x; then
33012      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33013    fi
33014  fi
33015
33016      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33017    fi
33018  fi
33019
33020  # Now we have a compiler binary in CXX. Make sure it's okay.
33021
33022  # Only process if variable expands to non-empty
33023
33024  if test "x$CXX" != x; then
33025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33026
33027  # First separate the path from the arguments. This will split at the first
33028  # space.
33029  complete="$CXX"
33030  path="${complete%% *}"
33031  tmp="$complete EOL"
33032  arguments="${tmp#* }"
33033
33034  # Input might be given as Windows format, start by converting to
33035  # unix format.
33036  new_path=`$CYGPATH -u "$path"`
33037
33038  # Now try to locate executable using which
33039  new_path=`$WHICH "$new_path" 2> /dev/null`
33040  # bat and cmd files are not always considered executable in cygwin causing which
33041  # to not find them
33042  if test "x$new_path" = x \
33043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33045    new_path=`$CYGPATH -u "$path"`
33046  fi
33047  if test "x$new_path" = x; then
33048    # Oops. Which didn't find the executable.
33049    # The splitting of arguments from the executable at a space might have been incorrect,
33050    # since paths with space are more likely in Windows. Give it another try with the whole
33051    # argument.
33052    path="$complete"
33053    arguments="EOL"
33054    new_path=`$CYGPATH -u "$path"`
33055    new_path=`$WHICH "$new_path" 2> /dev/null`
33056    # bat and cmd files are not always considered executable in cygwin causing which
33057    # to not find them
33058    if test "x$new_path" = x \
33059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33061      new_path=`$CYGPATH -u "$path"`
33062    fi
33063    if test "x$new_path" = x; then
33064      # It's still not found. Now this is an unrecoverable error.
33065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33066$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33067      has_space=`$ECHO "$complete" | $GREP " "`
33068      if test "x$has_space" != x; then
33069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33071      fi
33072      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33073    fi
33074  fi
33075
33076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33079  # "foo.exe" is OK but "foo" is an error.
33080  #
33081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33082  # It is also a way to make sure we got the proper file name for the real test later on.
33083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33084  if test "x$test_shortpath" = x; then
33085    # Short path failed, file does not exist as specified.
33086    # Try adding .exe or .cmd
33087    if test -f "${new_path}.exe"; then
33088      input_to_shortpath="${new_path}.exe"
33089    elif test -f "${new_path}.cmd"; then
33090      input_to_shortpath="${new_path}.cmd"
33091    else
33092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33093$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33096      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33097    fi
33098  else
33099    input_to_shortpath="$new_path"
33100  fi
33101
33102  # Call helper function which possibly converts this using DOS-style short mode.
33103  # If so, the updated path is stored in $new_path.
33104  new_path="$input_to_shortpath"
33105
33106  input_path="$input_to_shortpath"
33107  # Check if we need to convert this using DOS-style short mode. If the path
33108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33109  # take no chances and rewrite it.
33110  # Note: m4 eats our [], so we need to use [ and ] instead.
33111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33112  if test "x$has_forbidden_chars" != x; then
33113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33117      # Going to short mode and back again did indeed matter. Since short mode is
33118      # case insensitive, let's make it lowercase to improve readability.
33119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33120      # Now convert it back to Unix-style (cygpath)
33121      input_path=`$CYGPATH -u "$shortmode_path"`
33122      new_path="$input_path"
33123    fi
33124  fi
33125
33126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33127  if test "x$test_cygdrive_prefix" = x; then
33128    # As a simple fix, exclude /usr/bin since it's not a real path.
33129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33131      # a path prefixed by /cygdrive for fixpath to work.
33132      new_path="$CYGWIN_ROOT_PATH$input_path"
33133    fi
33134  fi
33135
33136  # remove trailing .exe if any
33137  new_path="${new_path/%.exe/}"
33138
33139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33140
33141  # First separate the path from the arguments. This will split at the first
33142  # space.
33143  complete="$CXX"
33144  path="${complete%% *}"
33145  tmp="$complete EOL"
33146  arguments="${tmp#* }"
33147
33148  # Input might be given as Windows format, start by converting to
33149  # unix format.
33150  new_path="$path"
33151
33152  windows_path="$new_path"
33153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33154    unix_path=`$CYGPATH -u "$windows_path"`
33155    new_path="$unix_path"
33156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33158    new_path="$unix_path"
33159  fi
33160
33161
33162  # Now try to locate executable using which
33163  new_path=`$WHICH "$new_path" 2> /dev/null`
33164
33165  if test "x$new_path" = x; then
33166    # Oops. Which didn't find the executable.
33167    # The splitting of arguments from the executable at a space might have been incorrect,
33168    # since paths with space are more likely in Windows. Give it another try with the whole
33169    # argument.
33170    path="$complete"
33171    arguments="EOL"
33172    new_path="$path"
33173
33174  windows_path="$new_path"
33175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33176    unix_path=`$CYGPATH -u "$windows_path"`
33177    new_path="$unix_path"
33178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33180    new_path="$unix_path"
33181  fi
33182
33183
33184    new_path=`$WHICH "$new_path" 2> /dev/null`
33185    # bat and cmd files are not always considered executable in MSYS causing which
33186    # to not find them
33187    if test "x$new_path" = x \
33188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33190      new_path="$path"
33191
33192  windows_path="$new_path"
33193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33194    unix_path=`$CYGPATH -u "$windows_path"`
33195    new_path="$unix_path"
33196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33198    new_path="$unix_path"
33199  fi
33200
33201    fi
33202
33203    if test "x$new_path" = x; then
33204      # It's still not found. Now this is an unrecoverable error.
33205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33206$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33207      has_space=`$ECHO "$complete" | $GREP " "`
33208      if test "x$has_space" != x; then
33209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33211      fi
33212      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33213    fi
33214  fi
33215
33216  # Now new_path has a complete unix path to the binary
33217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33218    # Keep paths in /bin as-is, but remove trailing .exe if any
33219    new_path="${new_path/%.exe/}"
33220    # Do not save /bin paths to all_fixpath_prefixes!
33221  else
33222    # Not in mixed or Windows style, start by that.
33223    new_path=`cmd //c echo $new_path`
33224
33225  input_path="$new_path"
33226  # Check if we need to convert this using DOS-style short mode. If the path
33227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33228  # take no chances and rewrite it.
33229  # Note: m4 eats our [], so we need to use [ and ] instead.
33230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33231  if test "x$has_forbidden_chars" != x; then
33232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33234  fi
33235
33236    # Output is in $new_path
33237
33238  windows_path="$new_path"
33239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33240    unix_path=`$CYGPATH -u "$windows_path"`
33241    new_path="$unix_path"
33242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33244    new_path="$unix_path"
33245  fi
33246
33247    # remove trailing .exe if any
33248    new_path="${new_path/%.exe/}"
33249
33250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33252  fi
33253
33254    else
33255      # We're on a unix platform. Hooray! :)
33256      # First separate the path from the arguments. This will split at the first
33257      # space.
33258      complete="$CXX"
33259      path="${complete%% *}"
33260      tmp="$complete EOL"
33261      arguments="${tmp#* }"
33262
33263      # Cannot rely on the command "which" here since it doesn't always work.
33264      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33265      if test -z "$is_absolute_path"; then
33266        # Path to executable is not absolute. Find it.
33267        IFS_save="$IFS"
33268        IFS=:
33269        for p in $PATH; do
33270          if test -f "$p/$path" && test -x "$p/$path"; then
33271            new_path="$p/$path"
33272            break
33273          fi
33274        done
33275        IFS="$IFS_save"
33276      else
33277        # This is an absolute path, we can use it without further modifications.
33278        new_path="$path"
33279      fi
33280
33281      if test "x$new_path" = x; then
33282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33283$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33284        has_space=`$ECHO "$complete" | $GREP " "`
33285        if test "x$has_space" != x; then
33286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33288        fi
33289        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33290      fi
33291    fi
33292
33293    # Now join together the path and the arguments once again
33294    if test "x$arguments" != xEOL; then
33295      new_complete="$new_path ${arguments% *}"
33296    else
33297      new_complete="$new_path"
33298    fi
33299
33300    if test "x$complete" != "x$new_complete"; then
33301      CXX="$new_complete"
33302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33303$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33304    fi
33305  fi
33306
33307  TEST_COMPILER="$CXX"
33308
33309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33310$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33311  SYMLINK_ORIGINAL="$TEST_COMPILER"
33312
33313  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33314    # Follow a chain of symbolic links. Use readlink
33315    # where it exists, else fall back to horribly
33316    # complicated shell code.
33317    if test "x$READLINK_TESTED" != yes; then
33318      # On MacOSX there is a readlink tool with a different
33319      # purpose than the GNU readlink tool. Check the found readlink.
33320      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33321      if test "x$ISGNU" = x; then
33322        # A readlink that we do not know how to use.
33323        # Are there other non-GNU readlinks out there?
33324        READLINK_TESTED=yes
33325        READLINK=
33326      fi
33327    fi
33328
33329    if test "x$READLINK" != x; then
33330      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33331    else
33332      # Save the current directory for restoring afterwards
33333      STARTDIR=$PWD
33334      COUNTER=0
33335      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33336      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33337      cd $sym_link_dir
33338      # Use -P flag to resolve symlinks in directories.
33339      cd `$THEPWDCMD -P`
33340      sym_link_dir=`$THEPWDCMD -P`
33341      # Resolve file symlinks
33342      while test $COUNTER -lt 20; do
33343        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33344        if test "x$ISLINK" == x; then
33345          # This is not a symbolic link! We are done!
33346          break
33347        fi
33348        # Again resolve directory symlinks since the target of the just found
33349        # link could be in a different directory
33350        cd `$DIRNAME $ISLINK`
33351        sym_link_dir=`$THEPWDCMD -P`
33352        sym_link_file=`$BASENAME $ISLINK`
33353        let COUNTER=COUNTER+1
33354      done
33355      cd $STARTDIR
33356      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33357    fi
33358  fi
33359
33360  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33362$as_echo "no symlink" >&6; }
33363  else
33364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33365$as_echo "$SYMLINK_ORIGINAL" >&6; }
33366
33367    # We can't handle ccache by gcc wrappers, since we need to know if we're
33368    # using ccache. Instead ccache usage must be controlled by a configure option.
33369    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33370    if test "x$COMPILER_BASENAME" = "xccache"; then
33371      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33372$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33373      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33374    fi
33375  fi
33376
33377
33378  COMPILER=$CXX
33379  COMPILER_NAME=$COMPILER_NAME
33380
33381  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33382    # cc -V output typically looks like
33383    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33384    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33385    # Check that this is likely to be the Solaris Studio cc.
33386    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33387    if test $? -ne 0; then
33388      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33389      { $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
33390$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33391      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33392$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33393      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33394$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33395      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33396    fi
33397    # Remove usage instructions (if present), and
33398    # collapse compiler output into a single line
33399    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33400        $SED -e 's/ *[Uu]sage:.*//'`
33401    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33402        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33403  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33404    # xlc -qversion output typically looks like
33405    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33406    #     Version: 11.01.0000.0015
33407    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33408    # Check that this is likely to be the IBM XL C compiler.
33409    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33410    if test $? -ne 0; then
33411      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33412      { $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
33413$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33414      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33415$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33416      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33417$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33418      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33419    fi
33420    # Collapse compiler output into a single line
33421    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33422    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33423        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33424  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33425    # There is no specific version flag, but all output starts with a version string.
33426    # First line typically looks something like:
33427    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33428    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33429    # Check that this is likely to be Microsoft CL.EXE.
33430    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33431    if test $? -ne 0; then
33432      { $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
33433$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33434      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33435$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33436      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33437    fi
33438    # Collapse compiler output into a single line
33439    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33440    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33441        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33442  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33443    # gcc --version output typically looks like
33444    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33445    #     Copyright (C) 2013 Free Software Foundation, Inc.
33446    #     This is free software; see the source for copying conditions.  There is NO
33447    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33448    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33449    # Check that this is likely to be GCC.
33450    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33451    if test $? -ne 0; then
33452      { $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
33453$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33454      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33455$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33456      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33457    fi
33458    # Remove Copyright and legalese from version string, and
33459    # collapse into a single line
33460    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33461        $SED -e 's/ *Copyright .*//'`
33462    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33463        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33464  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33465    # clang --version output typically looks like
33466    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33467    #    clang version 3.3 (tags/RELEASE_33/final)
33468    # or
33469    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33470    #    Target: x86_64-pc-linux-gnu
33471    #    Thread model: posix
33472    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33473    # Check that this is likely to be clang
33474    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33475    if test $? -ne 0; then
33476      { $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
33477$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33478      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33479$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33480      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33481    fi
33482    # Collapse compiler output into a single line
33483    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33484    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33485        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33486  else
33487      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33488  fi
33489  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33490  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33491  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33492  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33493
33494  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33495$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33496
33497
33498  # Now that we have resolved CXX ourself, let autoconf have its go at it
33499  ac_ext=cpp
33500ac_cpp='$CXXCPP $CPPFLAGS'
33501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33504if test -z "$CXX"; then
33505  if test -n "$CCC"; then
33506    CXX=$CCC
33507  else
33508    if test -n "$ac_tool_prefix"; then
33509  for ac_prog in $CXX
33510  do
33511    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33512set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33514$as_echo_n "checking for $ac_word... " >&6; }
33515if ${ac_cv_prog_CXX+:} false; then :
33516  $as_echo_n "(cached) " >&6
33517else
33518  if test -n "$CXX"; then
33519  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33520else
33521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33522for as_dir in $PATH
33523do
33524  IFS=$as_save_IFS
33525  test -z "$as_dir" && as_dir=.
33526    for ac_exec_ext in '' $ac_executable_extensions; do
33527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33528    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33530    break 2
33531  fi
33532done
33533  done
33534IFS=$as_save_IFS
33535
33536fi
33537fi
33538CXX=$ac_cv_prog_CXX
33539if test -n "$CXX"; then
33540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33541$as_echo "$CXX" >&6; }
33542else
33543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33544$as_echo "no" >&6; }
33545fi
33546
33547
33548    test -n "$CXX" && break
33549  done
33550fi
33551if test -z "$CXX"; then
33552  ac_ct_CXX=$CXX
33553  for ac_prog in $CXX
33554do
33555  # Extract the first word of "$ac_prog", so it can be a program name with args.
33556set dummy $ac_prog; ac_word=$2
33557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33558$as_echo_n "checking for $ac_word... " >&6; }
33559if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33560  $as_echo_n "(cached) " >&6
33561else
33562  if test -n "$ac_ct_CXX"; then
33563  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33564else
33565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33566for as_dir in $PATH
33567do
33568  IFS=$as_save_IFS
33569  test -z "$as_dir" && as_dir=.
33570    for ac_exec_ext in '' $ac_executable_extensions; do
33571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33572    ac_cv_prog_ac_ct_CXX="$ac_prog"
33573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33574    break 2
33575  fi
33576done
33577  done
33578IFS=$as_save_IFS
33579
33580fi
33581fi
33582ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33583if test -n "$ac_ct_CXX"; then
33584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33585$as_echo "$ac_ct_CXX" >&6; }
33586else
33587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33588$as_echo "no" >&6; }
33589fi
33590
33591
33592  test -n "$ac_ct_CXX" && break
33593done
33594
33595  if test "x$ac_ct_CXX" = x; then
33596    CXX="g++"
33597  else
33598    case $cross_compiling:$ac_tool_warned in
33599yes:)
33600{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33601$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33602ac_tool_warned=yes ;;
33603esac
33604    CXX=$ac_ct_CXX
33605  fi
33606fi
33607
33608  fi
33609fi
33610# Provide some information about the compiler.
33611$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33612set X $ac_compile
33613ac_compiler=$2
33614for ac_option in --version -v -V -qversion; do
33615  { { ac_try="$ac_compiler $ac_option >&5"
33616case "(($ac_try" in
33617  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33618  *) ac_try_echo=$ac_try;;
33619esac
33620eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33621$as_echo "$ac_try_echo"; } >&5
33622  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33623  ac_status=$?
33624  if test -s conftest.err; then
33625    sed '10a\
33626... rest of stderr output deleted ...
33627         10q' conftest.err >conftest.er1
33628    cat conftest.er1 >&5
33629  fi
33630  rm -f conftest.er1 conftest.err
33631  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33632  test $ac_status = 0; }
33633done
33634
33635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33636$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33637if ${ac_cv_cxx_compiler_gnu+:} false; then :
33638  $as_echo_n "(cached) " >&6
33639else
33640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33641/* end confdefs.h.  */
33642
33643int
33644main ()
33645{
33646#ifndef __GNUC__
33647       choke me
33648#endif
33649
33650  ;
33651  return 0;
33652}
33653_ACEOF
33654if ac_fn_cxx_try_compile "$LINENO"; then :
33655  ac_compiler_gnu=yes
33656else
33657  ac_compiler_gnu=no
33658fi
33659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33660ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33661
33662fi
33663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33664$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33665if test $ac_compiler_gnu = yes; then
33666  GXX=yes
33667else
33668  GXX=
33669fi
33670ac_test_CXXFLAGS=${CXXFLAGS+set}
33671ac_save_CXXFLAGS=$CXXFLAGS
33672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33673$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33674if ${ac_cv_prog_cxx_g+:} false; then :
33675  $as_echo_n "(cached) " >&6
33676else
33677  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33678   ac_cxx_werror_flag=yes
33679   ac_cv_prog_cxx_g=no
33680   CXXFLAGS="-g"
33681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33682/* end confdefs.h.  */
33683
33684int
33685main ()
33686{
33687
33688  ;
33689  return 0;
33690}
33691_ACEOF
33692if ac_fn_cxx_try_compile "$LINENO"; then :
33693  ac_cv_prog_cxx_g=yes
33694else
33695  CXXFLAGS=""
33696      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33697/* end confdefs.h.  */
33698
33699int
33700main ()
33701{
33702
33703  ;
33704  return 0;
33705}
33706_ACEOF
33707if ac_fn_cxx_try_compile "$LINENO"; then :
33708
33709else
33710  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33711	 CXXFLAGS="-g"
33712	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33713/* end confdefs.h.  */
33714
33715int
33716main ()
33717{
33718
33719  ;
33720  return 0;
33721}
33722_ACEOF
33723if ac_fn_cxx_try_compile "$LINENO"; then :
33724  ac_cv_prog_cxx_g=yes
33725fi
33726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33727fi
33728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33729fi
33730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33731   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33732fi
33733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33734$as_echo "$ac_cv_prog_cxx_g" >&6; }
33735if test "$ac_test_CXXFLAGS" = set; then
33736  CXXFLAGS=$ac_save_CXXFLAGS
33737elif test $ac_cv_prog_cxx_g = yes; then
33738  if test "$GXX" = yes; then
33739    CXXFLAGS="-g -O2"
33740  else
33741    CXXFLAGS="-g"
33742  fi
33743else
33744  if test "$GXX" = yes; then
33745    CXXFLAGS="-O2"
33746  else
33747    CXXFLAGS=
33748  fi
33749fi
33750ac_ext=cpp
33751ac_cpp='$CXXCPP $CPPFLAGS'
33752ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33753ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33754ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33755
33756
33757  #
33758  # Setup the preprocessor (CPP and CXXCPP)
33759  #
33760  ac_ext=c
33761ac_cpp='$CPP $CPPFLAGS'
33762ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33763ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33764ac_compiler_gnu=$ac_cv_c_compiler_gnu
33765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33766$as_echo_n "checking how to run the C preprocessor... " >&6; }
33767# On Suns, sometimes $CPP names a directory.
33768if test -n "$CPP" && test -d "$CPP"; then
33769  CPP=
33770fi
33771if test -z "$CPP"; then
33772  if ${ac_cv_prog_CPP+:} false; then :
33773  $as_echo_n "(cached) " >&6
33774else
33775      # Double quotes because CPP needs to be expanded
33776    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33777    do
33778      ac_preproc_ok=false
33779for ac_c_preproc_warn_flag in '' yes
33780do
33781  # Use a header file that comes with gcc, so configuring glibc
33782  # with a fresh cross-compiler works.
33783  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33784  # <limits.h> exists even on freestanding compilers.
33785  # On the NeXT, cc -E runs the code through the compiler's parser,
33786  # not just through cpp. "Syntax error" is here to catch this case.
33787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33788/* end confdefs.h.  */
33789#ifdef __STDC__
33790# include <limits.h>
33791#else
33792# include <assert.h>
33793#endif
33794		     Syntax error
33795_ACEOF
33796if ac_fn_c_try_cpp "$LINENO"; then :
33797
33798else
33799  # Broken: fails on valid input.
33800continue
33801fi
33802rm -f conftest.err conftest.i conftest.$ac_ext
33803
33804  # OK, works on sane cases.  Now check whether nonexistent headers
33805  # can be detected and how.
33806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33807/* end confdefs.h.  */
33808#include <ac_nonexistent.h>
33809_ACEOF
33810if ac_fn_c_try_cpp "$LINENO"; then :
33811  # Broken: success on invalid input.
33812continue
33813else
33814  # Passes both tests.
33815ac_preproc_ok=:
33816break
33817fi
33818rm -f conftest.err conftest.i conftest.$ac_ext
33819
33820done
33821# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33822rm -f conftest.i conftest.err conftest.$ac_ext
33823if $ac_preproc_ok; then :
33824  break
33825fi
33826
33827    done
33828    ac_cv_prog_CPP=$CPP
33829
33830fi
33831  CPP=$ac_cv_prog_CPP
33832else
33833  ac_cv_prog_CPP=$CPP
33834fi
33835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33836$as_echo "$CPP" >&6; }
33837ac_preproc_ok=false
33838for ac_c_preproc_warn_flag in '' yes
33839do
33840  # Use a header file that comes with gcc, so configuring glibc
33841  # with a fresh cross-compiler works.
33842  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33843  # <limits.h> exists even on freestanding compilers.
33844  # On the NeXT, cc -E runs the code through the compiler's parser,
33845  # not just through cpp. "Syntax error" is here to catch this case.
33846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33847/* end confdefs.h.  */
33848#ifdef __STDC__
33849# include <limits.h>
33850#else
33851# include <assert.h>
33852#endif
33853		     Syntax error
33854_ACEOF
33855if ac_fn_c_try_cpp "$LINENO"; then :
33856
33857else
33858  # Broken: fails on valid input.
33859continue
33860fi
33861rm -f conftest.err conftest.i conftest.$ac_ext
33862
33863  # OK, works on sane cases.  Now check whether nonexistent headers
33864  # can be detected and how.
33865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33866/* end confdefs.h.  */
33867#include <ac_nonexistent.h>
33868_ACEOF
33869if ac_fn_c_try_cpp "$LINENO"; then :
33870  # Broken: success on invalid input.
33871continue
33872else
33873  # Passes both tests.
33874ac_preproc_ok=:
33875break
33876fi
33877rm -f conftest.err conftest.i conftest.$ac_ext
33878
33879done
33880# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33881rm -f conftest.i conftest.err conftest.$ac_ext
33882if $ac_preproc_ok; then :
33883
33884else
33885  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33887as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
33888See \`config.log' for more details" "$LINENO" 5; }
33889fi
33890
33891ac_ext=cpp
33892ac_cpp='$CXXCPP $CPPFLAGS'
33893ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33894ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33895ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33896
33897
33898  # Only process if variable expands to non-empty
33899
33900  if test "x$CPP" != x; then
33901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33902
33903  # First separate the path from the arguments. This will split at the first
33904  # space.
33905  complete="$CPP"
33906  path="${complete%% *}"
33907  tmp="$complete EOL"
33908  arguments="${tmp#* }"
33909
33910  # Input might be given as Windows format, start by converting to
33911  # unix format.
33912  new_path=`$CYGPATH -u "$path"`
33913
33914  # Now try to locate executable using which
33915  new_path=`$WHICH "$new_path" 2> /dev/null`
33916  # bat and cmd files are not always considered executable in cygwin causing which
33917  # to not find them
33918  if test "x$new_path" = x \
33919      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33920      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33921    new_path=`$CYGPATH -u "$path"`
33922  fi
33923  if test "x$new_path" = x; then
33924    # Oops. Which didn't find the executable.
33925    # The splitting of arguments from the executable at a space might have been incorrect,
33926    # since paths with space are more likely in Windows. Give it another try with the whole
33927    # argument.
33928    path="$complete"
33929    arguments="EOL"
33930    new_path=`$CYGPATH -u "$path"`
33931    new_path=`$WHICH "$new_path" 2> /dev/null`
33932    # bat and cmd files are not always considered executable in cygwin causing which
33933    # to not find them
33934    if test "x$new_path" = x \
33935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33937      new_path=`$CYGPATH -u "$path"`
33938    fi
33939    if test "x$new_path" = x; then
33940      # It's still not found. Now this is an unrecoverable error.
33941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
33942$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
33943      has_space=`$ECHO "$complete" | $GREP " "`
33944      if test "x$has_space" != x; then
33945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33947      fi
33948      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33949    fi
33950  fi
33951
33952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33955  # "foo.exe" is OK but "foo" is an error.
33956  #
33957  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33958  # It is also a way to make sure we got the proper file name for the real test later on.
33959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33960  if test "x$test_shortpath" = x; then
33961    # Short path failed, file does not exist as specified.
33962    # Try adding .exe or .cmd
33963    if test -f "${new_path}.exe"; then
33964      input_to_shortpath="${new_path}.exe"
33965    elif test -f "${new_path}.cmd"; then
33966      input_to_shortpath="${new_path}.cmd"
33967    else
33968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
33969$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
33970      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33972      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33973    fi
33974  else
33975    input_to_shortpath="$new_path"
33976  fi
33977
33978  # Call helper function which possibly converts this using DOS-style short mode.
33979  # If so, the updated path is stored in $new_path.
33980  new_path="$input_to_shortpath"
33981
33982  input_path="$input_to_shortpath"
33983  # Check if we need to convert this using DOS-style short mode. If the path
33984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33985  # take no chances and rewrite it.
33986  # Note: m4 eats our [], so we need to use [ and ] instead.
33987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33988  if test "x$has_forbidden_chars" != x; then
33989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33993      # Going to short mode and back again did indeed matter. Since short mode is
33994      # case insensitive, let's make it lowercase to improve readability.
33995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33996      # Now convert it back to Unix-style (cygpath)
33997      input_path=`$CYGPATH -u "$shortmode_path"`
33998      new_path="$input_path"
33999    fi
34000  fi
34001
34002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34003  if test "x$test_cygdrive_prefix" = x; then
34004    # As a simple fix, exclude /usr/bin since it's not a real path.
34005    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34007      # a path prefixed by /cygdrive for fixpath to work.
34008      new_path="$CYGWIN_ROOT_PATH$input_path"
34009    fi
34010  fi
34011
34012  # remove trailing .exe if any
34013  new_path="${new_path/%.exe/}"
34014
34015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34016
34017  # First separate the path from the arguments. This will split at the first
34018  # space.
34019  complete="$CPP"
34020  path="${complete%% *}"
34021  tmp="$complete EOL"
34022  arguments="${tmp#* }"
34023
34024  # Input might be given as Windows format, start by converting to
34025  # unix format.
34026  new_path="$path"
34027
34028  windows_path="$new_path"
34029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34030    unix_path=`$CYGPATH -u "$windows_path"`
34031    new_path="$unix_path"
34032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34034    new_path="$unix_path"
34035  fi
34036
34037
34038  # Now try to locate executable using which
34039  new_path=`$WHICH "$new_path" 2> /dev/null`
34040
34041  if test "x$new_path" = x; then
34042    # Oops. Which didn't find the executable.
34043    # The splitting of arguments from the executable at a space might have been incorrect,
34044    # since paths with space are more likely in Windows. Give it another try with the whole
34045    # argument.
34046    path="$complete"
34047    arguments="EOL"
34048    new_path="$path"
34049
34050  windows_path="$new_path"
34051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34052    unix_path=`$CYGPATH -u "$windows_path"`
34053    new_path="$unix_path"
34054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34056    new_path="$unix_path"
34057  fi
34058
34059
34060    new_path=`$WHICH "$new_path" 2> /dev/null`
34061    # bat and cmd files are not always considered executable in MSYS causing which
34062    # to not find them
34063    if test "x$new_path" = x \
34064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34066      new_path="$path"
34067
34068  windows_path="$new_path"
34069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34070    unix_path=`$CYGPATH -u "$windows_path"`
34071    new_path="$unix_path"
34072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34074    new_path="$unix_path"
34075  fi
34076
34077    fi
34078
34079    if test "x$new_path" = x; then
34080      # It's still not found. Now this is an unrecoverable error.
34081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34082$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34083      has_space=`$ECHO "$complete" | $GREP " "`
34084      if test "x$has_space" != x; then
34085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34087      fi
34088      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34089    fi
34090  fi
34091
34092  # Now new_path has a complete unix path to the binary
34093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34094    # Keep paths in /bin as-is, but remove trailing .exe if any
34095    new_path="${new_path/%.exe/}"
34096    # Do not save /bin paths to all_fixpath_prefixes!
34097  else
34098    # Not in mixed or Windows style, start by that.
34099    new_path=`cmd //c echo $new_path`
34100
34101  input_path="$new_path"
34102  # Check if we need to convert this using DOS-style short mode. If the path
34103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34104  # take no chances and rewrite it.
34105  # Note: m4 eats our [], so we need to use [ and ] instead.
34106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34107  if test "x$has_forbidden_chars" != x; then
34108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34110  fi
34111
34112    # Output is in $new_path
34113
34114  windows_path="$new_path"
34115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34116    unix_path=`$CYGPATH -u "$windows_path"`
34117    new_path="$unix_path"
34118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34120    new_path="$unix_path"
34121  fi
34122
34123    # remove trailing .exe if any
34124    new_path="${new_path/%.exe/}"
34125
34126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34128  fi
34129
34130    else
34131      # We're on a unix platform. Hooray! :)
34132      # First separate the path from the arguments. This will split at the first
34133      # space.
34134      complete="$CPP"
34135      path="${complete%% *}"
34136      tmp="$complete EOL"
34137      arguments="${tmp#* }"
34138
34139      # Cannot rely on the command "which" here since it doesn't always work.
34140      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34141      if test -z "$is_absolute_path"; then
34142        # Path to executable is not absolute. Find it.
34143        IFS_save="$IFS"
34144        IFS=:
34145        for p in $PATH; do
34146          if test -f "$p/$path" && test -x "$p/$path"; then
34147            new_path="$p/$path"
34148            break
34149          fi
34150        done
34151        IFS="$IFS_save"
34152      else
34153        # This is an absolute path, we can use it without further modifications.
34154        new_path="$path"
34155      fi
34156
34157      if test "x$new_path" = x; then
34158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34159$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34160        has_space=`$ECHO "$complete" | $GREP " "`
34161        if test "x$has_space" != x; then
34162          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34164        fi
34165        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34166      fi
34167    fi
34168
34169    # Now join together the path and the arguments once again
34170    if test "x$arguments" != xEOL; then
34171      new_complete="$new_path ${arguments% *}"
34172    else
34173      new_complete="$new_path"
34174    fi
34175
34176    if test "x$complete" != "x$new_complete"; then
34177      CPP="$new_complete"
34178      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34179$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34180    fi
34181  fi
34182
34183  ac_ext=cpp
34184ac_cpp='$CXXCPP $CPPFLAGS'
34185ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34186ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34187ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34189$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34190if test -z "$CXXCPP"; then
34191  if ${ac_cv_prog_CXXCPP+:} false; then :
34192  $as_echo_n "(cached) " >&6
34193else
34194      # Double quotes because CXXCPP needs to be expanded
34195    for CXXCPP in "$CXX -E" "/lib/cpp"
34196    do
34197      ac_preproc_ok=false
34198for ac_cxx_preproc_warn_flag in '' yes
34199do
34200  # Use a header file that comes with gcc, so configuring glibc
34201  # with a fresh cross-compiler works.
34202  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34203  # <limits.h> exists even on freestanding compilers.
34204  # On the NeXT, cc -E runs the code through the compiler's parser,
34205  # not just through cpp. "Syntax error" is here to catch this case.
34206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34207/* end confdefs.h.  */
34208#ifdef __STDC__
34209# include <limits.h>
34210#else
34211# include <assert.h>
34212#endif
34213		     Syntax error
34214_ACEOF
34215if ac_fn_cxx_try_cpp "$LINENO"; then :
34216
34217else
34218  # Broken: fails on valid input.
34219continue
34220fi
34221rm -f conftest.err conftest.i conftest.$ac_ext
34222
34223  # OK, works on sane cases.  Now check whether nonexistent headers
34224  # can be detected and how.
34225  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34226/* end confdefs.h.  */
34227#include <ac_nonexistent.h>
34228_ACEOF
34229if ac_fn_cxx_try_cpp "$LINENO"; then :
34230  # Broken: success on invalid input.
34231continue
34232else
34233  # Passes both tests.
34234ac_preproc_ok=:
34235break
34236fi
34237rm -f conftest.err conftest.i conftest.$ac_ext
34238
34239done
34240# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34241rm -f conftest.i conftest.err conftest.$ac_ext
34242if $ac_preproc_ok; then :
34243  break
34244fi
34245
34246    done
34247    ac_cv_prog_CXXCPP=$CXXCPP
34248
34249fi
34250  CXXCPP=$ac_cv_prog_CXXCPP
34251else
34252  ac_cv_prog_CXXCPP=$CXXCPP
34253fi
34254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34255$as_echo "$CXXCPP" >&6; }
34256ac_preproc_ok=false
34257for ac_cxx_preproc_warn_flag in '' yes
34258do
34259  # Use a header file that comes with gcc, so configuring glibc
34260  # with a fresh cross-compiler works.
34261  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34262  # <limits.h> exists even on freestanding compilers.
34263  # On the NeXT, cc -E runs the code through the compiler's parser,
34264  # not just through cpp. "Syntax error" is here to catch this case.
34265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34266/* end confdefs.h.  */
34267#ifdef __STDC__
34268# include <limits.h>
34269#else
34270# include <assert.h>
34271#endif
34272		     Syntax error
34273_ACEOF
34274if ac_fn_cxx_try_cpp "$LINENO"; then :
34275
34276else
34277  # Broken: fails on valid input.
34278continue
34279fi
34280rm -f conftest.err conftest.i conftest.$ac_ext
34281
34282  # OK, works on sane cases.  Now check whether nonexistent headers
34283  # can be detected and how.
34284  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34285/* end confdefs.h.  */
34286#include <ac_nonexistent.h>
34287_ACEOF
34288if ac_fn_cxx_try_cpp "$LINENO"; then :
34289  # Broken: success on invalid input.
34290continue
34291else
34292  # Passes both tests.
34293ac_preproc_ok=:
34294break
34295fi
34296rm -f conftest.err conftest.i conftest.$ac_ext
34297
34298done
34299# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34300rm -f conftest.i conftest.err conftest.$ac_ext
34301if $ac_preproc_ok; then :
34302
34303else
34304  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34306as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34307See \`config.log' for more details" "$LINENO" 5; }
34308fi
34309
34310ac_ext=cpp
34311ac_cpp='$CXXCPP $CPPFLAGS'
34312ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34313ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34314ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34315
34316
34317  # Only process if variable expands to non-empty
34318
34319  if test "x$CXXCPP" != x; then
34320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34321
34322  # First separate the path from the arguments. This will split at the first
34323  # space.
34324  complete="$CXXCPP"
34325  path="${complete%% *}"
34326  tmp="$complete EOL"
34327  arguments="${tmp#* }"
34328
34329  # Input might be given as Windows format, start by converting to
34330  # unix format.
34331  new_path=`$CYGPATH -u "$path"`
34332
34333  # Now try to locate executable using which
34334  new_path=`$WHICH "$new_path" 2> /dev/null`
34335  # bat and cmd files are not always considered executable in cygwin causing which
34336  # to not find them
34337  if test "x$new_path" = x \
34338      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34339      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34340    new_path=`$CYGPATH -u "$path"`
34341  fi
34342  if test "x$new_path" = x; then
34343    # Oops. Which didn't find the executable.
34344    # The splitting of arguments from the executable at a space might have been incorrect,
34345    # since paths with space are more likely in Windows. Give it another try with the whole
34346    # argument.
34347    path="$complete"
34348    arguments="EOL"
34349    new_path=`$CYGPATH -u "$path"`
34350    new_path=`$WHICH "$new_path" 2> /dev/null`
34351    # bat and cmd files are not always considered executable in cygwin causing which
34352    # to not find them
34353    if test "x$new_path" = x \
34354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34356      new_path=`$CYGPATH -u "$path"`
34357    fi
34358    if test "x$new_path" = x; then
34359      # It's still not found. Now this is an unrecoverable error.
34360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34361$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34362      has_space=`$ECHO "$complete" | $GREP " "`
34363      if test "x$has_space" != x; then
34364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34366      fi
34367      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34368    fi
34369  fi
34370
34371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34374  # "foo.exe" is OK but "foo" is an error.
34375  #
34376  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34377  # It is also a way to make sure we got the proper file name for the real test later on.
34378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34379  if test "x$test_shortpath" = x; then
34380    # Short path failed, file does not exist as specified.
34381    # Try adding .exe or .cmd
34382    if test -f "${new_path}.exe"; then
34383      input_to_shortpath="${new_path}.exe"
34384    elif test -f "${new_path}.cmd"; then
34385      input_to_shortpath="${new_path}.cmd"
34386    else
34387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34388$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34389      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34390$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34391      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34392    fi
34393  else
34394    input_to_shortpath="$new_path"
34395  fi
34396
34397  # Call helper function which possibly converts this using DOS-style short mode.
34398  # If so, the updated path is stored in $new_path.
34399  new_path="$input_to_shortpath"
34400
34401  input_path="$input_to_shortpath"
34402  # Check if we need to convert this using DOS-style short mode. If the path
34403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34404  # take no chances and rewrite it.
34405  # Note: m4 eats our [], so we need to use [ and ] instead.
34406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34407  if test "x$has_forbidden_chars" != x; then
34408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34412      # Going to short mode and back again did indeed matter. Since short mode is
34413      # case insensitive, let's make it lowercase to improve readability.
34414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34415      # Now convert it back to Unix-style (cygpath)
34416      input_path=`$CYGPATH -u "$shortmode_path"`
34417      new_path="$input_path"
34418    fi
34419  fi
34420
34421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34422  if test "x$test_cygdrive_prefix" = x; then
34423    # As a simple fix, exclude /usr/bin since it's not a real path.
34424    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34426      # a path prefixed by /cygdrive for fixpath to work.
34427      new_path="$CYGWIN_ROOT_PATH$input_path"
34428    fi
34429  fi
34430
34431  # remove trailing .exe if any
34432  new_path="${new_path/%.exe/}"
34433
34434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34435
34436  # First separate the path from the arguments. This will split at the first
34437  # space.
34438  complete="$CXXCPP"
34439  path="${complete%% *}"
34440  tmp="$complete EOL"
34441  arguments="${tmp#* }"
34442
34443  # Input might be given as Windows format, start by converting to
34444  # unix format.
34445  new_path="$path"
34446
34447  windows_path="$new_path"
34448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34449    unix_path=`$CYGPATH -u "$windows_path"`
34450    new_path="$unix_path"
34451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34453    new_path="$unix_path"
34454  fi
34455
34456
34457  # Now try to locate executable using which
34458  new_path=`$WHICH "$new_path" 2> /dev/null`
34459
34460  if test "x$new_path" = x; then
34461    # Oops. Which didn't find the executable.
34462    # The splitting of arguments from the executable at a space might have been incorrect,
34463    # since paths with space are more likely in Windows. Give it another try with the whole
34464    # argument.
34465    path="$complete"
34466    arguments="EOL"
34467    new_path="$path"
34468
34469  windows_path="$new_path"
34470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34471    unix_path=`$CYGPATH -u "$windows_path"`
34472    new_path="$unix_path"
34473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34475    new_path="$unix_path"
34476  fi
34477
34478
34479    new_path=`$WHICH "$new_path" 2> /dev/null`
34480    # bat and cmd files are not always considered executable in MSYS causing which
34481    # to not find them
34482    if test "x$new_path" = x \
34483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34485      new_path="$path"
34486
34487  windows_path="$new_path"
34488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34489    unix_path=`$CYGPATH -u "$windows_path"`
34490    new_path="$unix_path"
34491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34493    new_path="$unix_path"
34494  fi
34495
34496    fi
34497
34498    if test "x$new_path" = x; then
34499      # It's still not found. Now this is an unrecoverable error.
34500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34501$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34502      has_space=`$ECHO "$complete" | $GREP " "`
34503      if test "x$has_space" != x; then
34504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34506      fi
34507      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34508    fi
34509  fi
34510
34511  # Now new_path has a complete unix path to the binary
34512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34513    # Keep paths in /bin as-is, but remove trailing .exe if any
34514    new_path="${new_path/%.exe/}"
34515    # Do not save /bin paths to all_fixpath_prefixes!
34516  else
34517    # Not in mixed or Windows style, start by that.
34518    new_path=`cmd //c echo $new_path`
34519
34520  input_path="$new_path"
34521  # Check if we need to convert this using DOS-style short mode. If the path
34522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34523  # take no chances and rewrite it.
34524  # Note: m4 eats our [], so we need to use [ and ] instead.
34525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34526  if test "x$has_forbidden_chars" != x; then
34527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34529  fi
34530
34531    # Output is in $new_path
34532
34533  windows_path="$new_path"
34534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34535    unix_path=`$CYGPATH -u "$windows_path"`
34536    new_path="$unix_path"
34537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34539    new_path="$unix_path"
34540  fi
34541
34542    # remove trailing .exe if any
34543    new_path="${new_path/%.exe/}"
34544
34545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34547  fi
34548
34549    else
34550      # We're on a unix platform. Hooray! :)
34551      # First separate the path from the arguments. This will split at the first
34552      # space.
34553      complete="$CXXCPP"
34554      path="${complete%% *}"
34555      tmp="$complete EOL"
34556      arguments="${tmp#* }"
34557
34558      # Cannot rely on the command "which" here since it doesn't always work.
34559      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34560      if test -z "$is_absolute_path"; then
34561        # Path to executable is not absolute. Find it.
34562        IFS_save="$IFS"
34563        IFS=:
34564        for p in $PATH; do
34565          if test -f "$p/$path" && test -x "$p/$path"; then
34566            new_path="$p/$path"
34567            break
34568          fi
34569        done
34570        IFS="$IFS_save"
34571      else
34572        # This is an absolute path, we can use it without further modifications.
34573        new_path="$path"
34574      fi
34575
34576      if test "x$new_path" = x; then
34577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34578$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34579        has_space=`$ECHO "$complete" | $GREP " "`
34580        if test "x$has_space" != x; then
34581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34583        fi
34584        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34585      fi
34586    fi
34587
34588    # Now join together the path and the arguments once again
34589    if test "x$arguments" != xEOL; then
34590      new_complete="$new_path ${arguments% *}"
34591    else
34592      new_complete="$new_path"
34593    fi
34594
34595    if test "x$complete" != "x$new_complete"; then
34596      CXXCPP="$new_complete"
34597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34598$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34599    fi
34600  fi
34601
34602
34603  #
34604  # Setup the linker (LD)
34605  #
34606  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34607    # In the Microsoft toolchain we have a separate LD command "link".
34608    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34609    # a cygwin program for something completely different.
34610    # Extract the first word of "link", so it can be a program name with args.
34611set dummy link; ac_word=$2
34612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34613$as_echo_n "checking for $ac_word... " >&6; }
34614if ${ac_cv_prog_LD+:} false; then :
34615  $as_echo_n "(cached) " >&6
34616else
34617  if test -n "$LD"; then
34618  ac_cv_prog_LD="$LD" # Let the user override the test.
34619else
34620  ac_prog_rejected=no
34621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34622for as_dir in $PATH
34623do
34624  IFS=$as_save_IFS
34625  test -z "$as_dir" && as_dir=.
34626    for ac_exec_ext in '' $ac_executable_extensions; do
34627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34628    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34629       ac_prog_rejected=yes
34630       continue
34631     fi
34632    ac_cv_prog_LD="link"
34633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34634    break 2
34635  fi
34636done
34637  done
34638IFS=$as_save_IFS
34639
34640if test $ac_prog_rejected = yes; then
34641  # We found a bogon in the path, so make sure we never use it.
34642  set dummy $ac_cv_prog_LD
34643  shift
34644  if test $# != 0; then
34645    # We chose a different compiler from the bogus one.
34646    # However, it has the same basename, so the bogon will be chosen
34647    # first if we set LD to just the basename; use the full file name.
34648    shift
34649    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34650  fi
34651fi
34652fi
34653fi
34654LD=$ac_cv_prog_LD
34655if test -n "$LD"; then
34656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34657$as_echo "$LD" >&6; }
34658else
34659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34660$as_echo "no" >&6; }
34661fi
34662
34663
34664
34665  # Only process if variable expands to non-empty
34666
34667  if test "x$LD" != x; then
34668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34669
34670  # First separate the path from the arguments. This will split at the first
34671  # space.
34672  complete="$LD"
34673  path="${complete%% *}"
34674  tmp="$complete EOL"
34675  arguments="${tmp#* }"
34676
34677  # Input might be given as Windows format, start by converting to
34678  # unix format.
34679  new_path=`$CYGPATH -u "$path"`
34680
34681  # Now try to locate executable using which
34682  new_path=`$WHICH "$new_path" 2> /dev/null`
34683  # bat and cmd files are not always considered executable in cygwin causing which
34684  # to not find them
34685  if test "x$new_path" = x \
34686      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34687      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34688    new_path=`$CYGPATH -u "$path"`
34689  fi
34690  if test "x$new_path" = x; then
34691    # Oops. Which didn't find the executable.
34692    # The splitting of arguments from the executable at a space might have been incorrect,
34693    # since paths with space are more likely in Windows. Give it another try with the whole
34694    # argument.
34695    path="$complete"
34696    arguments="EOL"
34697    new_path=`$CYGPATH -u "$path"`
34698    new_path=`$WHICH "$new_path" 2> /dev/null`
34699    # bat and cmd files are not always considered executable in cygwin causing which
34700    # to not find them
34701    if test "x$new_path" = x \
34702        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34703        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34704      new_path=`$CYGPATH -u "$path"`
34705    fi
34706    if test "x$new_path" = x; then
34707      # It's still not found. Now this is an unrecoverable error.
34708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34709$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34710      has_space=`$ECHO "$complete" | $GREP " "`
34711      if test "x$has_space" != x; then
34712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34714      fi
34715      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34716    fi
34717  fi
34718
34719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34722  # "foo.exe" is OK but "foo" is an error.
34723  #
34724  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34725  # It is also a way to make sure we got the proper file name for the real test later on.
34726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34727  if test "x$test_shortpath" = x; then
34728    # Short path failed, file does not exist as specified.
34729    # Try adding .exe or .cmd
34730    if test -f "${new_path}.exe"; then
34731      input_to_shortpath="${new_path}.exe"
34732    elif test -f "${new_path}.cmd"; then
34733      input_to_shortpath="${new_path}.cmd"
34734    else
34735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34736$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34739      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34740    fi
34741  else
34742    input_to_shortpath="$new_path"
34743  fi
34744
34745  # Call helper function which possibly converts this using DOS-style short mode.
34746  # If so, the updated path is stored in $new_path.
34747  new_path="$input_to_shortpath"
34748
34749  input_path="$input_to_shortpath"
34750  # Check if we need to convert this using DOS-style short mode. If the path
34751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34752  # take no chances and rewrite it.
34753  # Note: m4 eats our [], so we need to use [ and ] instead.
34754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34755  if test "x$has_forbidden_chars" != x; then
34756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34760      # Going to short mode and back again did indeed matter. Since short mode is
34761      # case insensitive, let's make it lowercase to improve readability.
34762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34763      # Now convert it back to Unix-style (cygpath)
34764      input_path=`$CYGPATH -u "$shortmode_path"`
34765      new_path="$input_path"
34766    fi
34767  fi
34768
34769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34770  if test "x$test_cygdrive_prefix" = x; then
34771    # As a simple fix, exclude /usr/bin since it's not a real path.
34772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34774      # a path prefixed by /cygdrive for fixpath to work.
34775      new_path="$CYGWIN_ROOT_PATH$input_path"
34776    fi
34777  fi
34778
34779  # remove trailing .exe if any
34780  new_path="${new_path/%.exe/}"
34781
34782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34783
34784  # First separate the path from the arguments. This will split at the first
34785  # space.
34786  complete="$LD"
34787  path="${complete%% *}"
34788  tmp="$complete EOL"
34789  arguments="${tmp#* }"
34790
34791  # Input might be given as Windows format, start by converting to
34792  # unix format.
34793  new_path="$path"
34794
34795  windows_path="$new_path"
34796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34797    unix_path=`$CYGPATH -u "$windows_path"`
34798    new_path="$unix_path"
34799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34801    new_path="$unix_path"
34802  fi
34803
34804
34805  # Now try to locate executable using which
34806  new_path=`$WHICH "$new_path" 2> /dev/null`
34807
34808  if test "x$new_path" = x; then
34809    # Oops. Which didn't find the executable.
34810    # The splitting of arguments from the executable at a space might have been incorrect,
34811    # since paths with space are more likely in Windows. Give it another try with the whole
34812    # argument.
34813    path="$complete"
34814    arguments="EOL"
34815    new_path="$path"
34816
34817  windows_path="$new_path"
34818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34819    unix_path=`$CYGPATH -u "$windows_path"`
34820    new_path="$unix_path"
34821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34823    new_path="$unix_path"
34824  fi
34825
34826
34827    new_path=`$WHICH "$new_path" 2> /dev/null`
34828    # bat and cmd files are not always considered executable in MSYS causing which
34829    # to not find them
34830    if test "x$new_path" = x \
34831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34833      new_path="$path"
34834
34835  windows_path="$new_path"
34836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34837    unix_path=`$CYGPATH -u "$windows_path"`
34838    new_path="$unix_path"
34839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34841    new_path="$unix_path"
34842  fi
34843
34844    fi
34845
34846    if test "x$new_path" = x; then
34847      # It's still not found. Now this is an unrecoverable error.
34848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34849$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34850      has_space=`$ECHO "$complete" | $GREP " "`
34851      if test "x$has_space" != x; then
34852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34854      fi
34855      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34856    fi
34857  fi
34858
34859  # Now new_path has a complete unix path to the binary
34860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34861    # Keep paths in /bin as-is, but remove trailing .exe if any
34862    new_path="${new_path/%.exe/}"
34863    # Do not save /bin paths to all_fixpath_prefixes!
34864  else
34865    # Not in mixed or Windows style, start by that.
34866    new_path=`cmd //c echo $new_path`
34867
34868  input_path="$new_path"
34869  # Check if we need to convert this using DOS-style short mode. If the path
34870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34871  # take no chances and rewrite it.
34872  # Note: m4 eats our [], so we need to use [ and ] instead.
34873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34874  if test "x$has_forbidden_chars" != x; then
34875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34877  fi
34878
34879    # Output is in $new_path
34880
34881  windows_path="$new_path"
34882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34883    unix_path=`$CYGPATH -u "$windows_path"`
34884    new_path="$unix_path"
34885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34887    new_path="$unix_path"
34888  fi
34889
34890    # remove trailing .exe if any
34891    new_path="${new_path/%.exe/}"
34892
34893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34895  fi
34896
34897    else
34898      # We're on a unix platform. Hooray! :)
34899      # First separate the path from the arguments. This will split at the first
34900      # space.
34901      complete="$LD"
34902      path="${complete%% *}"
34903      tmp="$complete EOL"
34904      arguments="${tmp#* }"
34905
34906      # Cannot rely on the command "which" here since it doesn't always work.
34907      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34908      if test -z "$is_absolute_path"; then
34909        # Path to executable is not absolute. Find it.
34910        IFS_save="$IFS"
34911        IFS=:
34912        for p in $PATH; do
34913          if test -f "$p/$path" && test -x "$p/$path"; then
34914            new_path="$p/$path"
34915            break
34916          fi
34917        done
34918        IFS="$IFS_save"
34919      else
34920        # This is an absolute path, we can use it without further modifications.
34921        new_path="$path"
34922      fi
34923
34924      if test "x$new_path" = x; then
34925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34926$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34927        has_space=`$ECHO "$complete" | $GREP " "`
34928        if test "x$has_space" != x; then
34929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34931        fi
34932        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34933      fi
34934    fi
34935
34936    # Now join together the path and the arguments once again
34937    if test "x$arguments" != xEOL; then
34938      new_complete="$new_path ${arguments% *}"
34939    else
34940      new_complete="$new_path"
34941    fi
34942
34943    if test "x$complete" != "x$new_complete"; then
34944      LD="$new_complete"
34945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
34946$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
34947    fi
34948  fi
34949
34950    # Verify that we indeed succeeded with this trick.
34951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
34952$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
34953    "$LD" --version > /dev/null
34954    if test $? -eq 0 ; then
34955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34956$as_echo "no" >&6; }
34957      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
34958    else
34959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34960$as_echo "yes" >&6; }
34961    fi
34962    LDCXX="$LD"
34963  else
34964    # All other toolchains use the compiler to link.
34965    LD="$CC"
34966    LDCXX="$CXX"
34967  fi
34968
34969  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
34970
34971
34972  #
34973  # Setup the assembler (AS)
34974  #
34975  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34976    # FIXME: should this really be solaris, or solstudio?
34977
34978
34979  # Publish this variable in the help.
34980
34981
34982  if [ -z "${AS+x}" ]; then
34983    # The variable is not set by user, try to locate tool using the code snippet
34984    for ac_prog in as
34985do
34986  # Extract the first word of "$ac_prog", so it can be a program name with args.
34987set dummy $ac_prog; ac_word=$2
34988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34989$as_echo_n "checking for $ac_word... " >&6; }
34990if ${ac_cv_path_AS+:} false; then :
34991  $as_echo_n "(cached) " >&6
34992else
34993  case $AS in
34994  [\\/]* | ?:[\\/]*)
34995  ac_cv_path_AS="$AS" # Let the user override the test with a path.
34996  ;;
34997  *)
34998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34999for as_dir in $PATH
35000do
35001  IFS=$as_save_IFS
35002  test -z "$as_dir" && as_dir=.
35003    for ac_exec_ext in '' $ac_executable_extensions; do
35004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35005    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35007    break 2
35008  fi
35009done
35010  done
35011IFS=$as_save_IFS
35012
35013  ;;
35014esac
35015fi
35016AS=$ac_cv_path_AS
35017if test -n "$AS"; then
35018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35019$as_echo "$AS" >&6; }
35020else
35021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35022$as_echo "no" >&6; }
35023fi
35024
35025
35026  test -n "$AS" && break
35027done
35028
35029  else
35030    # The variable is set, but is it from the command line or the environment?
35031
35032    # Try to remove the string !AS! from our list.
35033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35035      # If it failed, the variable was not from the command line. Ignore it,
35036      # but warn the user (except for BASH, which is always set by the calling BASH).
35037      if test "xAS" != xBASH; then
35038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35039$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35040      fi
35041      # Try to locate tool using the code snippet
35042      for ac_prog in as
35043do
35044  # Extract the first word of "$ac_prog", so it can be a program name with args.
35045set dummy $ac_prog; ac_word=$2
35046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35047$as_echo_n "checking for $ac_word... " >&6; }
35048if ${ac_cv_path_AS+:} false; then :
35049  $as_echo_n "(cached) " >&6
35050else
35051  case $AS in
35052  [\\/]* | ?:[\\/]*)
35053  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35054  ;;
35055  *)
35056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35057for as_dir in $PATH
35058do
35059  IFS=$as_save_IFS
35060  test -z "$as_dir" && as_dir=.
35061    for ac_exec_ext in '' $ac_executable_extensions; do
35062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35063    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35065    break 2
35066  fi
35067done
35068  done
35069IFS=$as_save_IFS
35070
35071  ;;
35072esac
35073fi
35074AS=$ac_cv_path_AS
35075if test -n "$AS"; then
35076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35077$as_echo "$AS" >&6; }
35078else
35079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35080$as_echo "no" >&6; }
35081fi
35082
35083
35084  test -n "$AS" && break
35085done
35086
35087    else
35088      # If it succeeded, then it was overridden by the user. We will use it
35089      # for the tool.
35090
35091      # First remove it from the list of overridden variables, so we can test
35092      # for unknown variables in the end.
35093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35094
35095      # Check if we try to supply an empty value
35096      if test "x$AS" = x; then
35097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35098$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35100$as_echo_n "checking for AS... " >&6; }
35101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35102$as_echo "disabled" >&6; }
35103      else
35104        # Check if the provided tool contains a complete path.
35105        tool_specified="$AS"
35106        tool_basename="${tool_specified##*/}"
35107        if test "x$tool_basename" = "x$tool_specified"; then
35108          # A command without a complete path is provided, search $PATH.
35109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35110$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35111          # Extract the first word of "$tool_basename", so it can be a program name with args.
35112set dummy $tool_basename; ac_word=$2
35113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35114$as_echo_n "checking for $ac_word... " >&6; }
35115if ${ac_cv_path_AS+:} false; then :
35116  $as_echo_n "(cached) " >&6
35117else
35118  case $AS in
35119  [\\/]* | ?:[\\/]*)
35120  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35121  ;;
35122  *)
35123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35124for as_dir in $PATH
35125do
35126  IFS=$as_save_IFS
35127  test -z "$as_dir" && as_dir=.
35128    for ac_exec_ext in '' $ac_executable_extensions; do
35129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35130    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35132    break 2
35133  fi
35134done
35135  done
35136IFS=$as_save_IFS
35137
35138  ;;
35139esac
35140fi
35141AS=$ac_cv_path_AS
35142if test -n "$AS"; then
35143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35144$as_echo "$AS" >&6; }
35145else
35146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35147$as_echo "no" >&6; }
35148fi
35149
35150
35151          if test "x$AS" = x; then
35152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35153          fi
35154        else
35155          # Otherwise we believe it is a complete path. Use it as it is.
35156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35157$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35159$as_echo_n "checking for AS... " >&6; }
35160          if test ! -x "$tool_specified"; then
35161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35162$as_echo "not found" >&6; }
35163            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35164          fi
35165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35166$as_echo "$tool_specified" >&6; }
35167        fi
35168      fi
35169    fi
35170
35171  fi
35172
35173
35174
35175  # Only process if variable expands to non-empty
35176
35177  if test "x$AS" != x; then
35178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35179
35180  # First separate the path from the arguments. This will split at the first
35181  # space.
35182  complete="$AS"
35183  path="${complete%% *}"
35184  tmp="$complete EOL"
35185  arguments="${tmp#* }"
35186
35187  # Input might be given as Windows format, start by converting to
35188  # unix format.
35189  new_path=`$CYGPATH -u "$path"`
35190
35191  # Now try to locate executable using which
35192  new_path=`$WHICH "$new_path" 2> /dev/null`
35193  # bat and cmd files are not always considered executable in cygwin causing which
35194  # to not find them
35195  if test "x$new_path" = x \
35196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35198    new_path=`$CYGPATH -u "$path"`
35199  fi
35200  if test "x$new_path" = x; then
35201    # Oops. Which didn't find the executable.
35202    # The splitting of arguments from the executable at a space might have been incorrect,
35203    # since paths with space are more likely in Windows. Give it another try with the whole
35204    # argument.
35205    path="$complete"
35206    arguments="EOL"
35207    new_path=`$CYGPATH -u "$path"`
35208    new_path=`$WHICH "$new_path" 2> /dev/null`
35209    # bat and cmd files are not always considered executable in cygwin causing which
35210    # to not find them
35211    if test "x$new_path" = x \
35212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35214      new_path=`$CYGPATH -u "$path"`
35215    fi
35216    if test "x$new_path" = x; then
35217      # It's still not found. Now this is an unrecoverable error.
35218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35219$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35220      has_space=`$ECHO "$complete" | $GREP " "`
35221      if test "x$has_space" != x; then
35222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35224      fi
35225      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35226    fi
35227  fi
35228
35229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35232  # "foo.exe" is OK but "foo" is an error.
35233  #
35234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35235  # It is also a way to make sure we got the proper file name for the real test later on.
35236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35237  if test "x$test_shortpath" = x; then
35238    # Short path failed, file does not exist as specified.
35239    # Try adding .exe or .cmd
35240    if test -f "${new_path}.exe"; then
35241      input_to_shortpath="${new_path}.exe"
35242    elif test -f "${new_path}.cmd"; then
35243      input_to_shortpath="${new_path}.cmd"
35244    else
35245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35246$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35249      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35250    fi
35251  else
35252    input_to_shortpath="$new_path"
35253  fi
35254
35255  # Call helper function which possibly converts this using DOS-style short mode.
35256  # If so, the updated path is stored in $new_path.
35257  new_path="$input_to_shortpath"
35258
35259  input_path="$input_to_shortpath"
35260  # Check if we need to convert this using DOS-style short mode. If the path
35261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35262  # take no chances and rewrite it.
35263  # Note: m4 eats our [], so we need to use [ and ] instead.
35264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35265  if test "x$has_forbidden_chars" != x; then
35266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35270      # Going to short mode and back again did indeed matter. Since short mode is
35271      # case insensitive, let's make it lowercase to improve readability.
35272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35273      # Now convert it back to Unix-style (cygpath)
35274      input_path=`$CYGPATH -u "$shortmode_path"`
35275      new_path="$input_path"
35276    fi
35277  fi
35278
35279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35280  if test "x$test_cygdrive_prefix" = x; then
35281    # As a simple fix, exclude /usr/bin since it's not a real path.
35282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35284      # a path prefixed by /cygdrive for fixpath to work.
35285      new_path="$CYGWIN_ROOT_PATH$input_path"
35286    fi
35287  fi
35288
35289  # remove trailing .exe if any
35290  new_path="${new_path/%.exe/}"
35291
35292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35293
35294  # First separate the path from the arguments. This will split at the first
35295  # space.
35296  complete="$AS"
35297  path="${complete%% *}"
35298  tmp="$complete EOL"
35299  arguments="${tmp#* }"
35300
35301  # Input might be given as Windows format, start by converting to
35302  # unix format.
35303  new_path="$path"
35304
35305  windows_path="$new_path"
35306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35307    unix_path=`$CYGPATH -u "$windows_path"`
35308    new_path="$unix_path"
35309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35311    new_path="$unix_path"
35312  fi
35313
35314
35315  # Now try to locate executable using which
35316  new_path=`$WHICH "$new_path" 2> /dev/null`
35317
35318  if test "x$new_path" = x; then
35319    # Oops. Which didn't find the executable.
35320    # The splitting of arguments from the executable at a space might have been incorrect,
35321    # since paths with space are more likely in Windows. Give it another try with the whole
35322    # argument.
35323    path="$complete"
35324    arguments="EOL"
35325    new_path="$path"
35326
35327  windows_path="$new_path"
35328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35329    unix_path=`$CYGPATH -u "$windows_path"`
35330    new_path="$unix_path"
35331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35333    new_path="$unix_path"
35334  fi
35335
35336
35337    new_path=`$WHICH "$new_path" 2> /dev/null`
35338    # bat and cmd files are not always considered executable in MSYS causing which
35339    # to not find them
35340    if test "x$new_path" = x \
35341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35343      new_path="$path"
35344
35345  windows_path="$new_path"
35346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35347    unix_path=`$CYGPATH -u "$windows_path"`
35348    new_path="$unix_path"
35349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35351    new_path="$unix_path"
35352  fi
35353
35354    fi
35355
35356    if test "x$new_path" = x; then
35357      # It's still not found. Now this is an unrecoverable error.
35358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35359$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35360      has_space=`$ECHO "$complete" | $GREP " "`
35361      if test "x$has_space" != x; then
35362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35364      fi
35365      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35366    fi
35367  fi
35368
35369  # Now new_path has a complete unix path to the binary
35370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35371    # Keep paths in /bin as-is, but remove trailing .exe if any
35372    new_path="${new_path/%.exe/}"
35373    # Do not save /bin paths to all_fixpath_prefixes!
35374  else
35375    # Not in mixed or Windows style, start by that.
35376    new_path=`cmd //c echo $new_path`
35377
35378  input_path="$new_path"
35379  # Check if we need to convert this using DOS-style short mode. If the path
35380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35381  # take no chances and rewrite it.
35382  # Note: m4 eats our [], so we need to use [ and ] instead.
35383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35384  if test "x$has_forbidden_chars" != x; then
35385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35387  fi
35388
35389    # Output is in $new_path
35390
35391  windows_path="$new_path"
35392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35393    unix_path=`$CYGPATH -u "$windows_path"`
35394    new_path="$unix_path"
35395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35397    new_path="$unix_path"
35398  fi
35399
35400    # remove trailing .exe if any
35401    new_path="${new_path/%.exe/}"
35402
35403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35405  fi
35406
35407    else
35408      # We're on a unix platform. Hooray! :)
35409      # First separate the path from the arguments. This will split at the first
35410      # space.
35411      complete="$AS"
35412      path="${complete%% *}"
35413      tmp="$complete EOL"
35414      arguments="${tmp#* }"
35415
35416      # Cannot rely on the command "which" here since it doesn't always work.
35417      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35418      if test -z "$is_absolute_path"; then
35419        # Path to executable is not absolute. Find it.
35420        IFS_save="$IFS"
35421        IFS=:
35422        for p in $PATH; do
35423          if test -f "$p/$path" && test -x "$p/$path"; then
35424            new_path="$p/$path"
35425            break
35426          fi
35427        done
35428        IFS="$IFS_save"
35429      else
35430        # This is an absolute path, we can use it without further modifications.
35431        new_path="$path"
35432      fi
35433
35434      if test "x$new_path" = x; then
35435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35436$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35437        has_space=`$ECHO "$complete" | $GREP " "`
35438        if test "x$has_space" != x; then
35439          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35441        fi
35442        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35443      fi
35444    fi
35445
35446    # Now join together the path and the arguments once again
35447    if test "x$arguments" != xEOL; then
35448      new_complete="$new_path ${arguments% *}"
35449    else
35450      new_complete="$new_path"
35451    fi
35452
35453    if test "x$complete" != "x$new_complete"; then
35454      AS="$new_complete"
35455      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35456$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35457    fi
35458  fi
35459
35460  else
35461    # FIXME: is this correct for microsoft?
35462    AS="$CC -c"
35463  fi
35464
35465
35466  #
35467  # Setup the archiver (AR)
35468  #
35469  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35470    # The corresponding ar tool is lib.exe (used to create static libraries)
35471    # Extract the first word of "lib", so it can be a program name with args.
35472set dummy lib; ac_word=$2
35473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35474$as_echo_n "checking for $ac_word... " >&6; }
35475if ${ac_cv_prog_AR+:} false; then :
35476  $as_echo_n "(cached) " >&6
35477else
35478  if test -n "$AR"; then
35479  ac_cv_prog_AR="$AR" # Let the user override the test.
35480else
35481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35482for as_dir in $PATH
35483do
35484  IFS=$as_save_IFS
35485  test -z "$as_dir" && as_dir=.
35486    for ac_exec_ext in '' $ac_executable_extensions; do
35487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35488    ac_cv_prog_AR="lib"
35489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35490    break 2
35491  fi
35492done
35493  done
35494IFS=$as_save_IFS
35495
35496fi
35497fi
35498AR=$ac_cv_prog_AR
35499if test -n "$AR"; then
35500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35501$as_echo "$AR" >&6; }
35502else
35503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35504$as_echo "no" >&6; }
35505fi
35506
35507
35508  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35509
35510
35511  # Publish this variable in the help.
35512
35513
35514  if [ -z "${AR+x}" ]; then
35515    # The variable is not set by user, try to locate tool using the code snippet
35516    if test -n "$ac_tool_prefix"; then
35517  for ac_prog in ar gcc-ar
35518  do
35519    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35520set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35522$as_echo_n "checking for $ac_word... " >&6; }
35523if ${ac_cv_prog_AR+:} false; then :
35524  $as_echo_n "(cached) " >&6
35525else
35526  if test -n "$AR"; then
35527  ac_cv_prog_AR="$AR" # Let the user override the test.
35528else
35529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35530for as_dir in $PATH
35531do
35532  IFS=$as_save_IFS
35533  test -z "$as_dir" && as_dir=.
35534    for ac_exec_ext in '' $ac_executable_extensions; do
35535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35536    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35538    break 2
35539  fi
35540done
35541  done
35542IFS=$as_save_IFS
35543
35544fi
35545fi
35546AR=$ac_cv_prog_AR
35547if test -n "$AR"; then
35548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35549$as_echo "$AR" >&6; }
35550else
35551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35552$as_echo "no" >&6; }
35553fi
35554
35555
35556    test -n "$AR" && break
35557  done
35558fi
35559if test -z "$AR"; then
35560  ac_ct_AR=$AR
35561  for ac_prog in ar gcc-ar
35562do
35563  # Extract the first word of "$ac_prog", so it can be a program name with args.
35564set dummy $ac_prog; ac_word=$2
35565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35566$as_echo_n "checking for $ac_word... " >&6; }
35567if ${ac_cv_prog_ac_ct_AR+:} false; then :
35568  $as_echo_n "(cached) " >&6
35569else
35570  if test -n "$ac_ct_AR"; then
35571  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35572else
35573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35574for as_dir in $PATH
35575do
35576  IFS=$as_save_IFS
35577  test -z "$as_dir" && as_dir=.
35578    for ac_exec_ext in '' $ac_executable_extensions; do
35579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35580    ac_cv_prog_ac_ct_AR="$ac_prog"
35581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35582    break 2
35583  fi
35584done
35585  done
35586IFS=$as_save_IFS
35587
35588fi
35589fi
35590ac_ct_AR=$ac_cv_prog_ac_ct_AR
35591if test -n "$ac_ct_AR"; then
35592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35593$as_echo "$ac_ct_AR" >&6; }
35594else
35595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35596$as_echo "no" >&6; }
35597fi
35598
35599
35600  test -n "$ac_ct_AR" && break
35601done
35602
35603  if test "x$ac_ct_AR" = x; then
35604    AR=""
35605  else
35606    case $cross_compiling:$ac_tool_warned in
35607yes:)
35608{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35609$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35610ac_tool_warned=yes ;;
35611esac
35612    AR=$ac_ct_AR
35613  fi
35614fi
35615
35616  else
35617    # The variable is set, but is it from the command line or the environment?
35618
35619    # Try to remove the string !AR! from our list.
35620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35622      # If it failed, the variable was not from the command line. Ignore it,
35623      # but warn the user (except for BASH, which is always set by the calling BASH).
35624      if test "xAR" != xBASH; then
35625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35626$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35627      fi
35628      # Try to locate tool using the code snippet
35629      if test -n "$ac_tool_prefix"; then
35630  for ac_prog in ar gcc-ar
35631  do
35632    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35635$as_echo_n "checking for $ac_word... " >&6; }
35636if ${ac_cv_prog_AR+:} false; then :
35637  $as_echo_n "(cached) " >&6
35638else
35639  if test -n "$AR"; then
35640  ac_cv_prog_AR="$AR" # Let the user override the test.
35641else
35642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35643for as_dir in $PATH
35644do
35645  IFS=$as_save_IFS
35646  test -z "$as_dir" && as_dir=.
35647    for ac_exec_ext in '' $ac_executable_extensions; do
35648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35649    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35651    break 2
35652  fi
35653done
35654  done
35655IFS=$as_save_IFS
35656
35657fi
35658fi
35659AR=$ac_cv_prog_AR
35660if test -n "$AR"; then
35661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35662$as_echo "$AR" >&6; }
35663else
35664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35665$as_echo "no" >&6; }
35666fi
35667
35668
35669    test -n "$AR" && break
35670  done
35671fi
35672if test -z "$AR"; then
35673  ac_ct_AR=$AR
35674  for ac_prog in ar gcc-ar
35675do
35676  # Extract the first word of "$ac_prog", so it can be a program name with args.
35677set dummy $ac_prog; ac_word=$2
35678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35679$as_echo_n "checking for $ac_word... " >&6; }
35680if ${ac_cv_prog_ac_ct_AR+:} false; then :
35681  $as_echo_n "(cached) " >&6
35682else
35683  if test -n "$ac_ct_AR"; then
35684  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35685else
35686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35687for as_dir in $PATH
35688do
35689  IFS=$as_save_IFS
35690  test -z "$as_dir" && as_dir=.
35691    for ac_exec_ext in '' $ac_executable_extensions; do
35692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35693    ac_cv_prog_ac_ct_AR="$ac_prog"
35694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35695    break 2
35696  fi
35697done
35698  done
35699IFS=$as_save_IFS
35700
35701fi
35702fi
35703ac_ct_AR=$ac_cv_prog_ac_ct_AR
35704if test -n "$ac_ct_AR"; then
35705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35706$as_echo "$ac_ct_AR" >&6; }
35707else
35708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35709$as_echo "no" >&6; }
35710fi
35711
35712
35713  test -n "$ac_ct_AR" && break
35714done
35715
35716  if test "x$ac_ct_AR" = x; then
35717    AR=""
35718  else
35719    case $cross_compiling:$ac_tool_warned in
35720yes:)
35721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35723ac_tool_warned=yes ;;
35724esac
35725    AR=$ac_ct_AR
35726  fi
35727fi
35728
35729    else
35730      # If it succeeded, then it was overridden by the user. We will use it
35731      # for the tool.
35732
35733      # First remove it from the list of overridden variables, so we can test
35734      # for unknown variables in the end.
35735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35736
35737      # Check if we try to supply an empty value
35738      if test "x$AR" = x; then
35739        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35740$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35741        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35742$as_echo_n "checking for AR... " >&6; }
35743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35744$as_echo "disabled" >&6; }
35745      else
35746        # Check if the provided tool contains a complete path.
35747        tool_specified="$AR"
35748        tool_basename="${tool_specified##*/}"
35749        if test "x$tool_basename" = "x$tool_specified"; then
35750          # A command without a complete path is provided, search $PATH.
35751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35752$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35753          # Extract the first word of "$tool_basename", so it can be a program name with args.
35754set dummy $tool_basename; ac_word=$2
35755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35756$as_echo_n "checking for $ac_word... " >&6; }
35757if ${ac_cv_path_AR+:} false; then :
35758  $as_echo_n "(cached) " >&6
35759else
35760  case $AR in
35761  [\\/]* | ?:[\\/]*)
35762  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35763  ;;
35764  *)
35765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35766for as_dir in $PATH
35767do
35768  IFS=$as_save_IFS
35769  test -z "$as_dir" && as_dir=.
35770    for ac_exec_ext in '' $ac_executable_extensions; do
35771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35772    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35774    break 2
35775  fi
35776done
35777  done
35778IFS=$as_save_IFS
35779
35780  ;;
35781esac
35782fi
35783AR=$ac_cv_path_AR
35784if test -n "$AR"; then
35785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35786$as_echo "$AR" >&6; }
35787else
35788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35789$as_echo "no" >&6; }
35790fi
35791
35792
35793          if test "x$AR" = x; then
35794            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35795          fi
35796        else
35797          # Otherwise we believe it is a complete path. Use it as it is.
35798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35799$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35800          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35801$as_echo_n "checking for AR... " >&6; }
35802          if test ! -x "$tool_specified"; then
35803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35804$as_echo "not found" >&6; }
35805            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35806          fi
35807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35808$as_echo "$tool_specified" >&6; }
35809        fi
35810      fi
35811    fi
35812
35813  fi
35814
35815
35816  else
35817
35818
35819  # Publish this variable in the help.
35820
35821
35822  if [ -z "${AR+x}" ]; then
35823    # The variable is not set by user, try to locate tool using the code snippet
35824    if test -n "$ac_tool_prefix"; then
35825  for ac_prog in ar
35826  do
35827    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35828set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35830$as_echo_n "checking for $ac_word... " >&6; }
35831if ${ac_cv_prog_AR+:} false; then :
35832  $as_echo_n "(cached) " >&6
35833else
35834  if test -n "$AR"; then
35835  ac_cv_prog_AR="$AR" # Let the user override the test.
35836else
35837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35838for as_dir in $PATH
35839do
35840  IFS=$as_save_IFS
35841  test -z "$as_dir" && as_dir=.
35842    for ac_exec_ext in '' $ac_executable_extensions; do
35843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35844    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35846    break 2
35847  fi
35848done
35849  done
35850IFS=$as_save_IFS
35851
35852fi
35853fi
35854AR=$ac_cv_prog_AR
35855if test -n "$AR"; then
35856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35857$as_echo "$AR" >&6; }
35858else
35859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35860$as_echo "no" >&6; }
35861fi
35862
35863
35864    test -n "$AR" && break
35865  done
35866fi
35867if test -z "$AR"; then
35868  ac_ct_AR=$AR
35869  for ac_prog in ar
35870do
35871  # Extract the first word of "$ac_prog", so it can be a program name with args.
35872set dummy $ac_prog; ac_word=$2
35873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35874$as_echo_n "checking for $ac_word... " >&6; }
35875if ${ac_cv_prog_ac_ct_AR+:} false; then :
35876  $as_echo_n "(cached) " >&6
35877else
35878  if test -n "$ac_ct_AR"; then
35879  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35880else
35881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35882for as_dir in $PATH
35883do
35884  IFS=$as_save_IFS
35885  test -z "$as_dir" && as_dir=.
35886    for ac_exec_ext in '' $ac_executable_extensions; do
35887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35888    ac_cv_prog_ac_ct_AR="$ac_prog"
35889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35890    break 2
35891  fi
35892done
35893  done
35894IFS=$as_save_IFS
35895
35896fi
35897fi
35898ac_ct_AR=$ac_cv_prog_ac_ct_AR
35899if test -n "$ac_ct_AR"; then
35900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35901$as_echo "$ac_ct_AR" >&6; }
35902else
35903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35904$as_echo "no" >&6; }
35905fi
35906
35907
35908  test -n "$ac_ct_AR" && break
35909done
35910
35911  if test "x$ac_ct_AR" = x; then
35912    AR=""
35913  else
35914    case $cross_compiling:$ac_tool_warned in
35915yes:)
35916{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35917$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35918ac_tool_warned=yes ;;
35919esac
35920    AR=$ac_ct_AR
35921  fi
35922fi
35923
35924  else
35925    # The variable is set, but is it from the command line or the environment?
35926
35927    # Try to remove the string !AR! from our list.
35928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35930      # If it failed, the variable was not from the command line. Ignore it,
35931      # but warn the user (except for BASH, which is always set by the calling BASH).
35932      if test "xAR" != xBASH; then
35933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35934$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35935      fi
35936      # Try to locate tool using the code snippet
35937      if test -n "$ac_tool_prefix"; then
35938  for ac_prog in ar
35939  do
35940    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35943$as_echo_n "checking for $ac_word... " >&6; }
35944if ${ac_cv_prog_AR+:} false; then :
35945  $as_echo_n "(cached) " >&6
35946else
35947  if test -n "$AR"; then
35948  ac_cv_prog_AR="$AR" # Let the user override the test.
35949else
35950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35951for as_dir in $PATH
35952do
35953  IFS=$as_save_IFS
35954  test -z "$as_dir" && as_dir=.
35955    for ac_exec_ext in '' $ac_executable_extensions; do
35956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35957    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35959    break 2
35960  fi
35961done
35962  done
35963IFS=$as_save_IFS
35964
35965fi
35966fi
35967AR=$ac_cv_prog_AR
35968if test -n "$AR"; then
35969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35970$as_echo "$AR" >&6; }
35971else
35972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35973$as_echo "no" >&6; }
35974fi
35975
35976
35977    test -n "$AR" && break
35978  done
35979fi
35980if test -z "$AR"; then
35981  ac_ct_AR=$AR
35982  for ac_prog in ar
35983do
35984  # Extract the first word of "$ac_prog", so it can be a program name with args.
35985set dummy $ac_prog; ac_word=$2
35986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35987$as_echo_n "checking for $ac_word... " >&6; }
35988if ${ac_cv_prog_ac_ct_AR+:} false; then :
35989  $as_echo_n "(cached) " >&6
35990else
35991  if test -n "$ac_ct_AR"; then
35992  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35993else
35994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35995for as_dir in $PATH
35996do
35997  IFS=$as_save_IFS
35998  test -z "$as_dir" && as_dir=.
35999    for ac_exec_ext in '' $ac_executable_extensions; do
36000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36001    ac_cv_prog_ac_ct_AR="$ac_prog"
36002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36003    break 2
36004  fi
36005done
36006  done
36007IFS=$as_save_IFS
36008
36009fi
36010fi
36011ac_ct_AR=$ac_cv_prog_ac_ct_AR
36012if test -n "$ac_ct_AR"; then
36013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36014$as_echo "$ac_ct_AR" >&6; }
36015else
36016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36017$as_echo "no" >&6; }
36018fi
36019
36020
36021  test -n "$ac_ct_AR" && break
36022done
36023
36024  if test "x$ac_ct_AR" = x; then
36025    AR=""
36026  else
36027    case $cross_compiling:$ac_tool_warned in
36028yes:)
36029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36031ac_tool_warned=yes ;;
36032esac
36033    AR=$ac_ct_AR
36034  fi
36035fi
36036
36037    else
36038      # If it succeeded, then it was overridden by the user. We will use it
36039      # for the tool.
36040
36041      # First remove it from the list of overridden variables, so we can test
36042      # for unknown variables in the end.
36043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36044
36045      # Check if we try to supply an empty value
36046      if test "x$AR" = x; then
36047        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36048$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36050$as_echo_n "checking for AR... " >&6; }
36051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36052$as_echo "disabled" >&6; }
36053      else
36054        # Check if the provided tool contains a complete path.
36055        tool_specified="$AR"
36056        tool_basename="${tool_specified##*/}"
36057        if test "x$tool_basename" = "x$tool_specified"; then
36058          # A command without a complete path is provided, search $PATH.
36059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36060$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36061          # Extract the first word of "$tool_basename", so it can be a program name with args.
36062set dummy $tool_basename; ac_word=$2
36063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36064$as_echo_n "checking for $ac_word... " >&6; }
36065if ${ac_cv_path_AR+:} false; then :
36066  $as_echo_n "(cached) " >&6
36067else
36068  case $AR in
36069  [\\/]* | ?:[\\/]*)
36070  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36071  ;;
36072  *)
36073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36074for as_dir in $PATH
36075do
36076  IFS=$as_save_IFS
36077  test -z "$as_dir" && as_dir=.
36078    for ac_exec_ext in '' $ac_executable_extensions; do
36079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36080    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36082    break 2
36083  fi
36084done
36085  done
36086IFS=$as_save_IFS
36087
36088  ;;
36089esac
36090fi
36091AR=$ac_cv_path_AR
36092if test -n "$AR"; then
36093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36094$as_echo "$AR" >&6; }
36095else
36096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36097$as_echo "no" >&6; }
36098fi
36099
36100
36101          if test "x$AR" = x; then
36102            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36103          fi
36104        else
36105          # Otherwise we believe it is a complete path. Use it as it is.
36106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36107$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36108          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36109$as_echo_n "checking for AR... " >&6; }
36110          if test ! -x "$tool_specified"; then
36111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36112$as_echo "not found" >&6; }
36113            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36114          fi
36115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36116$as_echo "$tool_specified" >&6; }
36117        fi
36118      fi
36119    fi
36120
36121  fi
36122
36123
36124  fi
36125
36126  # Only process if variable expands to non-empty
36127
36128  if test "x$AR" != x; then
36129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36130
36131  # First separate the path from the arguments. This will split at the first
36132  # space.
36133  complete="$AR"
36134  path="${complete%% *}"
36135  tmp="$complete EOL"
36136  arguments="${tmp#* }"
36137
36138  # Input might be given as Windows format, start by converting to
36139  # unix format.
36140  new_path=`$CYGPATH -u "$path"`
36141
36142  # Now try to locate executable using which
36143  new_path=`$WHICH "$new_path" 2> /dev/null`
36144  # bat and cmd files are not always considered executable in cygwin causing which
36145  # to not find them
36146  if test "x$new_path" = x \
36147      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36148      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36149    new_path=`$CYGPATH -u "$path"`
36150  fi
36151  if test "x$new_path" = x; then
36152    # Oops. Which didn't find the executable.
36153    # The splitting of arguments from the executable at a space might have been incorrect,
36154    # since paths with space are more likely in Windows. Give it another try with the whole
36155    # argument.
36156    path="$complete"
36157    arguments="EOL"
36158    new_path=`$CYGPATH -u "$path"`
36159    new_path=`$WHICH "$new_path" 2> /dev/null`
36160    # bat and cmd files are not always considered executable in cygwin causing which
36161    # to not find them
36162    if test "x$new_path" = x \
36163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36165      new_path=`$CYGPATH -u "$path"`
36166    fi
36167    if test "x$new_path" = x; then
36168      # It's still not found. Now this is an unrecoverable error.
36169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36170$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36171      has_space=`$ECHO "$complete" | $GREP " "`
36172      if test "x$has_space" != x; then
36173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36175      fi
36176      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36177    fi
36178  fi
36179
36180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36183  # "foo.exe" is OK but "foo" is an error.
36184  #
36185  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36186  # It is also a way to make sure we got the proper file name for the real test later on.
36187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36188  if test "x$test_shortpath" = x; then
36189    # Short path failed, file does not exist as specified.
36190    # Try adding .exe or .cmd
36191    if test -f "${new_path}.exe"; then
36192      input_to_shortpath="${new_path}.exe"
36193    elif test -f "${new_path}.cmd"; then
36194      input_to_shortpath="${new_path}.cmd"
36195    else
36196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36197$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36198      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36199$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36200      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36201    fi
36202  else
36203    input_to_shortpath="$new_path"
36204  fi
36205
36206  # Call helper function which possibly converts this using DOS-style short mode.
36207  # If so, the updated path is stored in $new_path.
36208  new_path="$input_to_shortpath"
36209
36210  input_path="$input_to_shortpath"
36211  # Check if we need to convert this using DOS-style short mode. If the path
36212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36213  # take no chances and rewrite it.
36214  # Note: m4 eats our [], so we need to use [ and ] instead.
36215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36216  if test "x$has_forbidden_chars" != x; then
36217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36221      # Going to short mode and back again did indeed matter. Since short mode is
36222      # case insensitive, let's make it lowercase to improve readability.
36223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36224      # Now convert it back to Unix-style (cygpath)
36225      input_path=`$CYGPATH -u "$shortmode_path"`
36226      new_path="$input_path"
36227    fi
36228  fi
36229
36230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36231  if test "x$test_cygdrive_prefix" = x; then
36232    # As a simple fix, exclude /usr/bin since it's not a real path.
36233    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36235      # a path prefixed by /cygdrive for fixpath to work.
36236      new_path="$CYGWIN_ROOT_PATH$input_path"
36237    fi
36238  fi
36239
36240  # remove trailing .exe if any
36241  new_path="${new_path/%.exe/}"
36242
36243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36244
36245  # First separate the path from the arguments. This will split at the first
36246  # space.
36247  complete="$AR"
36248  path="${complete%% *}"
36249  tmp="$complete EOL"
36250  arguments="${tmp#* }"
36251
36252  # Input might be given as Windows format, start by converting to
36253  # unix format.
36254  new_path="$path"
36255
36256  windows_path="$new_path"
36257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36258    unix_path=`$CYGPATH -u "$windows_path"`
36259    new_path="$unix_path"
36260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36262    new_path="$unix_path"
36263  fi
36264
36265
36266  # Now try to locate executable using which
36267  new_path=`$WHICH "$new_path" 2> /dev/null`
36268
36269  if test "x$new_path" = x; then
36270    # Oops. Which didn't find the executable.
36271    # The splitting of arguments from the executable at a space might have been incorrect,
36272    # since paths with space are more likely in Windows. Give it another try with the whole
36273    # argument.
36274    path="$complete"
36275    arguments="EOL"
36276    new_path="$path"
36277
36278  windows_path="$new_path"
36279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36280    unix_path=`$CYGPATH -u "$windows_path"`
36281    new_path="$unix_path"
36282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36284    new_path="$unix_path"
36285  fi
36286
36287
36288    new_path=`$WHICH "$new_path" 2> /dev/null`
36289    # bat and cmd files are not always considered executable in MSYS causing which
36290    # to not find them
36291    if test "x$new_path" = x \
36292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36294      new_path="$path"
36295
36296  windows_path="$new_path"
36297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36298    unix_path=`$CYGPATH -u "$windows_path"`
36299    new_path="$unix_path"
36300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36302    new_path="$unix_path"
36303  fi
36304
36305    fi
36306
36307    if test "x$new_path" = x; then
36308      # It's still not found. Now this is an unrecoverable error.
36309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36310$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36311      has_space=`$ECHO "$complete" | $GREP " "`
36312      if test "x$has_space" != x; then
36313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36315      fi
36316      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36317    fi
36318  fi
36319
36320  # Now new_path has a complete unix path to the binary
36321  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36322    # Keep paths in /bin as-is, but remove trailing .exe if any
36323    new_path="${new_path/%.exe/}"
36324    # Do not save /bin paths to all_fixpath_prefixes!
36325  else
36326    # Not in mixed or Windows style, start by that.
36327    new_path=`cmd //c echo $new_path`
36328
36329  input_path="$new_path"
36330  # Check if we need to convert this using DOS-style short mode. If the path
36331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36332  # take no chances and rewrite it.
36333  # Note: m4 eats our [], so we need to use [ and ] instead.
36334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36335  if test "x$has_forbidden_chars" != x; then
36336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36338  fi
36339
36340    # Output is in $new_path
36341
36342  windows_path="$new_path"
36343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36344    unix_path=`$CYGPATH -u "$windows_path"`
36345    new_path="$unix_path"
36346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36348    new_path="$unix_path"
36349  fi
36350
36351    # remove trailing .exe if any
36352    new_path="${new_path/%.exe/}"
36353
36354    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36355    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36356  fi
36357
36358    else
36359      # We're on a unix platform. Hooray! :)
36360      # First separate the path from the arguments. This will split at the first
36361      # space.
36362      complete="$AR"
36363      path="${complete%% *}"
36364      tmp="$complete EOL"
36365      arguments="${tmp#* }"
36366
36367      # Cannot rely on the command "which" here since it doesn't always work.
36368      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36369      if test -z "$is_absolute_path"; then
36370        # Path to executable is not absolute. Find it.
36371        IFS_save="$IFS"
36372        IFS=:
36373        for p in $PATH; do
36374          if test -f "$p/$path" && test -x "$p/$path"; then
36375            new_path="$p/$path"
36376            break
36377          fi
36378        done
36379        IFS="$IFS_save"
36380      else
36381        # This is an absolute path, we can use it without further modifications.
36382        new_path="$path"
36383      fi
36384
36385      if test "x$new_path" = x; then
36386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36387$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36388        has_space=`$ECHO "$complete" | $GREP " "`
36389        if test "x$has_space" != x; then
36390          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36391$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36392        fi
36393        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36394      fi
36395    fi
36396
36397    # Now join together the path and the arguments once again
36398    if test "x$arguments" != xEOL; then
36399      new_complete="$new_path ${arguments% *}"
36400    else
36401      new_complete="$new_path"
36402    fi
36403
36404    if test "x$complete" != "x$new_complete"; then
36405      AR="$new_complete"
36406      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36407$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36408    fi
36409  fi
36410
36411
36412
36413  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36414
36415
36416  # Publish this variable in the help.
36417
36418
36419  if [ -z "${LIPO+x}" ]; then
36420    # The variable is not set by user, try to locate tool using the code snippet
36421    for ac_prog in lipo
36422do
36423  # Extract the first word of "$ac_prog", so it can be a program name with args.
36424set dummy $ac_prog; ac_word=$2
36425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36426$as_echo_n "checking for $ac_word... " >&6; }
36427if ${ac_cv_path_LIPO+:} false; then :
36428  $as_echo_n "(cached) " >&6
36429else
36430  case $LIPO in
36431  [\\/]* | ?:[\\/]*)
36432  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36433  ;;
36434  *)
36435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36436for as_dir in $PATH
36437do
36438  IFS=$as_save_IFS
36439  test -z "$as_dir" && as_dir=.
36440    for ac_exec_ext in '' $ac_executable_extensions; do
36441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36442    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36444    break 2
36445  fi
36446done
36447  done
36448IFS=$as_save_IFS
36449
36450  ;;
36451esac
36452fi
36453LIPO=$ac_cv_path_LIPO
36454if test -n "$LIPO"; then
36455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36456$as_echo "$LIPO" >&6; }
36457else
36458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36459$as_echo "no" >&6; }
36460fi
36461
36462
36463  test -n "$LIPO" && break
36464done
36465
36466  else
36467    # The variable is set, but is it from the command line or the environment?
36468
36469    # Try to remove the string !LIPO! from our list.
36470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36472      # If it failed, the variable was not from the command line. Ignore it,
36473      # but warn the user (except for BASH, which is always set by the calling BASH).
36474      if test "xLIPO" != xBASH; then
36475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36476$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36477      fi
36478      # Try to locate tool using the code snippet
36479      for ac_prog in lipo
36480do
36481  # Extract the first word of "$ac_prog", so it can be a program name with args.
36482set dummy $ac_prog; ac_word=$2
36483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36484$as_echo_n "checking for $ac_word... " >&6; }
36485if ${ac_cv_path_LIPO+:} false; then :
36486  $as_echo_n "(cached) " >&6
36487else
36488  case $LIPO in
36489  [\\/]* | ?:[\\/]*)
36490  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36491  ;;
36492  *)
36493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36494for as_dir in $PATH
36495do
36496  IFS=$as_save_IFS
36497  test -z "$as_dir" && as_dir=.
36498    for ac_exec_ext in '' $ac_executable_extensions; do
36499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36500    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36502    break 2
36503  fi
36504done
36505  done
36506IFS=$as_save_IFS
36507
36508  ;;
36509esac
36510fi
36511LIPO=$ac_cv_path_LIPO
36512if test -n "$LIPO"; then
36513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36514$as_echo "$LIPO" >&6; }
36515else
36516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36517$as_echo "no" >&6; }
36518fi
36519
36520
36521  test -n "$LIPO" && break
36522done
36523
36524    else
36525      # If it succeeded, then it was overridden by the user. We will use it
36526      # for the tool.
36527
36528      # First remove it from the list of overridden variables, so we can test
36529      # for unknown variables in the end.
36530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36531
36532      # Check if we try to supply an empty value
36533      if test "x$LIPO" = x; then
36534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36535$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36537$as_echo_n "checking for LIPO... " >&6; }
36538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36539$as_echo "disabled" >&6; }
36540      else
36541        # Check if the provided tool contains a complete path.
36542        tool_specified="$LIPO"
36543        tool_basename="${tool_specified##*/}"
36544        if test "x$tool_basename" = "x$tool_specified"; then
36545          # A command without a complete path is provided, search $PATH.
36546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36547$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36548          # Extract the first word of "$tool_basename", so it can be a program name with args.
36549set dummy $tool_basename; ac_word=$2
36550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36551$as_echo_n "checking for $ac_word... " >&6; }
36552if ${ac_cv_path_LIPO+:} false; then :
36553  $as_echo_n "(cached) " >&6
36554else
36555  case $LIPO in
36556  [\\/]* | ?:[\\/]*)
36557  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36558  ;;
36559  *)
36560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36561for as_dir in $PATH
36562do
36563  IFS=$as_save_IFS
36564  test -z "$as_dir" && as_dir=.
36565    for ac_exec_ext in '' $ac_executable_extensions; do
36566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36567    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36569    break 2
36570  fi
36571done
36572  done
36573IFS=$as_save_IFS
36574
36575  ;;
36576esac
36577fi
36578LIPO=$ac_cv_path_LIPO
36579if test -n "$LIPO"; then
36580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36581$as_echo "$LIPO" >&6; }
36582else
36583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36584$as_echo "no" >&6; }
36585fi
36586
36587
36588          if test "x$LIPO" = x; then
36589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36590          fi
36591        else
36592          # Otherwise we believe it is a complete path. Use it as it is.
36593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36594$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36596$as_echo_n "checking for LIPO... " >&6; }
36597          if test ! -x "$tool_specified"; then
36598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36599$as_echo "not found" >&6; }
36600            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36601          fi
36602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36603$as_echo "$tool_specified" >&6; }
36604        fi
36605      fi
36606    fi
36607
36608  fi
36609
36610
36611
36612  # Only process if variable expands to non-empty
36613
36614  if test "x$LIPO" != x; then
36615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36616
36617  # First separate the path from the arguments. This will split at the first
36618  # space.
36619  complete="$LIPO"
36620  path="${complete%% *}"
36621  tmp="$complete EOL"
36622  arguments="${tmp#* }"
36623
36624  # Input might be given as Windows format, start by converting to
36625  # unix format.
36626  new_path=`$CYGPATH -u "$path"`
36627
36628  # Now try to locate executable using which
36629  new_path=`$WHICH "$new_path" 2> /dev/null`
36630  # bat and cmd files are not always considered executable in cygwin causing which
36631  # to not find them
36632  if test "x$new_path" = x \
36633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36635    new_path=`$CYGPATH -u "$path"`
36636  fi
36637  if test "x$new_path" = x; then
36638    # Oops. Which didn't find the executable.
36639    # The splitting of arguments from the executable at a space might have been incorrect,
36640    # since paths with space are more likely in Windows. Give it another try with the whole
36641    # argument.
36642    path="$complete"
36643    arguments="EOL"
36644    new_path=`$CYGPATH -u "$path"`
36645    new_path=`$WHICH "$new_path" 2> /dev/null`
36646    # bat and cmd files are not always considered executable in cygwin causing which
36647    # to not find them
36648    if test "x$new_path" = x \
36649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36651      new_path=`$CYGPATH -u "$path"`
36652    fi
36653    if test "x$new_path" = x; then
36654      # It's still not found. Now this is an unrecoverable error.
36655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36656$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36657      has_space=`$ECHO "$complete" | $GREP " "`
36658      if test "x$has_space" != x; then
36659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36661      fi
36662      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36663    fi
36664  fi
36665
36666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36669  # "foo.exe" is OK but "foo" is an error.
36670  #
36671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36672  # It is also a way to make sure we got the proper file name for the real test later on.
36673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36674  if test "x$test_shortpath" = x; then
36675    # Short path failed, file does not exist as specified.
36676    # Try adding .exe or .cmd
36677    if test -f "${new_path}.exe"; then
36678      input_to_shortpath="${new_path}.exe"
36679    elif test -f "${new_path}.cmd"; then
36680      input_to_shortpath="${new_path}.cmd"
36681    else
36682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36683$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36686      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36687    fi
36688  else
36689    input_to_shortpath="$new_path"
36690  fi
36691
36692  # Call helper function which possibly converts this using DOS-style short mode.
36693  # If so, the updated path is stored in $new_path.
36694  new_path="$input_to_shortpath"
36695
36696  input_path="$input_to_shortpath"
36697  # Check if we need to convert this using DOS-style short mode. If the path
36698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36699  # take no chances and rewrite it.
36700  # Note: m4 eats our [], so we need to use [ and ] instead.
36701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36702  if test "x$has_forbidden_chars" != x; then
36703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36707      # Going to short mode and back again did indeed matter. Since short mode is
36708      # case insensitive, let's make it lowercase to improve readability.
36709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36710      # Now convert it back to Unix-style (cygpath)
36711      input_path=`$CYGPATH -u "$shortmode_path"`
36712      new_path="$input_path"
36713    fi
36714  fi
36715
36716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36717  if test "x$test_cygdrive_prefix" = x; then
36718    # As a simple fix, exclude /usr/bin since it's not a real path.
36719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36721      # a path prefixed by /cygdrive for fixpath to work.
36722      new_path="$CYGWIN_ROOT_PATH$input_path"
36723    fi
36724  fi
36725
36726  # remove trailing .exe if any
36727  new_path="${new_path/%.exe/}"
36728
36729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36730
36731  # First separate the path from the arguments. This will split at the first
36732  # space.
36733  complete="$LIPO"
36734  path="${complete%% *}"
36735  tmp="$complete EOL"
36736  arguments="${tmp#* }"
36737
36738  # Input might be given as Windows format, start by converting to
36739  # unix format.
36740  new_path="$path"
36741
36742  windows_path="$new_path"
36743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36744    unix_path=`$CYGPATH -u "$windows_path"`
36745    new_path="$unix_path"
36746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36748    new_path="$unix_path"
36749  fi
36750
36751
36752  # Now try to locate executable using which
36753  new_path=`$WHICH "$new_path" 2> /dev/null`
36754
36755  if test "x$new_path" = x; then
36756    # Oops. Which didn't find the executable.
36757    # The splitting of arguments from the executable at a space might have been incorrect,
36758    # since paths with space are more likely in Windows. Give it another try with the whole
36759    # argument.
36760    path="$complete"
36761    arguments="EOL"
36762    new_path="$path"
36763
36764  windows_path="$new_path"
36765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36766    unix_path=`$CYGPATH -u "$windows_path"`
36767    new_path="$unix_path"
36768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36770    new_path="$unix_path"
36771  fi
36772
36773
36774    new_path=`$WHICH "$new_path" 2> /dev/null`
36775    # bat and cmd files are not always considered executable in MSYS causing which
36776    # to not find them
36777    if test "x$new_path" = x \
36778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36780      new_path="$path"
36781
36782  windows_path="$new_path"
36783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36784    unix_path=`$CYGPATH -u "$windows_path"`
36785    new_path="$unix_path"
36786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36788    new_path="$unix_path"
36789  fi
36790
36791    fi
36792
36793    if test "x$new_path" = x; then
36794      # It's still not found. Now this is an unrecoverable error.
36795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36796$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36797      has_space=`$ECHO "$complete" | $GREP " "`
36798      if test "x$has_space" != x; then
36799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36801      fi
36802      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36803    fi
36804  fi
36805
36806  # Now new_path has a complete unix path to the binary
36807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36808    # Keep paths in /bin as-is, but remove trailing .exe if any
36809    new_path="${new_path/%.exe/}"
36810    # Do not save /bin paths to all_fixpath_prefixes!
36811  else
36812    # Not in mixed or Windows style, start by that.
36813    new_path=`cmd //c echo $new_path`
36814
36815  input_path="$new_path"
36816  # Check if we need to convert this using DOS-style short mode. If the path
36817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36818  # take no chances and rewrite it.
36819  # Note: m4 eats our [], so we need to use [ and ] instead.
36820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36821  if test "x$has_forbidden_chars" != x; then
36822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36824  fi
36825
36826    # Output is in $new_path
36827
36828  windows_path="$new_path"
36829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36830    unix_path=`$CYGPATH -u "$windows_path"`
36831    new_path="$unix_path"
36832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36834    new_path="$unix_path"
36835  fi
36836
36837    # remove trailing .exe if any
36838    new_path="${new_path/%.exe/}"
36839
36840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36842  fi
36843
36844    else
36845      # We're on a unix platform. Hooray! :)
36846      # First separate the path from the arguments. This will split at the first
36847      # space.
36848      complete="$LIPO"
36849      path="${complete%% *}"
36850      tmp="$complete EOL"
36851      arguments="${tmp#* }"
36852
36853      # Cannot rely on the command "which" here since it doesn't always work.
36854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36855      if test -z "$is_absolute_path"; then
36856        # Path to executable is not absolute. Find it.
36857        IFS_save="$IFS"
36858        IFS=:
36859        for p in $PATH; do
36860          if test -f "$p/$path" && test -x "$p/$path"; then
36861            new_path="$p/$path"
36862            break
36863          fi
36864        done
36865        IFS="$IFS_save"
36866      else
36867        # This is an absolute path, we can use it without further modifications.
36868        new_path="$path"
36869      fi
36870
36871      if test "x$new_path" = x; then
36872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36873$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36874        has_space=`$ECHO "$complete" | $GREP " "`
36875        if test "x$has_space" != x; then
36876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36878        fi
36879        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36880      fi
36881    fi
36882
36883    # Now join together the path and the arguments once again
36884    if test "x$arguments" != xEOL; then
36885      new_complete="$new_path ${arguments% *}"
36886    else
36887      new_complete="$new_path"
36888    fi
36889
36890    if test "x$complete" != "x$new_complete"; then
36891      LIPO="$new_complete"
36892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36893$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36894    fi
36895  fi
36896
36897  fi
36898
36899  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36900    # Extract the first word of "mt", so it can be a program name with args.
36901set dummy mt; ac_word=$2
36902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36903$as_echo_n "checking for $ac_word... " >&6; }
36904if ${ac_cv_prog_MT+:} false; then :
36905  $as_echo_n "(cached) " >&6
36906else
36907  if test -n "$MT"; then
36908  ac_cv_prog_MT="$MT" # Let the user override the test.
36909else
36910  ac_prog_rejected=no
36911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36912for as_dir in $PATH
36913do
36914  IFS=$as_save_IFS
36915  test -z "$as_dir" && as_dir=.
36916    for ac_exec_ext in '' $ac_executable_extensions; do
36917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36918    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36919       ac_prog_rejected=yes
36920       continue
36921     fi
36922    ac_cv_prog_MT="mt"
36923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36924    break 2
36925  fi
36926done
36927  done
36928IFS=$as_save_IFS
36929
36930if test $ac_prog_rejected = yes; then
36931  # We found a bogon in the path, so make sure we never use it.
36932  set dummy $ac_cv_prog_MT
36933  shift
36934  if test $# != 0; then
36935    # We chose a different compiler from the bogus one.
36936    # However, it has the same basename, so the bogon will be chosen
36937    # first if we set MT to just the basename; use the full file name.
36938    shift
36939    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36940  fi
36941fi
36942fi
36943fi
36944MT=$ac_cv_prog_MT
36945if test -n "$MT"; then
36946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36947$as_echo "$MT" >&6; }
36948else
36949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36950$as_echo "no" >&6; }
36951fi
36952
36953
36954
36955  # Only process if variable expands to non-empty
36956
36957  if test "x$MT" != x; then
36958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36959
36960  # First separate the path from the arguments. This will split at the first
36961  # space.
36962  complete="$MT"
36963  path="${complete%% *}"
36964  tmp="$complete EOL"
36965  arguments="${tmp#* }"
36966
36967  # Input might be given as Windows format, start by converting to
36968  # unix format.
36969  new_path=`$CYGPATH -u "$path"`
36970
36971  # Now try to locate executable using which
36972  new_path=`$WHICH "$new_path" 2> /dev/null`
36973  # bat and cmd files are not always considered executable in cygwin causing which
36974  # to not find them
36975  if test "x$new_path" = x \
36976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36978    new_path=`$CYGPATH -u "$path"`
36979  fi
36980  if test "x$new_path" = x; then
36981    # Oops. Which didn't find the executable.
36982    # The splitting of arguments from the executable at a space might have been incorrect,
36983    # since paths with space are more likely in Windows. Give it another try with the whole
36984    # argument.
36985    path="$complete"
36986    arguments="EOL"
36987    new_path=`$CYGPATH -u "$path"`
36988    new_path=`$WHICH "$new_path" 2> /dev/null`
36989    # bat and cmd files are not always considered executable in cygwin causing which
36990    # to not find them
36991    if test "x$new_path" = x \
36992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36994      new_path=`$CYGPATH -u "$path"`
36995    fi
36996    if test "x$new_path" = x; then
36997      # It's still not found. Now this is an unrecoverable error.
36998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
36999$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37000      has_space=`$ECHO "$complete" | $GREP " "`
37001      if test "x$has_space" != x; then
37002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37004      fi
37005      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37006    fi
37007  fi
37008
37009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37012  # "foo.exe" is OK but "foo" is an error.
37013  #
37014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37015  # It is also a way to make sure we got the proper file name for the real test later on.
37016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37017  if test "x$test_shortpath" = x; then
37018    # Short path failed, file does not exist as specified.
37019    # Try adding .exe or .cmd
37020    if test -f "${new_path}.exe"; then
37021      input_to_shortpath="${new_path}.exe"
37022    elif test -f "${new_path}.cmd"; then
37023      input_to_shortpath="${new_path}.cmd"
37024    else
37025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37026$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37029      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37030    fi
37031  else
37032    input_to_shortpath="$new_path"
37033  fi
37034
37035  # Call helper function which possibly converts this using DOS-style short mode.
37036  # If so, the updated path is stored in $new_path.
37037  new_path="$input_to_shortpath"
37038
37039  input_path="$input_to_shortpath"
37040  # Check if we need to convert this using DOS-style short mode. If the path
37041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37042  # take no chances and rewrite it.
37043  # Note: m4 eats our [], so we need to use [ and ] instead.
37044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37045  if test "x$has_forbidden_chars" != x; then
37046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37050      # Going to short mode and back again did indeed matter. Since short mode is
37051      # case insensitive, let's make it lowercase to improve readability.
37052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37053      # Now convert it back to Unix-style (cygpath)
37054      input_path=`$CYGPATH -u "$shortmode_path"`
37055      new_path="$input_path"
37056    fi
37057  fi
37058
37059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37060  if test "x$test_cygdrive_prefix" = x; then
37061    # As a simple fix, exclude /usr/bin since it's not a real path.
37062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37064      # a path prefixed by /cygdrive for fixpath to work.
37065      new_path="$CYGWIN_ROOT_PATH$input_path"
37066    fi
37067  fi
37068
37069  # remove trailing .exe if any
37070  new_path="${new_path/%.exe/}"
37071
37072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37073
37074  # First separate the path from the arguments. This will split at the first
37075  # space.
37076  complete="$MT"
37077  path="${complete%% *}"
37078  tmp="$complete EOL"
37079  arguments="${tmp#* }"
37080
37081  # Input might be given as Windows format, start by converting to
37082  # unix format.
37083  new_path="$path"
37084
37085  windows_path="$new_path"
37086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37087    unix_path=`$CYGPATH -u "$windows_path"`
37088    new_path="$unix_path"
37089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37091    new_path="$unix_path"
37092  fi
37093
37094
37095  # Now try to locate executable using which
37096  new_path=`$WHICH "$new_path" 2> /dev/null`
37097
37098  if test "x$new_path" = x; then
37099    # Oops. Which didn't find the executable.
37100    # The splitting of arguments from the executable at a space might have been incorrect,
37101    # since paths with space are more likely in Windows. Give it another try with the whole
37102    # argument.
37103    path="$complete"
37104    arguments="EOL"
37105    new_path="$path"
37106
37107  windows_path="$new_path"
37108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37109    unix_path=`$CYGPATH -u "$windows_path"`
37110    new_path="$unix_path"
37111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37113    new_path="$unix_path"
37114  fi
37115
37116
37117    new_path=`$WHICH "$new_path" 2> /dev/null`
37118    # bat and cmd files are not always considered executable in MSYS causing which
37119    # to not find them
37120    if test "x$new_path" = x \
37121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37123      new_path="$path"
37124
37125  windows_path="$new_path"
37126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37127    unix_path=`$CYGPATH -u "$windows_path"`
37128    new_path="$unix_path"
37129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37131    new_path="$unix_path"
37132  fi
37133
37134    fi
37135
37136    if test "x$new_path" = x; then
37137      # It's still not found. Now this is an unrecoverable error.
37138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37139$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37140      has_space=`$ECHO "$complete" | $GREP " "`
37141      if test "x$has_space" != x; then
37142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37144      fi
37145      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37146    fi
37147  fi
37148
37149  # Now new_path has a complete unix path to the binary
37150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37151    # Keep paths in /bin as-is, but remove trailing .exe if any
37152    new_path="${new_path/%.exe/}"
37153    # Do not save /bin paths to all_fixpath_prefixes!
37154  else
37155    # Not in mixed or Windows style, start by that.
37156    new_path=`cmd //c echo $new_path`
37157
37158  input_path="$new_path"
37159  # Check if we need to convert this using DOS-style short mode. If the path
37160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37161  # take no chances and rewrite it.
37162  # Note: m4 eats our [], so we need to use [ and ] instead.
37163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37164  if test "x$has_forbidden_chars" != x; then
37165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37167  fi
37168
37169    # Output is in $new_path
37170
37171  windows_path="$new_path"
37172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37173    unix_path=`$CYGPATH -u "$windows_path"`
37174    new_path="$unix_path"
37175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37177    new_path="$unix_path"
37178  fi
37179
37180    # remove trailing .exe if any
37181    new_path="${new_path/%.exe/}"
37182
37183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37185  fi
37186
37187    else
37188      # We're on a unix platform. Hooray! :)
37189      # First separate the path from the arguments. This will split at the first
37190      # space.
37191      complete="$MT"
37192      path="${complete%% *}"
37193      tmp="$complete EOL"
37194      arguments="${tmp#* }"
37195
37196      # Cannot rely on the command "which" here since it doesn't always work.
37197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37198      if test -z "$is_absolute_path"; then
37199        # Path to executable is not absolute. Find it.
37200        IFS_save="$IFS"
37201        IFS=:
37202        for p in $PATH; do
37203          if test -f "$p/$path" && test -x "$p/$path"; then
37204            new_path="$p/$path"
37205            break
37206          fi
37207        done
37208        IFS="$IFS_save"
37209      else
37210        # This is an absolute path, we can use it without further modifications.
37211        new_path="$path"
37212      fi
37213
37214      if test "x$new_path" = x; then
37215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37216$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37217        has_space=`$ECHO "$complete" | $GREP " "`
37218        if test "x$has_space" != x; then
37219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37221        fi
37222        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37223      fi
37224    fi
37225
37226    # Now join together the path and the arguments once again
37227    if test "x$arguments" != xEOL; then
37228      new_complete="$new_path ${arguments% *}"
37229    else
37230      new_complete="$new_path"
37231    fi
37232
37233    if test "x$complete" != "x$new_complete"; then
37234      MT="$new_complete"
37235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37236$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37237    fi
37238  fi
37239
37240    # Setup the resource compiler (RC)
37241    # Extract the first word of "rc", so it can be a program name with args.
37242set dummy rc; ac_word=$2
37243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37244$as_echo_n "checking for $ac_word... " >&6; }
37245if ${ac_cv_prog_RC+:} false; then :
37246  $as_echo_n "(cached) " >&6
37247else
37248  if test -n "$RC"; then
37249  ac_cv_prog_RC="$RC" # Let the user override the test.
37250else
37251  ac_prog_rejected=no
37252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37253for as_dir in $PATH
37254do
37255  IFS=$as_save_IFS
37256  test -z "$as_dir" && as_dir=.
37257    for ac_exec_ext in '' $ac_executable_extensions; do
37258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37259    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37260       ac_prog_rejected=yes
37261       continue
37262     fi
37263    ac_cv_prog_RC="rc"
37264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37265    break 2
37266  fi
37267done
37268  done
37269IFS=$as_save_IFS
37270
37271if test $ac_prog_rejected = yes; then
37272  # We found a bogon in the path, so make sure we never use it.
37273  set dummy $ac_cv_prog_RC
37274  shift
37275  if test $# != 0; then
37276    # We chose a different compiler from the bogus one.
37277    # However, it has the same basename, so the bogon will be chosen
37278    # first if we set RC to just the basename; use the full file name.
37279    shift
37280    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37281  fi
37282fi
37283fi
37284fi
37285RC=$ac_cv_prog_RC
37286if test -n "$RC"; then
37287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37288$as_echo "$RC" >&6; }
37289else
37290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37291$as_echo "no" >&6; }
37292fi
37293
37294
37295
37296  # Only process if variable expands to non-empty
37297
37298  if test "x$RC" != x; then
37299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37300
37301  # First separate the path from the arguments. This will split at the first
37302  # space.
37303  complete="$RC"
37304  path="${complete%% *}"
37305  tmp="$complete EOL"
37306  arguments="${tmp#* }"
37307
37308  # Input might be given as Windows format, start by converting to
37309  # unix format.
37310  new_path=`$CYGPATH -u "$path"`
37311
37312  # Now try to locate executable using which
37313  new_path=`$WHICH "$new_path" 2> /dev/null`
37314  # bat and cmd files are not always considered executable in cygwin causing which
37315  # to not find them
37316  if test "x$new_path" = x \
37317      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37318      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37319    new_path=`$CYGPATH -u "$path"`
37320  fi
37321  if test "x$new_path" = x; then
37322    # Oops. Which didn't find the executable.
37323    # The splitting of arguments from the executable at a space might have been incorrect,
37324    # since paths with space are more likely in Windows. Give it another try with the whole
37325    # argument.
37326    path="$complete"
37327    arguments="EOL"
37328    new_path=`$CYGPATH -u "$path"`
37329    new_path=`$WHICH "$new_path" 2> /dev/null`
37330    # bat and cmd files are not always considered executable in cygwin causing which
37331    # to not find them
37332    if test "x$new_path" = x \
37333        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37334        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37335      new_path=`$CYGPATH -u "$path"`
37336    fi
37337    if test "x$new_path" = x; then
37338      # It's still not found. Now this is an unrecoverable error.
37339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37340$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37341      has_space=`$ECHO "$complete" | $GREP " "`
37342      if test "x$has_space" != x; then
37343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37345      fi
37346      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37347    fi
37348  fi
37349
37350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37353  # "foo.exe" is OK but "foo" is an error.
37354  #
37355  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37356  # It is also a way to make sure we got the proper file name for the real test later on.
37357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37358  if test "x$test_shortpath" = x; then
37359    # Short path failed, file does not exist as specified.
37360    # Try adding .exe or .cmd
37361    if test -f "${new_path}.exe"; then
37362      input_to_shortpath="${new_path}.exe"
37363    elif test -f "${new_path}.cmd"; then
37364      input_to_shortpath="${new_path}.cmd"
37365    else
37366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37367$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37368      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37369$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37370      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37371    fi
37372  else
37373    input_to_shortpath="$new_path"
37374  fi
37375
37376  # Call helper function which possibly converts this using DOS-style short mode.
37377  # If so, the updated path is stored in $new_path.
37378  new_path="$input_to_shortpath"
37379
37380  input_path="$input_to_shortpath"
37381  # Check if we need to convert this using DOS-style short mode. If the path
37382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37383  # take no chances and rewrite it.
37384  # Note: m4 eats our [], so we need to use [ and ] instead.
37385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37386  if test "x$has_forbidden_chars" != x; then
37387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37391      # Going to short mode and back again did indeed matter. Since short mode is
37392      # case insensitive, let's make it lowercase to improve readability.
37393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37394      # Now convert it back to Unix-style (cygpath)
37395      input_path=`$CYGPATH -u "$shortmode_path"`
37396      new_path="$input_path"
37397    fi
37398  fi
37399
37400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37401  if test "x$test_cygdrive_prefix" = x; then
37402    # As a simple fix, exclude /usr/bin since it's not a real path.
37403    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37405      # a path prefixed by /cygdrive for fixpath to work.
37406      new_path="$CYGWIN_ROOT_PATH$input_path"
37407    fi
37408  fi
37409
37410  # remove trailing .exe if any
37411  new_path="${new_path/%.exe/}"
37412
37413    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37414
37415  # First separate the path from the arguments. This will split at the first
37416  # space.
37417  complete="$RC"
37418  path="${complete%% *}"
37419  tmp="$complete EOL"
37420  arguments="${tmp#* }"
37421
37422  # Input might be given as Windows format, start by converting to
37423  # unix format.
37424  new_path="$path"
37425
37426  windows_path="$new_path"
37427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37428    unix_path=`$CYGPATH -u "$windows_path"`
37429    new_path="$unix_path"
37430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37432    new_path="$unix_path"
37433  fi
37434
37435
37436  # Now try to locate executable using which
37437  new_path=`$WHICH "$new_path" 2> /dev/null`
37438
37439  if test "x$new_path" = x; then
37440    # Oops. Which didn't find the executable.
37441    # The splitting of arguments from the executable at a space might have been incorrect,
37442    # since paths with space are more likely in Windows. Give it another try with the whole
37443    # argument.
37444    path="$complete"
37445    arguments="EOL"
37446    new_path="$path"
37447
37448  windows_path="$new_path"
37449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37450    unix_path=`$CYGPATH -u "$windows_path"`
37451    new_path="$unix_path"
37452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37454    new_path="$unix_path"
37455  fi
37456
37457
37458    new_path=`$WHICH "$new_path" 2> /dev/null`
37459    # bat and cmd files are not always considered executable in MSYS causing which
37460    # to not find them
37461    if test "x$new_path" = x \
37462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37464      new_path="$path"
37465
37466  windows_path="$new_path"
37467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37468    unix_path=`$CYGPATH -u "$windows_path"`
37469    new_path="$unix_path"
37470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37472    new_path="$unix_path"
37473  fi
37474
37475    fi
37476
37477    if test "x$new_path" = x; then
37478      # It's still not found. Now this is an unrecoverable error.
37479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37480$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37481      has_space=`$ECHO "$complete" | $GREP " "`
37482      if test "x$has_space" != x; then
37483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37485      fi
37486      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37487    fi
37488  fi
37489
37490  # Now new_path has a complete unix path to the binary
37491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37492    # Keep paths in /bin as-is, but remove trailing .exe if any
37493    new_path="${new_path/%.exe/}"
37494    # Do not save /bin paths to all_fixpath_prefixes!
37495  else
37496    # Not in mixed or Windows style, start by that.
37497    new_path=`cmd //c echo $new_path`
37498
37499  input_path="$new_path"
37500  # Check if we need to convert this using DOS-style short mode. If the path
37501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37502  # take no chances and rewrite it.
37503  # Note: m4 eats our [], so we need to use [ and ] instead.
37504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37505  if test "x$has_forbidden_chars" != x; then
37506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37508  fi
37509
37510    # Output is in $new_path
37511
37512  windows_path="$new_path"
37513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37514    unix_path=`$CYGPATH -u "$windows_path"`
37515    new_path="$unix_path"
37516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37518    new_path="$unix_path"
37519  fi
37520
37521    # remove trailing .exe if any
37522    new_path="${new_path/%.exe/}"
37523
37524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37526  fi
37527
37528    else
37529      # We're on a unix platform. Hooray! :)
37530      # First separate the path from the arguments. This will split at the first
37531      # space.
37532      complete="$RC"
37533      path="${complete%% *}"
37534      tmp="$complete EOL"
37535      arguments="${tmp#* }"
37536
37537      # Cannot rely on the command "which" here since it doesn't always work.
37538      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37539      if test -z "$is_absolute_path"; then
37540        # Path to executable is not absolute. Find it.
37541        IFS_save="$IFS"
37542        IFS=:
37543        for p in $PATH; do
37544          if test -f "$p/$path" && test -x "$p/$path"; then
37545            new_path="$p/$path"
37546            break
37547          fi
37548        done
37549        IFS="$IFS_save"
37550      else
37551        # This is an absolute path, we can use it without further modifications.
37552        new_path="$path"
37553      fi
37554
37555      if test "x$new_path" = x; then
37556        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37557$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37558        has_space=`$ECHO "$complete" | $GREP " "`
37559        if test "x$has_space" != x; then
37560          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37561$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37562        fi
37563        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37564      fi
37565    fi
37566
37567    # Now join together the path and the arguments once again
37568    if test "x$arguments" != xEOL; then
37569      new_complete="$new_path ${arguments% *}"
37570    else
37571      new_complete="$new_path"
37572    fi
37573
37574    if test "x$complete" != "x$new_complete"; then
37575      RC="$new_complete"
37576      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37577$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37578    fi
37579  fi
37580
37581    # Extract the first word of "dumpbin", so it can be a program name with args.
37582set dummy dumpbin; ac_word=$2
37583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37584$as_echo_n "checking for $ac_word... " >&6; }
37585if ${ac_cv_prog_DUMPBIN+:} false; then :
37586  $as_echo_n "(cached) " >&6
37587else
37588  if test -n "$DUMPBIN"; then
37589  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37590else
37591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37592for as_dir in $PATH
37593do
37594  IFS=$as_save_IFS
37595  test -z "$as_dir" && as_dir=.
37596    for ac_exec_ext in '' $ac_executable_extensions; do
37597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37598    ac_cv_prog_DUMPBIN="dumpbin"
37599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37600    break 2
37601  fi
37602done
37603  done
37604IFS=$as_save_IFS
37605
37606fi
37607fi
37608DUMPBIN=$ac_cv_prog_DUMPBIN
37609if test -n "$DUMPBIN"; then
37610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37611$as_echo "$DUMPBIN" >&6; }
37612else
37613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37614$as_echo "no" >&6; }
37615fi
37616
37617
37618
37619  # Only process if variable expands to non-empty
37620
37621  if test "x$DUMPBIN" != x; then
37622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37623
37624  # First separate the path from the arguments. This will split at the first
37625  # space.
37626  complete="$DUMPBIN"
37627  path="${complete%% *}"
37628  tmp="$complete EOL"
37629  arguments="${tmp#* }"
37630
37631  # Input might be given as Windows format, start by converting to
37632  # unix format.
37633  new_path=`$CYGPATH -u "$path"`
37634
37635  # Now try to locate executable using which
37636  new_path=`$WHICH "$new_path" 2> /dev/null`
37637  # bat and cmd files are not always considered executable in cygwin causing which
37638  # to not find them
37639  if test "x$new_path" = x \
37640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37642    new_path=`$CYGPATH -u "$path"`
37643  fi
37644  if test "x$new_path" = x; then
37645    # Oops. Which didn't find the executable.
37646    # The splitting of arguments from the executable at a space might have been incorrect,
37647    # since paths with space are more likely in Windows. Give it another try with the whole
37648    # argument.
37649    path="$complete"
37650    arguments="EOL"
37651    new_path=`$CYGPATH -u "$path"`
37652    new_path=`$WHICH "$new_path" 2> /dev/null`
37653    # bat and cmd files are not always considered executable in cygwin causing which
37654    # to not find them
37655    if test "x$new_path" = x \
37656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37658      new_path=`$CYGPATH -u "$path"`
37659    fi
37660    if test "x$new_path" = x; then
37661      # It's still not found. Now this is an unrecoverable error.
37662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37663$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37664      has_space=`$ECHO "$complete" | $GREP " "`
37665      if test "x$has_space" != x; then
37666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37668      fi
37669      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37670    fi
37671  fi
37672
37673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37676  # "foo.exe" is OK but "foo" is an error.
37677  #
37678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37679  # It is also a way to make sure we got the proper file name for the real test later on.
37680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37681  if test "x$test_shortpath" = x; then
37682    # Short path failed, file does not exist as specified.
37683    # Try adding .exe or .cmd
37684    if test -f "${new_path}.exe"; then
37685      input_to_shortpath="${new_path}.exe"
37686    elif test -f "${new_path}.cmd"; then
37687      input_to_shortpath="${new_path}.cmd"
37688    else
37689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37690$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37693      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37694    fi
37695  else
37696    input_to_shortpath="$new_path"
37697  fi
37698
37699  # Call helper function which possibly converts this using DOS-style short mode.
37700  # If so, the updated path is stored in $new_path.
37701  new_path="$input_to_shortpath"
37702
37703  input_path="$input_to_shortpath"
37704  # Check if we need to convert this using DOS-style short mode. If the path
37705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37706  # take no chances and rewrite it.
37707  # Note: m4 eats our [], so we need to use [ and ] instead.
37708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37709  if test "x$has_forbidden_chars" != x; then
37710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37714      # Going to short mode and back again did indeed matter. Since short mode is
37715      # case insensitive, let's make it lowercase to improve readability.
37716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37717      # Now convert it back to Unix-style (cygpath)
37718      input_path=`$CYGPATH -u "$shortmode_path"`
37719      new_path="$input_path"
37720    fi
37721  fi
37722
37723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37724  if test "x$test_cygdrive_prefix" = x; then
37725    # As a simple fix, exclude /usr/bin since it's not a real path.
37726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37728      # a path prefixed by /cygdrive for fixpath to work.
37729      new_path="$CYGWIN_ROOT_PATH$input_path"
37730    fi
37731  fi
37732
37733  # remove trailing .exe if any
37734  new_path="${new_path/%.exe/}"
37735
37736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37737
37738  # First separate the path from the arguments. This will split at the first
37739  # space.
37740  complete="$DUMPBIN"
37741  path="${complete%% *}"
37742  tmp="$complete EOL"
37743  arguments="${tmp#* }"
37744
37745  # Input might be given as Windows format, start by converting to
37746  # unix format.
37747  new_path="$path"
37748
37749  windows_path="$new_path"
37750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37751    unix_path=`$CYGPATH -u "$windows_path"`
37752    new_path="$unix_path"
37753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37755    new_path="$unix_path"
37756  fi
37757
37758
37759  # Now try to locate executable using which
37760  new_path=`$WHICH "$new_path" 2> /dev/null`
37761
37762  if test "x$new_path" = x; then
37763    # Oops. Which didn't find the executable.
37764    # The splitting of arguments from the executable at a space might have been incorrect,
37765    # since paths with space are more likely in Windows. Give it another try with the whole
37766    # argument.
37767    path="$complete"
37768    arguments="EOL"
37769    new_path="$path"
37770
37771  windows_path="$new_path"
37772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37773    unix_path=`$CYGPATH -u "$windows_path"`
37774    new_path="$unix_path"
37775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37777    new_path="$unix_path"
37778  fi
37779
37780
37781    new_path=`$WHICH "$new_path" 2> /dev/null`
37782    # bat and cmd files are not always considered executable in MSYS causing which
37783    # to not find them
37784    if test "x$new_path" = x \
37785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37787      new_path="$path"
37788
37789  windows_path="$new_path"
37790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37791    unix_path=`$CYGPATH -u "$windows_path"`
37792    new_path="$unix_path"
37793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37795    new_path="$unix_path"
37796  fi
37797
37798    fi
37799
37800    if test "x$new_path" = x; then
37801      # It's still not found. Now this is an unrecoverable error.
37802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37803$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37804      has_space=`$ECHO "$complete" | $GREP " "`
37805      if test "x$has_space" != x; then
37806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37808      fi
37809      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37810    fi
37811  fi
37812
37813  # Now new_path has a complete unix path to the binary
37814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37815    # Keep paths in /bin as-is, but remove trailing .exe if any
37816    new_path="${new_path/%.exe/}"
37817    # Do not save /bin paths to all_fixpath_prefixes!
37818  else
37819    # Not in mixed or Windows style, start by that.
37820    new_path=`cmd //c echo $new_path`
37821
37822  input_path="$new_path"
37823  # Check if we need to convert this using DOS-style short mode. If the path
37824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37825  # take no chances and rewrite it.
37826  # Note: m4 eats our [], so we need to use [ and ] instead.
37827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37828  if test "x$has_forbidden_chars" != x; then
37829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37831  fi
37832
37833    # Output is in $new_path
37834
37835  windows_path="$new_path"
37836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37837    unix_path=`$CYGPATH -u "$windows_path"`
37838    new_path="$unix_path"
37839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37841    new_path="$unix_path"
37842  fi
37843
37844    # remove trailing .exe if any
37845    new_path="${new_path/%.exe/}"
37846
37847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37849  fi
37850
37851    else
37852      # We're on a unix platform. Hooray! :)
37853      # First separate the path from the arguments. This will split at the first
37854      # space.
37855      complete="$DUMPBIN"
37856      path="${complete%% *}"
37857      tmp="$complete EOL"
37858      arguments="${tmp#* }"
37859
37860      # Cannot rely on the command "which" here since it doesn't always work.
37861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37862      if test -z "$is_absolute_path"; then
37863        # Path to executable is not absolute. Find it.
37864        IFS_save="$IFS"
37865        IFS=:
37866        for p in $PATH; do
37867          if test -f "$p/$path" && test -x "$p/$path"; then
37868            new_path="$p/$path"
37869            break
37870          fi
37871        done
37872        IFS="$IFS_save"
37873      else
37874        # This is an absolute path, we can use it without further modifications.
37875        new_path="$path"
37876      fi
37877
37878      if test "x$new_path" = x; then
37879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37880$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37881        has_space=`$ECHO "$complete" | $GREP " "`
37882        if test "x$has_space" != x; then
37883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37885        fi
37886        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37887      fi
37888    fi
37889
37890    # Now join together the path and the arguments once again
37891    if test "x$arguments" != xEOL; then
37892      new_complete="$new_path ${arguments% *}"
37893    else
37894      new_complete="$new_path"
37895    fi
37896
37897    if test "x$complete" != "x$new_complete"; then
37898      DUMPBIN="$new_complete"
37899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37900$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37901    fi
37902  fi
37903
37904    # We need to check for 'msbuild.exe' because at the place where we expect to
37905    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37906    # won't find the 'msbuild.exe' executable in that case (and the
37907    # 'ac_executable_extensions' is unusable due to performance reasons).
37908    # Notice that we intentionally don't fix up the path to MSBUILD because we
37909    # will call it in a DOS shell during freetype detection on Windows (see
37910    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37911    # Extract the first word of "msbuild.exe", so it can be a program name with args.
37912set dummy msbuild.exe; ac_word=$2
37913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37914$as_echo_n "checking for $ac_word... " >&6; }
37915if ${ac_cv_prog_MSBUILD+:} false; then :
37916  $as_echo_n "(cached) " >&6
37917else
37918  if test -n "$MSBUILD"; then
37919  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37920else
37921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37922for as_dir in $PATH
37923do
37924  IFS=$as_save_IFS
37925  test -z "$as_dir" && as_dir=.
37926    for ac_exec_ext in '' $ac_executable_extensions; do
37927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37928    ac_cv_prog_MSBUILD="msbuild.exe"
37929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37930    break 2
37931  fi
37932done
37933  done
37934IFS=$as_save_IFS
37935
37936fi
37937fi
37938MSBUILD=$ac_cv_prog_MSBUILD
37939if test -n "$MSBUILD"; then
37940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37941$as_echo "$MSBUILD" >&6; }
37942else
37943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37944$as_echo "no" >&6; }
37945fi
37946
37947
37948  fi
37949
37950  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37951
37952
37953  # Publish this variable in the help.
37954
37955
37956  if [ -z "${STRIP+x}" ]; then
37957    # The variable is not set by user, try to locate tool using the code snippet
37958    for ac_prog in strip
37959do
37960  # Extract the first word of "$ac_prog", so it can be a program name with args.
37961set dummy $ac_prog; ac_word=$2
37962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37963$as_echo_n "checking for $ac_word... " >&6; }
37964if ${ac_cv_path_STRIP+:} false; then :
37965  $as_echo_n "(cached) " >&6
37966else
37967  case $STRIP in
37968  [\\/]* | ?:[\\/]*)
37969  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37970  ;;
37971  *)
37972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37973for as_dir in $PATH
37974do
37975  IFS=$as_save_IFS
37976  test -z "$as_dir" && as_dir=.
37977    for ac_exec_ext in '' $ac_executable_extensions; do
37978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37979    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37981    break 2
37982  fi
37983done
37984  done
37985IFS=$as_save_IFS
37986
37987  ;;
37988esac
37989fi
37990STRIP=$ac_cv_path_STRIP
37991if test -n "$STRIP"; then
37992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37993$as_echo "$STRIP" >&6; }
37994else
37995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37996$as_echo "no" >&6; }
37997fi
37998
37999
38000  test -n "$STRIP" && break
38001done
38002
38003  else
38004    # The variable is set, but is it from the command line or the environment?
38005
38006    # Try to remove the string !STRIP! from our list.
38007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38009      # If it failed, the variable was not from the command line. Ignore it,
38010      # but warn the user (except for BASH, which is always set by the calling BASH).
38011      if test "xSTRIP" != xBASH; then
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38013$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38014      fi
38015      # Try to locate tool using the code snippet
38016      for ac_prog in strip
38017do
38018  # Extract the first word of "$ac_prog", so it can be a program name with args.
38019set dummy $ac_prog; ac_word=$2
38020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38021$as_echo_n "checking for $ac_word... " >&6; }
38022if ${ac_cv_path_STRIP+:} false; then :
38023  $as_echo_n "(cached) " >&6
38024else
38025  case $STRIP in
38026  [\\/]* | ?:[\\/]*)
38027  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38028  ;;
38029  *)
38030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38031for as_dir in $PATH
38032do
38033  IFS=$as_save_IFS
38034  test -z "$as_dir" && as_dir=.
38035    for ac_exec_ext in '' $ac_executable_extensions; do
38036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38037    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38039    break 2
38040  fi
38041done
38042  done
38043IFS=$as_save_IFS
38044
38045  ;;
38046esac
38047fi
38048STRIP=$ac_cv_path_STRIP
38049if test -n "$STRIP"; then
38050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38051$as_echo "$STRIP" >&6; }
38052else
38053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38054$as_echo "no" >&6; }
38055fi
38056
38057
38058  test -n "$STRIP" && break
38059done
38060
38061    else
38062      # If it succeeded, then it was overridden by the user. We will use it
38063      # for the tool.
38064
38065      # First remove it from the list of overridden variables, so we can test
38066      # for unknown variables in the end.
38067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38068
38069      # Check if we try to supply an empty value
38070      if test "x$STRIP" = x; then
38071        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38072$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38073        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38074$as_echo_n "checking for STRIP... " >&6; }
38075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38076$as_echo "disabled" >&6; }
38077      else
38078        # Check if the provided tool contains a complete path.
38079        tool_specified="$STRIP"
38080        tool_basename="${tool_specified##*/}"
38081        if test "x$tool_basename" = "x$tool_specified"; then
38082          # A command without a complete path is provided, search $PATH.
38083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38084$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38085          # Extract the first word of "$tool_basename", so it can be a program name with args.
38086set dummy $tool_basename; ac_word=$2
38087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38088$as_echo_n "checking for $ac_word... " >&6; }
38089if ${ac_cv_path_STRIP+:} false; then :
38090  $as_echo_n "(cached) " >&6
38091else
38092  case $STRIP in
38093  [\\/]* | ?:[\\/]*)
38094  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38095  ;;
38096  *)
38097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38098for as_dir in $PATH
38099do
38100  IFS=$as_save_IFS
38101  test -z "$as_dir" && as_dir=.
38102    for ac_exec_ext in '' $ac_executable_extensions; do
38103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38104    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38106    break 2
38107  fi
38108done
38109  done
38110IFS=$as_save_IFS
38111
38112  ;;
38113esac
38114fi
38115STRIP=$ac_cv_path_STRIP
38116if test -n "$STRIP"; then
38117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38118$as_echo "$STRIP" >&6; }
38119else
38120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38121$as_echo "no" >&6; }
38122fi
38123
38124
38125          if test "x$STRIP" = x; then
38126            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38127          fi
38128        else
38129          # Otherwise we believe it is a complete path. Use it as it is.
38130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38131$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38132          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38133$as_echo_n "checking for STRIP... " >&6; }
38134          if test ! -x "$tool_specified"; then
38135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38136$as_echo "not found" >&6; }
38137            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38138          fi
38139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38140$as_echo "$tool_specified" >&6; }
38141        fi
38142      fi
38143    fi
38144
38145  fi
38146
38147
38148
38149  # Only process if variable expands to non-empty
38150
38151  if test "x$STRIP" != x; then
38152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38153
38154  # First separate the path from the arguments. This will split at the first
38155  # space.
38156  complete="$STRIP"
38157  path="${complete%% *}"
38158  tmp="$complete EOL"
38159  arguments="${tmp#* }"
38160
38161  # Input might be given as Windows format, start by converting to
38162  # unix format.
38163  new_path=`$CYGPATH -u "$path"`
38164
38165  # Now try to locate executable using which
38166  new_path=`$WHICH "$new_path" 2> /dev/null`
38167  # bat and cmd files are not always considered executable in cygwin causing which
38168  # to not find them
38169  if test "x$new_path" = x \
38170      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38171      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38172    new_path=`$CYGPATH -u "$path"`
38173  fi
38174  if test "x$new_path" = x; then
38175    # Oops. Which didn't find the executable.
38176    # The splitting of arguments from the executable at a space might have been incorrect,
38177    # since paths with space are more likely in Windows. Give it another try with the whole
38178    # argument.
38179    path="$complete"
38180    arguments="EOL"
38181    new_path=`$CYGPATH -u "$path"`
38182    new_path=`$WHICH "$new_path" 2> /dev/null`
38183    # bat and cmd files are not always considered executable in cygwin causing which
38184    # to not find them
38185    if test "x$new_path" = x \
38186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38188      new_path=`$CYGPATH -u "$path"`
38189    fi
38190    if test "x$new_path" = x; then
38191      # It's still not found. Now this is an unrecoverable error.
38192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38193$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38194      has_space=`$ECHO "$complete" | $GREP " "`
38195      if test "x$has_space" != x; then
38196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38198      fi
38199      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38200    fi
38201  fi
38202
38203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38206  # "foo.exe" is OK but "foo" is an error.
38207  #
38208  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38209  # It is also a way to make sure we got the proper file name for the real test later on.
38210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38211  if test "x$test_shortpath" = x; then
38212    # Short path failed, file does not exist as specified.
38213    # Try adding .exe or .cmd
38214    if test -f "${new_path}.exe"; then
38215      input_to_shortpath="${new_path}.exe"
38216    elif test -f "${new_path}.cmd"; then
38217      input_to_shortpath="${new_path}.cmd"
38218    else
38219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38220$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38223      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38224    fi
38225  else
38226    input_to_shortpath="$new_path"
38227  fi
38228
38229  # Call helper function which possibly converts this using DOS-style short mode.
38230  # If so, the updated path is stored in $new_path.
38231  new_path="$input_to_shortpath"
38232
38233  input_path="$input_to_shortpath"
38234  # Check if we need to convert this using DOS-style short mode. If the path
38235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38236  # take no chances and rewrite it.
38237  # Note: m4 eats our [], so we need to use [ and ] instead.
38238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38239  if test "x$has_forbidden_chars" != x; then
38240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38244      # Going to short mode and back again did indeed matter. Since short mode is
38245      # case insensitive, let's make it lowercase to improve readability.
38246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38247      # Now convert it back to Unix-style (cygpath)
38248      input_path=`$CYGPATH -u "$shortmode_path"`
38249      new_path="$input_path"
38250    fi
38251  fi
38252
38253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38254  if test "x$test_cygdrive_prefix" = x; then
38255    # As a simple fix, exclude /usr/bin since it's not a real path.
38256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38258      # a path prefixed by /cygdrive for fixpath to work.
38259      new_path="$CYGWIN_ROOT_PATH$input_path"
38260    fi
38261  fi
38262
38263  # remove trailing .exe if any
38264  new_path="${new_path/%.exe/}"
38265
38266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38267
38268  # First separate the path from the arguments. This will split at the first
38269  # space.
38270  complete="$STRIP"
38271  path="${complete%% *}"
38272  tmp="$complete EOL"
38273  arguments="${tmp#* }"
38274
38275  # Input might be given as Windows format, start by converting to
38276  # unix format.
38277  new_path="$path"
38278
38279  windows_path="$new_path"
38280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38281    unix_path=`$CYGPATH -u "$windows_path"`
38282    new_path="$unix_path"
38283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38285    new_path="$unix_path"
38286  fi
38287
38288
38289  # Now try to locate executable using which
38290  new_path=`$WHICH "$new_path" 2> /dev/null`
38291
38292  if test "x$new_path" = x; then
38293    # Oops. Which didn't find the executable.
38294    # The splitting of arguments from the executable at a space might have been incorrect,
38295    # since paths with space are more likely in Windows. Give it another try with the whole
38296    # argument.
38297    path="$complete"
38298    arguments="EOL"
38299    new_path="$path"
38300
38301  windows_path="$new_path"
38302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38303    unix_path=`$CYGPATH -u "$windows_path"`
38304    new_path="$unix_path"
38305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38307    new_path="$unix_path"
38308  fi
38309
38310
38311    new_path=`$WHICH "$new_path" 2> /dev/null`
38312    # bat and cmd files are not always considered executable in MSYS causing which
38313    # to not find them
38314    if test "x$new_path" = x \
38315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38317      new_path="$path"
38318
38319  windows_path="$new_path"
38320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38321    unix_path=`$CYGPATH -u "$windows_path"`
38322    new_path="$unix_path"
38323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38325    new_path="$unix_path"
38326  fi
38327
38328    fi
38329
38330    if test "x$new_path" = x; then
38331      # It's still not found. Now this is an unrecoverable error.
38332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38333$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38334      has_space=`$ECHO "$complete" | $GREP " "`
38335      if test "x$has_space" != x; then
38336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38338      fi
38339      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38340    fi
38341  fi
38342
38343  # Now new_path has a complete unix path to the binary
38344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38345    # Keep paths in /bin as-is, but remove trailing .exe if any
38346    new_path="${new_path/%.exe/}"
38347    # Do not save /bin paths to all_fixpath_prefixes!
38348  else
38349    # Not in mixed or Windows style, start by that.
38350    new_path=`cmd //c echo $new_path`
38351
38352  input_path="$new_path"
38353  # Check if we need to convert this using DOS-style short mode. If the path
38354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38355  # take no chances and rewrite it.
38356  # Note: m4 eats our [], so we need to use [ and ] instead.
38357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38358  if test "x$has_forbidden_chars" != x; then
38359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38361  fi
38362
38363    # Output is in $new_path
38364
38365  windows_path="$new_path"
38366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38367    unix_path=`$CYGPATH -u "$windows_path"`
38368    new_path="$unix_path"
38369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38371    new_path="$unix_path"
38372  fi
38373
38374    # remove trailing .exe if any
38375    new_path="${new_path/%.exe/}"
38376
38377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38379  fi
38380
38381    else
38382      # We're on a unix platform. Hooray! :)
38383      # First separate the path from the arguments. This will split at the first
38384      # space.
38385      complete="$STRIP"
38386      path="${complete%% *}"
38387      tmp="$complete EOL"
38388      arguments="${tmp#* }"
38389
38390      # Cannot rely on the command "which" here since it doesn't always work.
38391      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38392      if test -z "$is_absolute_path"; then
38393        # Path to executable is not absolute. Find it.
38394        IFS_save="$IFS"
38395        IFS=:
38396        for p in $PATH; do
38397          if test -f "$p/$path" && test -x "$p/$path"; then
38398            new_path="$p/$path"
38399            break
38400          fi
38401        done
38402        IFS="$IFS_save"
38403      else
38404        # This is an absolute path, we can use it without further modifications.
38405        new_path="$path"
38406      fi
38407
38408      if test "x$new_path" = x; then
38409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38410$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38411        has_space=`$ECHO "$complete" | $GREP " "`
38412        if test "x$has_space" != x; then
38413          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38415        fi
38416        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38417      fi
38418    fi
38419
38420    # Now join together the path and the arguments once again
38421    if test "x$arguments" != xEOL; then
38422      new_complete="$new_path ${arguments% *}"
38423    else
38424      new_complete="$new_path"
38425    fi
38426
38427    if test "x$complete" != "x$new_complete"; then
38428      STRIP="$new_complete"
38429      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38430$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38431    fi
38432  fi
38433
38434
38435
38436  # Publish this variable in the help.
38437
38438
38439  if [ -z "${NM+x}" ]; then
38440    # The variable is not set by user, try to locate tool using the code snippet
38441    for ac_prog in nm
38442do
38443  # Extract the first word of "$ac_prog", so it can be a program name with args.
38444set dummy $ac_prog; ac_word=$2
38445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38446$as_echo_n "checking for $ac_word... " >&6; }
38447if ${ac_cv_path_NM+:} false; then :
38448  $as_echo_n "(cached) " >&6
38449else
38450  case $NM in
38451  [\\/]* | ?:[\\/]*)
38452  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38453  ;;
38454  *)
38455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38456for as_dir in $PATH
38457do
38458  IFS=$as_save_IFS
38459  test -z "$as_dir" && as_dir=.
38460    for ac_exec_ext in '' $ac_executable_extensions; do
38461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38462    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38464    break 2
38465  fi
38466done
38467  done
38468IFS=$as_save_IFS
38469
38470  ;;
38471esac
38472fi
38473NM=$ac_cv_path_NM
38474if test -n "$NM"; then
38475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38476$as_echo "$NM" >&6; }
38477else
38478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38479$as_echo "no" >&6; }
38480fi
38481
38482
38483  test -n "$NM" && break
38484done
38485
38486  else
38487    # The variable is set, but is it from the command line or the environment?
38488
38489    # Try to remove the string !NM! from our list.
38490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38492      # If it failed, the variable was not from the command line. Ignore it,
38493      # but warn the user (except for BASH, which is always set by the calling BASH).
38494      if test "xNM" != xBASH; then
38495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38496$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38497      fi
38498      # Try to locate tool using the code snippet
38499      for ac_prog in nm
38500do
38501  # Extract the first word of "$ac_prog", so it can be a program name with args.
38502set dummy $ac_prog; ac_word=$2
38503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38504$as_echo_n "checking for $ac_word... " >&6; }
38505if ${ac_cv_path_NM+:} false; then :
38506  $as_echo_n "(cached) " >&6
38507else
38508  case $NM in
38509  [\\/]* | ?:[\\/]*)
38510  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38511  ;;
38512  *)
38513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38514for as_dir in $PATH
38515do
38516  IFS=$as_save_IFS
38517  test -z "$as_dir" && as_dir=.
38518    for ac_exec_ext in '' $ac_executable_extensions; do
38519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38520    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38522    break 2
38523  fi
38524done
38525  done
38526IFS=$as_save_IFS
38527
38528  ;;
38529esac
38530fi
38531NM=$ac_cv_path_NM
38532if test -n "$NM"; then
38533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38534$as_echo "$NM" >&6; }
38535else
38536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38537$as_echo "no" >&6; }
38538fi
38539
38540
38541  test -n "$NM" && break
38542done
38543
38544    else
38545      # If it succeeded, then it was overridden by the user. We will use it
38546      # for the tool.
38547
38548      # First remove it from the list of overridden variables, so we can test
38549      # for unknown variables in the end.
38550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38551
38552      # Check if we try to supply an empty value
38553      if test "x$NM" = x; then
38554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38555$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38557$as_echo_n "checking for NM... " >&6; }
38558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38559$as_echo "disabled" >&6; }
38560      else
38561        # Check if the provided tool contains a complete path.
38562        tool_specified="$NM"
38563        tool_basename="${tool_specified##*/}"
38564        if test "x$tool_basename" = "x$tool_specified"; then
38565          # A command without a complete path is provided, search $PATH.
38566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38567$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38568          # Extract the first word of "$tool_basename", so it can be a program name with args.
38569set dummy $tool_basename; ac_word=$2
38570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38571$as_echo_n "checking for $ac_word... " >&6; }
38572if ${ac_cv_path_NM+:} false; then :
38573  $as_echo_n "(cached) " >&6
38574else
38575  case $NM in
38576  [\\/]* | ?:[\\/]*)
38577  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38578  ;;
38579  *)
38580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38581for as_dir in $PATH
38582do
38583  IFS=$as_save_IFS
38584  test -z "$as_dir" && as_dir=.
38585    for ac_exec_ext in '' $ac_executable_extensions; do
38586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38587    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38589    break 2
38590  fi
38591done
38592  done
38593IFS=$as_save_IFS
38594
38595  ;;
38596esac
38597fi
38598NM=$ac_cv_path_NM
38599if test -n "$NM"; then
38600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38601$as_echo "$NM" >&6; }
38602else
38603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38604$as_echo "no" >&6; }
38605fi
38606
38607
38608          if test "x$NM" = x; then
38609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38610          fi
38611        else
38612          # Otherwise we believe it is a complete path. Use it as it is.
38613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38614$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38616$as_echo_n "checking for NM... " >&6; }
38617          if test ! -x "$tool_specified"; then
38618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38619$as_echo "not found" >&6; }
38620            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38621          fi
38622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38623$as_echo "$tool_specified" >&6; }
38624        fi
38625      fi
38626    fi
38627
38628  fi
38629
38630
38631
38632  # Only process if variable expands to non-empty
38633
38634  if test "x$NM" != x; then
38635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38636
38637  # First separate the path from the arguments. This will split at the first
38638  # space.
38639  complete="$NM"
38640  path="${complete%% *}"
38641  tmp="$complete EOL"
38642  arguments="${tmp#* }"
38643
38644  # Input might be given as Windows format, start by converting to
38645  # unix format.
38646  new_path=`$CYGPATH -u "$path"`
38647
38648  # Now try to locate executable using which
38649  new_path=`$WHICH "$new_path" 2> /dev/null`
38650  # bat and cmd files are not always considered executable in cygwin causing which
38651  # to not find them
38652  if test "x$new_path" = x \
38653      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38654      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38655    new_path=`$CYGPATH -u "$path"`
38656  fi
38657  if test "x$new_path" = x; then
38658    # Oops. Which didn't find the executable.
38659    # The splitting of arguments from the executable at a space might have been incorrect,
38660    # since paths with space are more likely in Windows. Give it another try with the whole
38661    # argument.
38662    path="$complete"
38663    arguments="EOL"
38664    new_path=`$CYGPATH -u "$path"`
38665    new_path=`$WHICH "$new_path" 2> /dev/null`
38666    # bat and cmd files are not always considered executable in cygwin causing which
38667    # to not find them
38668    if test "x$new_path" = x \
38669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38671      new_path=`$CYGPATH -u "$path"`
38672    fi
38673    if test "x$new_path" = x; then
38674      # It's still not found. Now this is an unrecoverable error.
38675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38676$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38677      has_space=`$ECHO "$complete" | $GREP " "`
38678      if test "x$has_space" != x; then
38679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38681      fi
38682      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38683    fi
38684  fi
38685
38686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38689  # "foo.exe" is OK but "foo" is an error.
38690  #
38691  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38692  # It is also a way to make sure we got the proper file name for the real test later on.
38693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38694  if test "x$test_shortpath" = x; then
38695    # Short path failed, file does not exist as specified.
38696    # Try adding .exe or .cmd
38697    if test -f "${new_path}.exe"; then
38698      input_to_shortpath="${new_path}.exe"
38699    elif test -f "${new_path}.cmd"; then
38700      input_to_shortpath="${new_path}.cmd"
38701    else
38702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38703$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38704      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38705$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38706      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38707    fi
38708  else
38709    input_to_shortpath="$new_path"
38710  fi
38711
38712  # Call helper function which possibly converts this using DOS-style short mode.
38713  # If so, the updated path is stored in $new_path.
38714  new_path="$input_to_shortpath"
38715
38716  input_path="$input_to_shortpath"
38717  # Check if we need to convert this using DOS-style short mode. If the path
38718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38719  # take no chances and rewrite it.
38720  # Note: m4 eats our [], so we need to use [ and ] instead.
38721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38722  if test "x$has_forbidden_chars" != x; then
38723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38727      # Going to short mode and back again did indeed matter. Since short mode is
38728      # case insensitive, let's make it lowercase to improve readability.
38729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38730      # Now convert it back to Unix-style (cygpath)
38731      input_path=`$CYGPATH -u "$shortmode_path"`
38732      new_path="$input_path"
38733    fi
38734  fi
38735
38736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38737  if test "x$test_cygdrive_prefix" = x; then
38738    # As a simple fix, exclude /usr/bin since it's not a real path.
38739    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38741      # a path prefixed by /cygdrive for fixpath to work.
38742      new_path="$CYGWIN_ROOT_PATH$input_path"
38743    fi
38744  fi
38745
38746  # remove trailing .exe if any
38747  new_path="${new_path/%.exe/}"
38748
38749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38750
38751  # First separate the path from the arguments. This will split at the first
38752  # space.
38753  complete="$NM"
38754  path="${complete%% *}"
38755  tmp="$complete EOL"
38756  arguments="${tmp#* }"
38757
38758  # Input might be given as Windows format, start by converting to
38759  # unix format.
38760  new_path="$path"
38761
38762  windows_path="$new_path"
38763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38764    unix_path=`$CYGPATH -u "$windows_path"`
38765    new_path="$unix_path"
38766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38768    new_path="$unix_path"
38769  fi
38770
38771
38772  # Now try to locate executable using which
38773  new_path=`$WHICH "$new_path" 2> /dev/null`
38774
38775  if test "x$new_path" = x; then
38776    # Oops. Which didn't find the executable.
38777    # The splitting of arguments from the executable at a space might have been incorrect,
38778    # since paths with space are more likely in Windows. Give it another try with the whole
38779    # argument.
38780    path="$complete"
38781    arguments="EOL"
38782    new_path="$path"
38783
38784  windows_path="$new_path"
38785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38786    unix_path=`$CYGPATH -u "$windows_path"`
38787    new_path="$unix_path"
38788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38790    new_path="$unix_path"
38791  fi
38792
38793
38794    new_path=`$WHICH "$new_path" 2> /dev/null`
38795    # bat and cmd files are not always considered executable in MSYS causing which
38796    # to not find them
38797    if test "x$new_path" = x \
38798        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38799        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38800      new_path="$path"
38801
38802  windows_path="$new_path"
38803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38804    unix_path=`$CYGPATH -u "$windows_path"`
38805    new_path="$unix_path"
38806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38808    new_path="$unix_path"
38809  fi
38810
38811    fi
38812
38813    if test "x$new_path" = x; then
38814      # It's still not found. Now this is an unrecoverable error.
38815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38816$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38817      has_space=`$ECHO "$complete" | $GREP " "`
38818      if test "x$has_space" != x; then
38819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38821      fi
38822      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38823    fi
38824  fi
38825
38826  # Now new_path has a complete unix path to the binary
38827  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38828    # Keep paths in /bin as-is, but remove trailing .exe if any
38829    new_path="${new_path/%.exe/}"
38830    # Do not save /bin paths to all_fixpath_prefixes!
38831  else
38832    # Not in mixed or Windows style, start by that.
38833    new_path=`cmd //c echo $new_path`
38834
38835  input_path="$new_path"
38836  # Check if we need to convert this using DOS-style short mode. If the path
38837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38838  # take no chances and rewrite it.
38839  # Note: m4 eats our [], so we need to use [ and ] instead.
38840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38841  if test "x$has_forbidden_chars" != x; then
38842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38844  fi
38845
38846    # Output is in $new_path
38847
38848  windows_path="$new_path"
38849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38850    unix_path=`$CYGPATH -u "$windows_path"`
38851    new_path="$unix_path"
38852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38854    new_path="$unix_path"
38855  fi
38856
38857    # remove trailing .exe if any
38858    new_path="${new_path/%.exe/}"
38859
38860    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38861    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38862  fi
38863
38864    else
38865      # We're on a unix platform. Hooray! :)
38866      # First separate the path from the arguments. This will split at the first
38867      # space.
38868      complete="$NM"
38869      path="${complete%% *}"
38870      tmp="$complete EOL"
38871      arguments="${tmp#* }"
38872
38873      # Cannot rely on the command "which" here since it doesn't always work.
38874      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38875      if test -z "$is_absolute_path"; then
38876        # Path to executable is not absolute. Find it.
38877        IFS_save="$IFS"
38878        IFS=:
38879        for p in $PATH; do
38880          if test -f "$p/$path" && test -x "$p/$path"; then
38881            new_path="$p/$path"
38882            break
38883          fi
38884        done
38885        IFS="$IFS_save"
38886      else
38887        # This is an absolute path, we can use it without further modifications.
38888        new_path="$path"
38889      fi
38890
38891      if test "x$new_path" = x; then
38892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38893$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38894        has_space=`$ECHO "$complete" | $GREP " "`
38895        if test "x$has_space" != x; then
38896          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38897$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38898        fi
38899        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38900      fi
38901    fi
38902
38903    # Now join together the path and the arguments once again
38904    if test "x$arguments" != xEOL; then
38905      new_complete="$new_path ${arguments% *}"
38906    else
38907      new_complete="$new_path"
38908    fi
38909
38910    if test "x$complete" != "x$new_complete"; then
38911      NM="$new_complete"
38912      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38913$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38914    fi
38915  fi
38916
38917
38918
38919  # Publish this variable in the help.
38920
38921
38922  if [ -z "${GNM+x}" ]; then
38923    # The variable is not set by user, try to locate tool using the code snippet
38924    for ac_prog in gnm
38925do
38926  # Extract the first word of "$ac_prog", so it can be a program name with args.
38927set dummy $ac_prog; ac_word=$2
38928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38929$as_echo_n "checking for $ac_word... " >&6; }
38930if ${ac_cv_path_GNM+:} false; then :
38931  $as_echo_n "(cached) " >&6
38932else
38933  case $GNM in
38934  [\\/]* | ?:[\\/]*)
38935  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38936  ;;
38937  *)
38938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38939for as_dir in $PATH
38940do
38941  IFS=$as_save_IFS
38942  test -z "$as_dir" && as_dir=.
38943    for ac_exec_ext in '' $ac_executable_extensions; do
38944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38945    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38947    break 2
38948  fi
38949done
38950  done
38951IFS=$as_save_IFS
38952
38953  ;;
38954esac
38955fi
38956GNM=$ac_cv_path_GNM
38957if test -n "$GNM"; then
38958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38959$as_echo "$GNM" >&6; }
38960else
38961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38962$as_echo "no" >&6; }
38963fi
38964
38965
38966  test -n "$GNM" && break
38967done
38968
38969  else
38970    # The variable is set, but is it from the command line or the environment?
38971
38972    # Try to remove the string !GNM! from our list.
38973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38975      # If it failed, the variable was not from the command line. Ignore it,
38976      # but warn the user (except for BASH, which is always set by the calling BASH).
38977      if test "xGNM" != xBASH; then
38978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38979$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38980      fi
38981      # Try to locate tool using the code snippet
38982      for ac_prog in gnm
38983do
38984  # Extract the first word of "$ac_prog", so it can be a program name with args.
38985set dummy $ac_prog; ac_word=$2
38986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38987$as_echo_n "checking for $ac_word... " >&6; }
38988if ${ac_cv_path_GNM+:} false; then :
38989  $as_echo_n "(cached) " >&6
38990else
38991  case $GNM in
38992  [\\/]* | ?:[\\/]*)
38993  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38994  ;;
38995  *)
38996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38997for as_dir in $PATH
38998do
38999  IFS=$as_save_IFS
39000  test -z "$as_dir" && as_dir=.
39001    for ac_exec_ext in '' $ac_executable_extensions; do
39002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39003    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39005    break 2
39006  fi
39007done
39008  done
39009IFS=$as_save_IFS
39010
39011  ;;
39012esac
39013fi
39014GNM=$ac_cv_path_GNM
39015if test -n "$GNM"; then
39016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39017$as_echo "$GNM" >&6; }
39018else
39019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39020$as_echo "no" >&6; }
39021fi
39022
39023
39024  test -n "$GNM" && break
39025done
39026
39027    else
39028      # If it succeeded, then it was overridden by the user. We will use it
39029      # for the tool.
39030
39031      # First remove it from the list of overridden variables, so we can test
39032      # for unknown variables in the end.
39033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39034
39035      # Check if we try to supply an empty value
39036      if test "x$GNM" = x; then
39037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39038$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39040$as_echo_n "checking for GNM... " >&6; }
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39042$as_echo "disabled" >&6; }
39043      else
39044        # Check if the provided tool contains a complete path.
39045        tool_specified="$GNM"
39046        tool_basename="${tool_specified##*/}"
39047        if test "x$tool_basename" = "x$tool_specified"; then
39048          # A command without a complete path is provided, search $PATH.
39049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39050$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39051          # Extract the first word of "$tool_basename", so it can be a program name with args.
39052set dummy $tool_basename; ac_word=$2
39053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39054$as_echo_n "checking for $ac_word... " >&6; }
39055if ${ac_cv_path_GNM+:} false; then :
39056  $as_echo_n "(cached) " >&6
39057else
39058  case $GNM in
39059  [\\/]* | ?:[\\/]*)
39060  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39061  ;;
39062  *)
39063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39064for as_dir in $PATH
39065do
39066  IFS=$as_save_IFS
39067  test -z "$as_dir" && as_dir=.
39068    for ac_exec_ext in '' $ac_executable_extensions; do
39069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39070    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39072    break 2
39073  fi
39074done
39075  done
39076IFS=$as_save_IFS
39077
39078  ;;
39079esac
39080fi
39081GNM=$ac_cv_path_GNM
39082if test -n "$GNM"; then
39083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39084$as_echo "$GNM" >&6; }
39085else
39086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39087$as_echo "no" >&6; }
39088fi
39089
39090
39091          if test "x$GNM" = x; then
39092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39093          fi
39094        else
39095          # Otherwise we believe it is a complete path. Use it as it is.
39096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39097$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39099$as_echo_n "checking for GNM... " >&6; }
39100          if test ! -x "$tool_specified"; then
39101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39102$as_echo "not found" >&6; }
39103            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39104          fi
39105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39106$as_echo "$tool_specified" >&6; }
39107        fi
39108      fi
39109    fi
39110
39111  fi
39112
39113
39114
39115  # Only process if variable expands to non-empty
39116
39117  if test "x$GNM" != x; then
39118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39119
39120  # First separate the path from the arguments. This will split at the first
39121  # space.
39122  complete="$GNM"
39123  path="${complete%% *}"
39124  tmp="$complete EOL"
39125  arguments="${tmp#* }"
39126
39127  # Input might be given as Windows format, start by converting to
39128  # unix format.
39129  new_path=`$CYGPATH -u "$path"`
39130
39131  # Now try to locate executable using which
39132  new_path=`$WHICH "$new_path" 2> /dev/null`
39133  # bat and cmd files are not always considered executable in cygwin causing which
39134  # to not find them
39135  if test "x$new_path" = x \
39136      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39137      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39138    new_path=`$CYGPATH -u "$path"`
39139  fi
39140  if test "x$new_path" = x; then
39141    # Oops. Which didn't find the executable.
39142    # The splitting of arguments from the executable at a space might have been incorrect,
39143    # since paths with space are more likely in Windows. Give it another try with the whole
39144    # argument.
39145    path="$complete"
39146    arguments="EOL"
39147    new_path=`$CYGPATH -u "$path"`
39148    new_path=`$WHICH "$new_path" 2> /dev/null`
39149    # bat and cmd files are not always considered executable in cygwin causing which
39150    # to not find them
39151    if test "x$new_path" = x \
39152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39154      new_path=`$CYGPATH -u "$path"`
39155    fi
39156    if test "x$new_path" = x; then
39157      # It's still not found. Now this is an unrecoverable error.
39158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39159$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39160      has_space=`$ECHO "$complete" | $GREP " "`
39161      if test "x$has_space" != x; then
39162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39164      fi
39165      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39166    fi
39167  fi
39168
39169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39172  # "foo.exe" is OK but "foo" is an error.
39173  #
39174  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39175  # It is also a way to make sure we got the proper file name for the real test later on.
39176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39177  if test "x$test_shortpath" = x; then
39178    # Short path failed, file does not exist as specified.
39179    # Try adding .exe or .cmd
39180    if test -f "${new_path}.exe"; then
39181      input_to_shortpath="${new_path}.exe"
39182    elif test -f "${new_path}.cmd"; then
39183      input_to_shortpath="${new_path}.cmd"
39184    else
39185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39186$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39187      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39188$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39189      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39190    fi
39191  else
39192    input_to_shortpath="$new_path"
39193  fi
39194
39195  # Call helper function which possibly converts this using DOS-style short mode.
39196  # If so, the updated path is stored in $new_path.
39197  new_path="$input_to_shortpath"
39198
39199  input_path="$input_to_shortpath"
39200  # Check if we need to convert this using DOS-style short mode. If the path
39201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39202  # take no chances and rewrite it.
39203  # Note: m4 eats our [], so we need to use [ and ] instead.
39204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39205  if test "x$has_forbidden_chars" != x; then
39206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39210      # Going to short mode and back again did indeed matter. Since short mode is
39211      # case insensitive, let's make it lowercase to improve readability.
39212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39213      # Now convert it back to Unix-style (cygpath)
39214      input_path=`$CYGPATH -u "$shortmode_path"`
39215      new_path="$input_path"
39216    fi
39217  fi
39218
39219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39220  if test "x$test_cygdrive_prefix" = x; then
39221    # As a simple fix, exclude /usr/bin since it's not a real path.
39222    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39224      # a path prefixed by /cygdrive for fixpath to work.
39225      new_path="$CYGWIN_ROOT_PATH$input_path"
39226    fi
39227  fi
39228
39229  # remove trailing .exe if any
39230  new_path="${new_path/%.exe/}"
39231
39232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39233
39234  # First separate the path from the arguments. This will split at the first
39235  # space.
39236  complete="$GNM"
39237  path="${complete%% *}"
39238  tmp="$complete EOL"
39239  arguments="${tmp#* }"
39240
39241  # Input might be given as Windows format, start by converting to
39242  # unix format.
39243  new_path="$path"
39244
39245  windows_path="$new_path"
39246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39247    unix_path=`$CYGPATH -u "$windows_path"`
39248    new_path="$unix_path"
39249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39251    new_path="$unix_path"
39252  fi
39253
39254
39255  # Now try to locate executable using which
39256  new_path=`$WHICH "$new_path" 2> /dev/null`
39257
39258  if test "x$new_path" = x; then
39259    # Oops. Which didn't find the executable.
39260    # The splitting of arguments from the executable at a space might have been incorrect,
39261    # since paths with space are more likely in Windows. Give it another try with the whole
39262    # argument.
39263    path="$complete"
39264    arguments="EOL"
39265    new_path="$path"
39266
39267  windows_path="$new_path"
39268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39269    unix_path=`$CYGPATH -u "$windows_path"`
39270    new_path="$unix_path"
39271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39273    new_path="$unix_path"
39274  fi
39275
39276
39277    new_path=`$WHICH "$new_path" 2> /dev/null`
39278    # bat and cmd files are not always considered executable in MSYS causing which
39279    # to not find them
39280    if test "x$new_path" = x \
39281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39283      new_path="$path"
39284
39285  windows_path="$new_path"
39286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39287    unix_path=`$CYGPATH -u "$windows_path"`
39288    new_path="$unix_path"
39289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39291    new_path="$unix_path"
39292  fi
39293
39294    fi
39295
39296    if test "x$new_path" = x; then
39297      # It's still not found. Now this is an unrecoverable error.
39298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39299$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39300      has_space=`$ECHO "$complete" | $GREP " "`
39301      if test "x$has_space" != x; then
39302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39304      fi
39305      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39306    fi
39307  fi
39308
39309  # Now new_path has a complete unix path to the binary
39310  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39311    # Keep paths in /bin as-is, but remove trailing .exe if any
39312    new_path="${new_path/%.exe/}"
39313    # Do not save /bin paths to all_fixpath_prefixes!
39314  else
39315    # Not in mixed or Windows style, start by that.
39316    new_path=`cmd //c echo $new_path`
39317
39318  input_path="$new_path"
39319  # Check if we need to convert this using DOS-style short mode. If the path
39320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39321  # take no chances and rewrite it.
39322  # Note: m4 eats our [], so we need to use [ and ] instead.
39323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39324  if test "x$has_forbidden_chars" != x; then
39325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39327  fi
39328
39329    # Output is in $new_path
39330
39331  windows_path="$new_path"
39332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39333    unix_path=`$CYGPATH -u "$windows_path"`
39334    new_path="$unix_path"
39335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39337    new_path="$unix_path"
39338  fi
39339
39340    # remove trailing .exe if any
39341    new_path="${new_path/%.exe/}"
39342
39343    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39344    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39345  fi
39346
39347    else
39348      # We're on a unix platform. Hooray! :)
39349      # First separate the path from the arguments. This will split at the first
39350      # space.
39351      complete="$GNM"
39352      path="${complete%% *}"
39353      tmp="$complete EOL"
39354      arguments="${tmp#* }"
39355
39356      # Cannot rely on the command "which" here since it doesn't always work.
39357      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39358      if test -z "$is_absolute_path"; then
39359        # Path to executable is not absolute. Find it.
39360        IFS_save="$IFS"
39361        IFS=:
39362        for p in $PATH; do
39363          if test -f "$p/$path" && test -x "$p/$path"; then
39364            new_path="$p/$path"
39365            break
39366          fi
39367        done
39368        IFS="$IFS_save"
39369      else
39370        # This is an absolute path, we can use it without further modifications.
39371        new_path="$path"
39372      fi
39373
39374      if test "x$new_path" = x; then
39375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39376$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39377        has_space=`$ECHO "$complete" | $GREP " "`
39378        if test "x$has_space" != x; then
39379          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39380$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39381        fi
39382        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39383      fi
39384    fi
39385
39386    # Now join together the path and the arguments once again
39387    if test "x$arguments" != xEOL; then
39388      new_complete="$new_path ${arguments% *}"
39389    else
39390      new_complete="$new_path"
39391    fi
39392
39393    if test "x$complete" != "x$new_complete"; then
39394      GNM="$new_complete"
39395      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39396$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39397    fi
39398  fi
39399
39400  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39401    # FIXME: we should unify this with the solaris case above.
39402
39403
39404  # Publish this variable in the help.
39405
39406
39407  if [ -z "${STRIP+x}" ]; then
39408    # The variable is not set by user, try to locate tool using the code snippet
39409    if test -n "$ac_tool_prefix"; then
39410  for ac_prog in strip
39411  do
39412    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39413set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39415$as_echo_n "checking for $ac_word... " >&6; }
39416if ${ac_cv_prog_STRIP+:} false; then :
39417  $as_echo_n "(cached) " >&6
39418else
39419  if test -n "$STRIP"; then
39420  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39421else
39422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39423for as_dir in $PATH
39424do
39425  IFS=$as_save_IFS
39426  test -z "$as_dir" && as_dir=.
39427    for ac_exec_ext in '' $ac_executable_extensions; do
39428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39429    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39431    break 2
39432  fi
39433done
39434  done
39435IFS=$as_save_IFS
39436
39437fi
39438fi
39439STRIP=$ac_cv_prog_STRIP
39440if test -n "$STRIP"; then
39441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39442$as_echo "$STRIP" >&6; }
39443else
39444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39445$as_echo "no" >&6; }
39446fi
39447
39448
39449    test -n "$STRIP" && break
39450  done
39451fi
39452if test -z "$STRIP"; then
39453  ac_ct_STRIP=$STRIP
39454  for ac_prog in strip
39455do
39456  # Extract the first word of "$ac_prog", so it can be a program name with args.
39457set dummy $ac_prog; ac_word=$2
39458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39459$as_echo_n "checking for $ac_word... " >&6; }
39460if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39461  $as_echo_n "(cached) " >&6
39462else
39463  if test -n "$ac_ct_STRIP"; then
39464  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39465else
39466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39467for as_dir in $PATH
39468do
39469  IFS=$as_save_IFS
39470  test -z "$as_dir" && as_dir=.
39471    for ac_exec_ext in '' $ac_executable_extensions; do
39472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39473    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39475    break 2
39476  fi
39477done
39478  done
39479IFS=$as_save_IFS
39480
39481fi
39482fi
39483ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39484if test -n "$ac_ct_STRIP"; then
39485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39486$as_echo "$ac_ct_STRIP" >&6; }
39487else
39488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39489$as_echo "no" >&6; }
39490fi
39491
39492
39493  test -n "$ac_ct_STRIP" && break
39494done
39495
39496  if test "x$ac_ct_STRIP" = x; then
39497    STRIP=""
39498  else
39499    case $cross_compiling:$ac_tool_warned in
39500yes:)
39501{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39502$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39503ac_tool_warned=yes ;;
39504esac
39505    STRIP=$ac_ct_STRIP
39506  fi
39507fi
39508
39509  else
39510    # The variable is set, but is it from the command line or the environment?
39511
39512    # Try to remove the string !STRIP! from our list.
39513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39515      # If it failed, the variable was not from the command line. Ignore it,
39516      # but warn the user (except for BASH, which is always set by the calling BASH).
39517      if test "xSTRIP" != xBASH; then
39518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39519$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39520      fi
39521      # Try to locate tool using the code snippet
39522      if test -n "$ac_tool_prefix"; then
39523  for ac_prog in strip
39524  do
39525    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39526set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39528$as_echo_n "checking for $ac_word... " >&6; }
39529if ${ac_cv_prog_STRIP+:} false; then :
39530  $as_echo_n "(cached) " >&6
39531else
39532  if test -n "$STRIP"; then
39533  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39534else
39535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39536for as_dir in $PATH
39537do
39538  IFS=$as_save_IFS
39539  test -z "$as_dir" && as_dir=.
39540    for ac_exec_ext in '' $ac_executable_extensions; do
39541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39542    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39544    break 2
39545  fi
39546done
39547  done
39548IFS=$as_save_IFS
39549
39550fi
39551fi
39552STRIP=$ac_cv_prog_STRIP
39553if test -n "$STRIP"; then
39554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39555$as_echo "$STRIP" >&6; }
39556else
39557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39558$as_echo "no" >&6; }
39559fi
39560
39561
39562    test -n "$STRIP" && break
39563  done
39564fi
39565if test -z "$STRIP"; then
39566  ac_ct_STRIP=$STRIP
39567  for ac_prog in strip
39568do
39569  # Extract the first word of "$ac_prog", so it can be a program name with args.
39570set dummy $ac_prog; ac_word=$2
39571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39572$as_echo_n "checking for $ac_word... " >&6; }
39573if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39574  $as_echo_n "(cached) " >&6
39575else
39576  if test -n "$ac_ct_STRIP"; then
39577  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39578else
39579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39580for as_dir in $PATH
39581do
39582  IFS=$as_save_IFS
39583  test -z "$as_dir" && as_dir=.
39584    for ac_exec_ext in '' $ac_executable_extensions; do
39585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39586    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39588    break 2
39589  fi
39590done
39591  done
39592IFS=$as_save_IFS
39593
39594fi
39595fi
39596ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39597if test -n "$ac_ct_STRIP"; then
39598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39599$as_echo "$ac_ct_STRIP" >&6; }
39600else
39601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39602$as_echo "no" >&6; }
39603fi
39604
39605
39606  test -n "$ac_ct_STRIP" && break
39607done
39608
39609  if test "x$ac_ct_STRIP" = x; then
39610    STRIP=""
39611  else
39612    case $cross_compiling:$ac_tool_warned in
39613yes:)
39614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39616ac_tool_warned=yes ;;
39617esac
39618    STRIP=$ac_ct_STRIP
39619  fi
39620fi
39621
39622    else
39623      # If it succeeded, then it was overridden by the user. We will use it
39624      # for the tool.
39625
39626      # First remove it from the list of overridden variables, so we can test
39627      # for unknown variables in the end.
39628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39629
39630      # Check if we try to supply an empty value
39631      if test "x$STRIP" = x; then
39632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39633$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39635$as_echo_n "checking for STRIP... " >&6; }
39636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39637$as_echo "disabled" >&6; }
39638      else
39639        # Check if the provided tool contains a complete path.
39640        tool_specified="$STRIP"
39641        tool_basename="${tool_specified##*/}"
39642        if test "x$tool_basename" = "x$tool_specified"; then
39643          # A command without a complete path is provided, search $PATH.
39644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39645$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39646          # Extract the first word of "$tool_basename", so it can be a program name with args.
39647set dummy $tool_basename; ac_word=$2
39648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39649$as_echo_n "checking for $ac_word... " >&6; }
39650if ${ac_cv_path_STRIP+:} false; then :
39651  $as_echo_n "(cached) " >&6
39652else
39653  case $STRIP in
39654  [\\/]* | ?:[\\/]*)
39655  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39656  ;;
39657  *)
39658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39659for as_dir in $PATH
39660do
39661  IFS=$as_save_IFS
39662  test -z "$as_dir" && as_dir=.
39663    for ac_exec_ext in '' $ac_executable_extensions; do
39664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39665    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39667    break 2
39668  fi
39669done
39670  done
39671IFS=$as_save_IFS
39672
39673  ;;
39674esac
39675fi
39676STRIP=$ac_cv_path_STRIP
39677if test -n "$STRIP"; then
39678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39679$as_echo "$STRIP" >&6; }
39680else
39681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39682$as_echo "no" >&6; }
39683fi
39684
39685
39686          if test "x$STRIP" = x; then
39687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39688          fi
39689        else
39690          # Otherwise we believe it is a complete path. Use it as it is.
39691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39692$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39694$as_echo_n "checking for STRIP... " >&6; }
39695          if test ! -x "$tool_specified"; then
39696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39697$as_echo "not found" >&6; }
39698            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39699          fi
39700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39701$as_echo "$tool_specified" >&6; }
39702        fi
39703      fi
39704    fi
39705
39706  fi
39707
39708
39709
39710  # Only process if variable expands to non-empty
39711
39712  if test "x$STRIP" != x; then
39713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39714
39715  # First separate the path from the arguments. This will split at the first
39716  # space.
39717  complete="$STRIP"
39718  path="${complete%% *}"
39719  tmp="$complete EOL"
39720  arguments="${tmp#* }"
39721
39722  # Input might be given as Windows format, start by converting to
39723  # unix format.
39724  new_path=`$CYGPATH -u "$path"`
39725
39726  # Now try to locate executable using which
39727  new_path=`$WHICH "$new_path" 2> /dev/null`
39728  # bat and cmd files are not always considered executable in cygwin causing which
39729  # to not find them
39730  if test "x$new_path" = x \
39731      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39732      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39733    new_path=`$CYGPATH -u "$path"`
39734  fi
39735  if test "x$new_path" = x; then
39736    # Oops. Which didn't find the executable.
39737    # The splitting of arguments from the executable at a space might have been incorrect,
39738    # since paths with space are more likely in Windows. Give it another try with the whole
39739    # argument.
39740    path="$complete"
39741    arguments="EOL"
39742    new_path=`$CYGPATH -u "$path"`
39743    new_path=`$WHICH "$new_path" 2> /dev/null`
39744    # bat and cmd files are not always considered executable in cygwin causing which
39745    # to not find them
39746    if test "x$new_path" = x \
39747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39749      new_path=`$CYGPATH -u "$path"`
39750    fi
39751    if test "x$new_path" = x; then
39752      # It's still not found. Now this is an unrecoverable error.
39753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39754$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39755      has_space=`$ECHO "$complete" | $GREP " "`
39756      if test "x$has_space" != x; then
39757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39759      fi
39760      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39761    fi
39762  fi
39763
39764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39767  # "foo.exe" is OK but "foo" is an error.
39768  #
39769  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39770  # It is also a way to make sure we got the proper file name for the real test later on.
39771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39772  if test "x$test_shortpath" = x; then
39773    # Short path failed, file does not exist as specified.
39774    # Try adding .exe or .cmd
39775    if test -f "${new_path}.exe"; then
39776      input_to_shortpath="${new_path}.exe"
39777    elif test -f "${new_path}.cmd"; then
39778      input_to_shortpath="${new_path}.cmd"
39779    else
39780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39781$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39782      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39783$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39784      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39785    fi
39786  else
39787    input_to_shortpath="$new_path"
39788  fi
39789
39790  # Call helper function which possibly converts this using DOS-style short mode.
39791  # If so, the updated path is stored in $new_path.
39792  new_path="$input_to_shortpath"
39793
39794  input_path="$input_to_shortpath"
39795  # Check if we need to convert this using DOS-style short mode. If the path
39796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39797  # take no chances and rewrite it.
39798  # Note: m4 eats our [], so we need to use [ and ] instead.
39799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39800  if test "x$has_forbidden_chars" != x; then
39801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39805      # Going to short mode and back again did indeed matter. Since short mode is
39806      # case insensitive, let's make it lowercase to improve readability.
39807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39808      # Now convert it back to Unix-style (cygpath)
39809      input_path=`$CYGPATH -u "$shortmode_path"`
39810      new_path="$input_path"
39811    fi
39812  fi
39813
39814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39815  if test "x$test_cygdrive_prefix" = x; then
39816    # As a simple fix, exclude /usr/bin since it's not a real path.
39817    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39819      # a path prefixed by /cygdrive for fixpath to work.
39820      new_path="$CYGWIN_ROOT_PATH$input_path"
39821    fi
39822  fi
39823
39824  # remove trailing .exe if any
39825  new_path="${new_path/%.exe/}"
39826
39827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39828
39829  # First separate the path from the arguments. This will split at the first
39830  # space.
39831  complete="$STRIP"
39832  path="${complete%% *}"
39833  tmp="$complete EOL"
39834  arguments="${tmp#* }"
39835
39836  # Input might be given as Windows format, start by converting to
39837  # unix format.
39838  new_path="$path"
39839
39840  windows_path="$new_path"
39841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39842    unix_path=`$CYGPATH -u "$windows_path"`
39843    new_path="$unix_path"
39844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39846    new_path="$unix_path"
39847  fi
39848
39849
39850  # Now try to locate executable using which
39851  new_path=`$WHICH "$new_path" 2> /dev/null`
39852
39853  if test "x$new_path" = x; then
39854    # Oops. Which didn't find the executable.
39855    # The splitting of arguments from the executable at a space might have been incorrect,
39856    # since paths with space are more likely in Windows. Give it another try with the whole
39857    # argument.
39858    path="$complete"
39859    arguments="EOL"
39860    new_path="$path"
39861
39862  windows_path="$new_path"
39863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39864    unix_path=`$CYGPATH -u "$windows_path"`
39865    new_path="$unix_path"
39866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39868    new_path="$unix_path"
39869  fi
39870
39871
39872    new_path=`$WHICH "$new_path" 2> /dev/null`
39873    # bat and cmd files are not always considered executable in MSYS causing which
39874    # to not find them
39875    if test "x$new_path" = x \
39876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39878      new_path="$path"
39879
39880  windows_path="$new_path"
39881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39882    unix_path=`$CYGPATH -u "$windows_path"`
39883    new_path="$unix_path"
39884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39886    new_path="$unix_path"
39887  fi
39888
39889    fi
39890
39891    if test "x$new_path" = x; then
39892      # It's still not found. Now this is an unrecoverable error.
39893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39894$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39895      has_space=`$ECHO "$complete" | $GREP " "`
39896      if test "x$has_space" != x; then
39897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39899      fi
39900      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39901    fi
39902  fi
39903
39904  # Now new_path has a complete unix path to the binary
39905  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39906    # Keep paths in /bin as-is, but remove trailing .exe if any
39907    new_path="${new_path/%.exe/}"
39908    # Do not save /bin paths to all_fixpath_prefixes!
39909  else
39910    # Not in mixed or Windows style, start by that.
39911    new_path=`cmd //c echo $new_path`
39912
39913  input_path="$new_path"
39914  # Check if we need to convert this using DOS-style short mode. If the path
39915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39916  # take no chances and rewrite it.
39917  # Note: m4 eats our [], so we need to use [ and ] instead.
39918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39919  if test "x$has_forbidden_chars" != x; then
39920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39922  fi
39923
39924    # Output is in $new_path
39925
39926  windows_path="$new_path"
39927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39928    unix_path=`$CYGPATH -u "$windows_path"`
39929    new_path="$unix_path"
39930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39932    new_path="$unix_path"
39933  fi
39934
39935    # remove trailing .exe if any
39936    new_path="${new_path/%.exe/}"
39937
39938    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39939    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39940  fi
39941
39942    else
39943      # We're on a unix platform. Hooray! :)
39944      # First separate the path from the arguments. This will split at the first
39945      # space.
39946      complete="$STRIP"
39947      path="${complete%% *}"
39948      tmp="$complete EOL"
39949      arguments="${tmp#* }"
39950
39951      # Cannot rely on the command "which" here since it doesn't always work.
39952      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39953      if test -z "$is_absolute_path"; then
39954        # Path to executable is not absolute. Find it.
39955        IFS_save="$IFS"
39956        IFS=:
39957        for p in $PATH; do
39958          if test -f "$p/$path" && test -x "$p/$path"; then
39959            new_path="$p/$path"
39960            break
39961          fi
39962        done
39963        IFS="$IFS_save"
39964      else
39965        # This is an absolute path, we can use it without further modifications.
39966        new_path="$path"
39967      fi
39968
39969      if test "x$new_path" = x; then
39970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39971$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39972        has_space=`$ECHO "$complete" | $GREP " "`
39973        if test "x$has_space" != x; then
39974          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39975$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39976        fi
39977        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39978      fi
39979    fi
39980
39981    # Now join together the path and the arguments once again
39982    if test "x$arguments" != xEOL; then
39983      new_complete="$new_path ${arguments% *}"
39984    else
39985      new_complete="$new_path"
39986    fi
39987
39988    if test "x$complete" != "x$new_complete"; then
39989      STRIP="$new_complete"
39990      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39991$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39992    fi
39993  fi
39994
39995    if test "x$TOOLCHAIN_TYPE" = xgcc; then
39996
39997
39998  # Publish this variable in the help.
39999
40000
40001  if [ -z "${NM+x}" ]; then
40002    # The variable is not set by user, try to locate tool using the code snippet
40003    if test -n "$ac_tool_prefix"; then
40004  for ac_prog in nm gcc-nm
40005  do
40006    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40007set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40009$as_echo_n "checking for $ac_word... " >&6; }
40010if ${ac_cv_prog_NM+:} false; then :
40011  $as_echo_n "(cached) " >&6
40012else
40013  if test -n "$NM"; then
40014  ac_cv_prog_NM="$NM" # Let the user override the test.
40015else
40016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40017for as_dir in $PATH
40018do
40019  IFS=$as_save_IFS
40020  test -z "$as_dir" && as_dir=.
40021    for ac_exec_ext in '' $ac_executable_extensions; do
40022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40023    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40025    break 2
40026  fi
40027done
40028  done
40029IFS=$as_save_IFS
40030
40031fi
40032fi
40033NM=$ac_cv_prog_NM
40034if test -n "$NM"; then
40035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40036$as_echo "$NM" >&6; }
40037else
40038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40039$as_echo "no" >&6; }
40040fi
40041
40042
40043    test -n "$NM" && break
40044  done
40045fi
40046if test -z "$NM"; then
40047  ac_ct_NM=$NM
40048  for ac_prog in nm gcc-nm
40049do
40050  # Extract the first word of "$ac_prog", so it can be a program name with args.
40051set dummy $ac_prog; ac_word=$2
40052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40053$as_echo_n "checking for $ac_word... " >&6; }
40054if ${ac_cv_prog_ac_ct_NM+:} false; then :
40055  $as_echo_n "(cached) " >&6
40056else
40057  if test -n "$ac_ct_NM"; then
40058  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40059else
40060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40061for as_dir in $PATH
40062do
40063  IFS=$as_save_IFS
40064  test -z "$as_dir" && as_dir=.
40065    for ac_exec_ext in '' $ac_executable_extensions; do
40066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40067    ac_cv_prog_ac_ct_NM="$ac_prog"
40068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40069    break 2
40070  fi
40071done
40072  done
40073IFS=$as_save_IFS
40074
40075fi
40076fi
40077ac_ct_NM=$ac_cv_prog_ac_ct_NM
40078if test -n "$ac_ct_NM"; then
40079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40080$as_echo "$ac_ct_NM" >&6; }
40081else
40082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40083$as_echo "no" >&6; }
40084fi
40085
40086
40087  test -n "$ac_ct_NM" && break
40088done
40089
40090  if test "x$ac_ct_NM" = x; then
40091    NM=""
40092  else
40093    case $cross_compiling:$ac_tool_warned in
40094yes:)
40095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40097ac_tool_warned=yes ;;
40098esac
40099    NM=$ac_ct_NM
40100  fi
40101fi
40102
40103  else
40104    # The variable is set, but is it from the command line or the environment?
40105
40106    # Try to remove the string !NM! from our list.
40107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40109      # If it failed, the variable was not from the command line. Ignore it,
40110      # but warn the user (except for BASH, which is always set by the calling BASH).
40111      if test "xNM" != xBASH; then
40112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40113$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40114      fi
40115      # Try to locate tool using the code snippet
40116      if test -n "$ac_tool_prefix"; then
40117  for ac_prog in nm gcc-nm
40118  do
40119    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40120set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40122$as_echo_n "checking for $ac_word... " >&6; }
40123if ${ac_cv_prog_NM+:} false; then :
40124  $as_echo_n "(cached) " >&6
40125else
40126  if test -n "$NM"; then
40127  ac_cv_prog_NM="$NM" # Let the user override the test.
40128else
40129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40130for as_dir in $PATH
40131do
40132  IFS=$as_save_IFS
40133  test -z "$as_dir" && as_dir=.
40134    for ac_exec_ext in '' $ac_executable_extensions; do
40135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40136    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40138    break 2
40139  fi
40140done
40141  done
40142IFS=$as_save_IFS
40143
40144fi
40145fi
40146NM=$ac_cv_prog_NM
40147if test -n "$NM"; then
40148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40149$as_echo "$NM" >&6; }
40150else
40151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40152$as_echo "no" >&6; }
40153fi
40154
40155
40156    test -n "$NM" && break
40157  done
40158fi
40159if test -z "$NM"; then
40160  ac_ct_NM=$NM
40161  for ac_prog in nm gcc-nm
40162do
40163  # Extract the first word of "$ac_prog", so it can be a program name with args.
40164set dummy $ac_prog; ac_word=$2
40165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40166$as_echo_n "checking for $ac_word... " >&6; }
40167if ${ac_cv_prog_ac_ct_NM+:} false; then :
40168  $as_echo_n "(cached) " >&6
40169else
40170  if test -n "$ac_ct_NM"; then
40171  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40172else
40173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40174for as_dir in $PATH
40175do
40176  IFS=$as_save_IFS
40177  test -z "$as_dir" && as_dir=.
40178    for ac_exec_ext in '' $ac_executable_extensions; do
40179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40180    ac_cv_prog_ac_ct_NM="$ac_prog"
40181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40182    break 2
40183  fi
40184done
40185  done
40186IFS=$as_save_IFS
40187
40188fi
40189fi
40190ac_ct_NM=$ac_cv_prog_ac_ct_NM
40191if test -n "$ac_ct_NM"; then
40192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40193$as_echo "$ac_ct_NM" >&6; }
40194else
40195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40196$as_echo "no" >&6; }
40197fi
40198
40199
40200  test -n "$ac_ct_NM" && break
40201done
40202
40203  if test "x$ac_ct_NM" = x; then
40204    NM=""
40205  else
40206    case $cross_compiling:$ac_tool_warned in
40207yes:)
40208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40210ac_tool_warned=yes ;;
40211esac
40212    NM=$ac_ct_NM
40213  fi
40214fi
40215
40216    else
40217      # If it succeeded, then it was overridden by the user. We will use it
40218      # for the tool.
40219
40220      # First remove it from the list of overridden variables, so we can test
40221      # for unknown variables in the end.
40222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40223
40224      # Check if we try to supply an empty value
40225      if test "x$NM" = x; then
40226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40227$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40229$as_echo_n "checking for NM... " >&6; }
40230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40231$as_echo "disabled" >&6; }
40232      else
40233        # Check if the provided tool contains a complete path.
40234        tool_specified="$NM"
40235        tool_basename="${tool_specified##*/}"
40236        if test "x$tool_basename" = "x$tool_specified"; then
40237          # A command without a complete path is provided, search $PATH.
40238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40239$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40240          # Extract the first word of "$tool_basename", so it can be a program name with args.
40241set dummy $tool_basename; ac_word=$2
40242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40243$as_echo_n "checking for $ac_word... " >&6; }
40244if ${ac_cv_path_NM+:} false; then :
40245  $as_echo_n "(cached) " >&6
40246else
40247  case $NM in
40248  [\\/]* | ?:[\\/]*)
40249  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40250  ;;
40251  *)
40252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40253for as_dir in $PATH
40254do
40255  IFS=$as_save_IFS
40256  test -z "$as_dir" && as_dir=.
40257    for ac_exec_ext in '' $ac_executable_extensions; do
40258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40259    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40261    break 2
40262  fi
40263done
40264  done
40265IFS=$as_save_IFS
40266
40267  ;;
40268esac
40269fi
40270NM=$ac_cv_path_NM
40271if test -n "$NM"; then
40272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40273$as_echo "$NM" >&6; }
40274else
40275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40276$as_echo "no" >&6; }
40277fi
40278
40279
40280          if test "x$NM" = x; then
40281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40282          fi
40283        else
40284          # Otherwise we believe it is a complete path. Use it as it is.
40285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40286$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40288$as_echo_n "checking for NM... " >&6; }
40289          if test ! -x "$tool_specified"; then
40290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40291$as_echo "not found" >&6; }
40292            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40293          fi
40294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40295$as_echo "$tool_specified" >&6; }
40296        fi
40297      fi
40298    fi
40299
40300  fi
40301
40302
40303    else
40304
40305
40306  # Publish this variable in the help.
40307
40308
40309  if [ -z "${NM+x}" ]; then
40310    # The variable is not set by user, try to locate tool using the code snippet
40311    if test -n "$ac_tool_prefix"; then
40312  for ac_prog in nm
40313  do
40314    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40315set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40317$as_echo_n "checking for $ac_word... " >&6; }
40318if ${ac_cv_prog_NM+:} false; then :
40319  $as_echo_n "(cached) " >&6
40320else
40321  if test -n "$NM"; then
40322  ac_cv_prog_NM="$NM" # Let the user override the test.
40323else
40324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40325for as_dir in $PATH
40326do
40327  IFS=$as_save_IFS
40328  test -z "$as_dir" && as_dir=.
40329    for ac_exec_ext in '' $ac_executable_extensions; do
40330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40331    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40333    break 2
40334  fi
40335done
40336  done
40337IFS=$as_save_IFS
40338
40339fi
40340fi
40341NM=$ac_cv_prog_NM
40342if test -n "$NM"; then
40343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40344$as_echo "$NM" >&6; }
40345else
40346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40347$as_echo "no" >&6; }
40348fi
40349
40350
40351    test -n "$NM" && break
40352  done
40353fi
40354if test -z "$NM"; then
40355  ac_ct_NM=$NM
40356  for ac_prog in nm
40357do
40358  # Extract the first word of "$ac_prog", so it can be a program name with args.
40359set dummy $ac_prog; ac_word=$2
40360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40361$as_echo_n "checking for $ac_word... " >&6; }
40362if ${ac_cv_prog_ac_ct_NM+:} false; then :
40363  $as_echo_n "(cached) " >&6
40364else
40365  if test -n "$ac_ct_NM"; then
40366  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40367else
40368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40369for as_dir in $PATH
40370do
40371  IFS=$as_save_IFS
40372  test -z "$as_dir" && as_dir=.
40373    for ac_exec_ext in '' $ac_executable_extensions; do
40374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40375    ac_cv_prog_ac_ct_NM="$ac_prog"
40376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40377    break 2
40378  fi
40379done
40380  done
40381IFS=$as_save_IFS
40382
40383fi
40384fi
40385ac_ct_NM=$ac_cv_prog_ac_ct_NM
40386if test -n "$ac_ct_NM"; then
40387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40388$as_echo "$ac_ct_NM" >&6; }
40389else
40390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40391$as_echo "no" >&6; }
40392fi
40393
40394
40395  test -n "$ac_ct_NM" && break
40396done
40397
40398  if test "x$ac_ct_NM" = x; then
40399    NM=""
40400  else
40401    case $cross_compiling:$ac_tool_warned in
40402yes:)
40403{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40404$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40405ac_tool_warned=yes ;;
40406esac
40407    NM=$ac_ct_NM
40408  fi
40409fi
40410
40411  else
40412    # The variable is set, but is it from the command line or the environment?
40413
40414    # Try to remove the string !NM! from our list.
40415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40417      # If it failed, the variable was not from the command line. Ignore it,
40418      # but warn the user (except for BASH, which is always set by the calling BASH).
40419      if test "xNM" != xBASH; then
40420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40421$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40422      fi
40423      # Try to locate tool using the code snippet
40424      if test -n "$ac_tool_prefix"; then
40425  for ac_prog in nm
40426  do
40427    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40428set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40430$as_echo_n "checking for $ac_word... " >&6; }
40431if ${ac_cv_prog_NM+:} false; then :
40432  $as_echo_n "(cached) " >&6
40433else
40434  if test -n "$NM"; then
40435  ac_cv_prog_NM="$NM" # Let the user override the test.
40436else
40437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40438for as_dir in $PATH
40439do
40440  IFS=$as_save_IFS
40441  test -z "$as_dir" && as_dir=.
40442    for ac_exec_ext in '' $ac_executable_extensions; do
40443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40444    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40446    break 2
40447  fi
40448done
40449  done
40450IFS=$as_save_IFS
40451
40452fi
40453fi
40454NM=$ac_cv_prog_NM
40455if test -n "$NM"; then
40456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40457$as_echo "$NM" >&6; }
40458else
40459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40460$as_echo "no" >&6; }
40461fi
40462
40463
40464    test -n "$NM" && break
40465  done
40466fi
40467if test -z "$NM"; then
40468  ac_ct_NM=$NM
40469  for ac_prog in nm
40470do
40471  # Extract the first word of "$ac_prog", so it can be a program name with args.
40472set dummy $ac_prog; ac_word=$2
40473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40474$as_echo_n "checking for $ac_word... " >&6; }
40475if ${ac_cv_prog_ac_ct_NM+:} false; then :
40476  $as_echo_n "(cached) " >&6
40477else
40478  if test -n "$ac_ct_NM"; then
40479  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40480else
40481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40482for as_dir in $PATH
40483do
40484  IFS=$as_save_IFS
40485  test -z "$as_dir" && as_dir=.
40486    for ac_exec_ext in '' $ac_executable_extensions; do
40487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40488    ac_cv_prog_ac_ct_NM="$ac_prog"
40489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40490    break 2
40491  fi
40492done
40493  done
40494IFS=$as_save_IFS
40495
40496fi
40497fi
40498ac_ct_NM=$ac_cv_prog_ac_ct_NM
40499if test -n "$ac_ct_NM"; then
40500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40501$as_echo "$ac_ct_NM" >&6; }
40502else
40503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40504$as_echo "no" >&6; }
40505fi
40506
40507
40508  test -n "$ac_ct_NM" && break
40509done
40510
40511  if test "x$ac_ct_NM" = x; then
40512    NM=""
40513  else
40514    case $cross_compiling:$ac_tool_warned in
40515yes:)
40516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40518ac_tool_warned=yes ;;
40519esac
40520    NM=$ac_ct_NM
40521  fi
40522fi
40523
40524    else
40525      # If it succeeded, then it was overridden by the user. We will use it
40526      # for the tool.
40527
40528      # First remove it from the list of overridden variables, so we can test
40529      # for unknown variables in the end.
40530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40531
40532      # Check if we try to supply an empty value
40533      if test "x$NM" = x; then
40534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40535$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40537$as_echo_n "checking for NM... " >&6; }
40538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40539$as_echo "disabled" >&6; }
40540      else
40541        # Check if the provided tool contains a complete path.
40542        tool_specified="$NM"
40543        tool_basename="${tool_specified##*/}"
40544        if test "x$tool_basename" = "x$tool_specified"; then
40545          # A command without a complete path is provided, search $PATH.
40546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40547$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40548          # Extract the first word of "$tool_basename", so it can be a program name with args.
40549set dummy $tool_basename; ac_word=$2
40550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40551$as_echo_n "checking for $ac_word... " >&6; }
40552if ${ac_cv_path_NM+:} false; then :
40553  $as_echo_n "(cached) " >&6
40554else
40555  case $NM in
40556  [\\/]* | ?:[\\/]*)
40557  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40558  ;;
40559  *)
40560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40561for as_dir in $PATH
40562do
40563  IFS=$as_save_IFS
40564  test -z "$as_dir" && as_dir=.
40565    for ac_exec_ext in '' $ac_executable_extensions; do
40566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40567    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40569    break 2
40570  fi
40571done
40572  done
40573IFS=$as_save_IFS
40574
40575  ;;
40576esac
40577fi
40578NM=$ac_cv_path_NM
40579if test -n "$NM"; then
40580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40581$as_echo "$NM" >&6; }
40582else
40583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40584$as_echo "no" >&6; }
40585fi
40586
40587
40588          if test "x$NM" = x; then
40589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40590          fi
40591        else
40592          # Otherwise we believe it is a complete path. Use it as it is.
40593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40594$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40596$as_echo_n "checking for NM... " >&6; }
40597          if test ! -x "$tool_specified"; then
40598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40599$as_echo "not found" >&6; }
40600            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40601          fi
40602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40603$as_echo "$tool_specified" >&6; }
40604        fi
40605      fi
40606    fi
40607
40608  fi
40609
40610
40611    fi
40612
40613  # Only process if variable expands to non-empty
40614
40615  if test "x$NM" != x; then
40616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40617
40618  # First separate the path from the arguments. This will split at the first
40619  # space.
40620  complete="$NM"
40621  path="${complete%% *}"
40622  tmp="$complete EOL"
40623  arguments="${tmp#* }"
40624
40625  # Input might be given as Windows format, start by converting to
40626  # unix format.
40627  new_path=`$CYGPATH -u "$path"`
40628
40629  # Now try to locate executable using which
40630  new_path=`$WHICH "$new_path" 2> /dev/null`
40631  # bat and cmd files are not always considered executable in cygwin causing which
40632  # to not find them
40633  if test "x$new_path" = x \
40634      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40635      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40636    new_path=`$CYGPATH -u "$path"`
40637  fi
40638  if test "x$new_path" = x; then
40639    # Oops. Which didn't find the executable.
40640    # The splitting of arguments from the executable at a space might have been incorrect,
40641    # since paths with space are more likely in Windows. Give it another try with the whole
40642    # argument.
40643    path="$complete"
40644    arguments="EOL"
40645    new_path=`$CYGPATH -u "$path"`
40646    new_path=`$WHICH "$new_path" 2> /dev/null`
40647    # bat and cmd files are not always considered executable in cygwin causing which
40648    # to not find them
40649    if test "x$new_path" = x \
40650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40652      new_path=`$CYGPATH -u "$path"`
40653    fi
40654    if test "x$new_path" = x; then
40655      # It's still not found. Now this is an unrecoverable error.
40656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40657$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40658      has_space=`$ECHO "$complete" | $GREP " "`
40659      if test "x$has_space" != x; then
40660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40662      fi
40663      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40664    fi
40665  fi
40666
40667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40670  # "foo.exe" is OK but "foo" is an error.
40671  #
40672  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40673  # It is also a way to make sure we got the proper file name for the real test later on.
40674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40675  if test "x$test_shortpath" = x; then
40676    # Short path failed, file does not exist as specified.
40677    # Try adding .exe or .cmd
40678    if test -f "${new_path}.exe"; then
40679      input_to_shortpath="${new_path}.exe"
40680    elif test -f "${new_path}.cmd"; then
40681      input_to_shortpath="${new_path}.cmd"
40682    else
40683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40684$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40685      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40686$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40687      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40688    fi
40689  else
40690    input_to_shortpath="$new_path"
40691  fi
40692
40693  # Call helper function which possibly converts this using DOS-style short mode.
40694  # If so, the updated path is stored in $new_path.
40695  new_path="$input_to_shortpath"
40696
40697  input_path="$input_to_shortpath"
40698  # Check if we need to convert this using DOS-style short mode. If the path
40699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40700  # take no chances and rewrite it.
40701  # Note: m4 eats our [], so we need to use [ and ] instead.
40702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40703  if test "x$has_forbidden_chars" != x; then
40704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40708      # Going to short mode and back again did indeed matter. Since short mode is
40709      # case insensitive, let's make it lowercase to improve readability.
40710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40711      # Now convert it back to Unix-style (cygpath)
40712      input_path=`$CYGPATH -u "$shortmode_path"`
40713      new_path="$input_path"
40714    fi
40715  fi
40716
40717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40718  if test "x$test_cygdrive_prefix" = x; then
40719    # As a simple fix, exclude /usr/bin since it's not a real path.
40720    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40722      # a path prefixed by /cygdrive for fixpath to work.
40723      new_path="$CYGWIN_ROOT_PATH$input_path"
40724    fi
40725  fi
40726
40727  # remove trailing .exe if any
40728  new_path="${new_path/%.exe/}"
40729
40730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40731
40732  # First separate the path from the arguments. This will split at the first
40733  # space.
40734  complete="$NM"
40735  path="${complete%% *}"
40736  tmp="$complete EOL"
40737  arguments="${tmp#* }"
40738
40739  # Input might be given as Windows format, start by converting to
40740  # unix format.
40741  new_path="$path"
40742
40743  windows_path="$new_path"
40744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40745    unix_path=`$CYGPATH -u "$windows_path"`
40746    new_path="$unix_path"
40747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40749    new_path="$unix_path"
40750  fi
40751
40752
40753  # Now try to locate executable using which
40754  new_path=`$WHICH "$new_path" 2> /dev/null`
40755
40756  if test "x$new_path" = x; then
40757    # Oops. Which didn't find the executable.
40758    # The splitting of arguments from the executable at a space might have been incorrect,
40759    # since paths with space are more likely in Windows. Give it another try with the whole
40760    # argument.
40761    path="$complete"
40762    arguments="EOL"
40763    new_path="$path"
40764
40765  windows_path="$new_path"
40766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40767    unix_path=`$CYGPATH -u "$windows_path"`
40768    new_path="$unix_path"
40769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40771    new_path="$unix_path"
40772  fi
40773
40774
40775    new_path=`$WHICH "$new_path" 2> /dev/null`
40776    # bat and cmd files are not always considered executable in MSYS causing which
40777    # to not find them
40778    if test "x$new_path" = x \
40779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40781      new_path="$path"
40782
40783  windows_path="$new_path"
40784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40785    unix_path=`$CYGPATH -u "$windows_path"`
40786    new_path="$unix_path"
40787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40789    new_path="$unix_path"
40790  fi
40791
40792    fi
40793
40794    if test "x$new_path" = x; then
40795      # It's still not found. Now this is an unrecoverable error.
40796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40797$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40798      has_space=`$ECHO "$complete" | $GREP " "`
40799      if test "x$has_space" != x; then
40800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40802      fi
40803      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40804    fi
40805  fi
40806
40807  # Now new_path has a complete unix path to the binary
40808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40809    # Keep paths in /bin as-is, but remove trailing .exe if any
40810    new_path="${new_path/%.exe/}"
40811    # Do not save /bin paths to all_fixpath_prefixes!
40812  else
40813    # Not in mixed or Windows style, start by that.
40814    new_path=`cmd //c echo $new_path`
40815
40816  input_path="$new_path"
40817  # Check if we need to convert this using DOS-style short mode. If the path
40818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40819  # take no chances and rewrite it.
40820  # Note: m4 eats our [], so we need to use [ and ] instead.
40821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40822  if test "x$has_forbidden_chars" != x; then
40823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40825  fi
40826
40827    # Output is in $new_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    # remove trailing .exe if any
40839    new_path="${new_path/%.exe/}"
40840
40841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40843  fi
40844
40845    else
40846      # We're on a unix platform. Hooray! :)
40847      # First separate the path from the arguments. This will split at the first
40848      # space.
40849      complete="$NM"
40850      path="${complete%% *}"
40851      tmp="$complete EOL"
40852      arguments="${tmp#* }"
40853
40854      # Cannot rely on the command "which" here since it doesn't always work.
40855      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40856      if test -z "$is_absolute_path"; then
40857        # Path to executable is not absolute. Find it.
40858        IFS_save="$IFS"
40859        IFS=:
40860        for p in $PATH; do
40861          if test -f "$p/$path" && test -x "$p/$path"; then
40862            new_path="$p/$path"
40863            break
40864          fi
40865        done
40866        IFS="$IFS_save"
40867      else
40868        # This is an absolute path, we can use it without further modifications.
40869        new_path="$path"
40870      fi
40871
40872      if test "x$new_path" = x; then
40873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40874$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40875        has_space=`$ECHO "$complete" | $GREP " "`
40876        if test "x$has_space" != x; then
40877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40879        fi
40880        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40881      fi
40882    fi
40883
40884    # Now join together the path and the arguments once again
40885    if test "x$arguments" != xEOL; then
40886      new_complete="$new_path ${arguments% *}"
40887    else
40888      new_complete="$new_path"
40889    fi
40890
40891    if test "x$complete" != "x$new_complete"; then
40892      NM="$new_complete"
40893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40894$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40895    fi
40896  fi
40897
40898    GNM="$NM"
40899
40900  fi
40901
40902  # objcopy is used for moving debug symbols to separate files when
40903  # full debug symbols are enabled.
40904  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40905
40906
40907  # Publish this variable in the help.
40908
40909
40910  if [ -z "${OBJCOPY+x}" ]; then
40911    # The variable is not set by user, try to locate tool using the code snippet
40912    if test -n "$ac_tool_prefix"; then
40913  for ac_prog in gobjcopy objcopy
40914  do
40915    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40918$as_echo_n "checking for $ac_word... " >&6; }
40919if ${ac_cv_prog_OBJCOPY+:} false; then :
40920  $as_echo_n "(cached) " >&6
40921else
40922  if test -n "$OBJCOPY"; then
40923  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40924else
40925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40926for as_dir in $PATH
40927do
40928  IFS=$as_save_IFS
40929  test -z "$as_dir" && as_dir=.
40930    for ac_exec_ext in '' $ac_executable_extensions; do
40931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40932    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40934    break 2
40935  fi
40936done
40937  done
40938IFS=$as_save_IFS
40939
40940fi
40941fi
40942OBJCOPY=$ac_cv_prog_OBJCOPY
40943if test -n "$OBJCOPY"; then
40944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40945$as_echo "$OBJCOPY" >&6; }
40946else
40947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40948$as_echo "no" >&6; }
40949fi
40950
40951
40952    test -n "$OBJCOPY" && break
40953  done
40954fi
40955if test -z "$OBJCOPY"; then
40956  ac_ct_OBJCOPY=$OBJCOPY
40957  for ac_prog in gobjcopy objcopy
40958do
40959  # Extract the first word of "$ac_prog", so it can be a program name with args.
40960set dummy $ac_prog; ac_word=$2
40961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40962$as_echo_n "checking for $ac_word... " >&6; }
40963if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40964  $as_echo_n "(cached) " >&6
40965else
40966  if test -n "$ac_ct_OBJCOPY"; then
40967  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40968else
40969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40970for as_dir in $PATH
40971do
40972  IFS=$as_save_IFS
40973  test -z "$as_dir" && as_dir=.
40974    for ac_exec_ext in '' $ac_executable_extensions; do
40975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40976    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40978    break 2
40979  fi
40980done
40981  done
40982IFS=$as_save_IFS
40983
40984fi
40985fi
40986ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40987if test -n "$ac_ct_OBJCOPY"; then
40988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40989$as_echo "$ac_ct_OBJCOPY" >&6; }
40990else
40991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40992$as_echo "no" >&6; }
40993fi
40994
40995
40996  test -n "$ac_ct_OBJCOPY" && break
40997done
40998
40999  if test "x$ac_ct_OBJCOPY" = x; then
41000    OBJCOPY=""
41001  else
41002    case $cross_compiling:$ac_tool_warned in
41003yes:)
41004{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41005$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41006ac_tool_warned=yes ;;
41007esac
41008    OBJCOPY=$ac_ct_OBJCOPY
41009  fi
41010fi
41011
41012  else
41013    # The variable is set, but is it from the command line or the environment?
41014
41015    # Try to remove the string !OBJCOPY! from our list.
41016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41018      # If it failed, the variable was not from the command line. Ignore it,
41019      # but warn the user (except for BASH, which is always set by the calling BASH).
41020      if test "xOBJCOPY" != xBASH; then
41021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41022$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41023      fi
41024      # Try to locate tool using the code snippet
41025      if test -n "$ac_tool_prefix"; then
41026  for ac_prog in gobjcopy objcopy
41027  do
41028    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41029set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41031$as_echo_n "checking for $ac_word... " >&6; }
41032if ${ac_cv_prog_OBJCOPY+:} false; then :
41033  $as_echo_n "(cached) " >&6
41034else
41035  if test -n "$OBJCOPY"; then
41036  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41037else
41038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41039for as_dir in $PATH
41040do
41041  IFS=$as_save_IFS
41042  test -z "$as_dir" && as_dir=.
41043    for ac_exec_ext in '' $ac_executable_extensions; do
41044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41045    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41047    break 2
41048  fi
41049done
41050  done
41051IFS=$as_save_IFS
41052
41053fi
41054fi
41055OBJCOPY=$ac_cv_prog_OBJCOPY
41056if test -n "$OBJCOPY"; then
41057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41058$as_echo "$OBJCOPY" >&6; }
41059else
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41061$as_echo "no" >&6; }
41062fi
41063
41064
41065    test -n "$OBJCOPY" && break
41066  done
41067fi
41068if test -z "$OBJCOPY"; then
41069  ac_ct_OBJCOPY=$OBJCOPY
41070  for ac_prog in gobjcopy objcopy
41071do
41072  # Extract the first word of "$ac_prog", so it can be a program name with args.
41073set dummy $ac_prog; ac_word=$2
41074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41075$as_echo_n "checking for $ac_word... " >&6; }
41076if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41077  $as_echo_n "(cached) " >&6
41078else
41079  if test -n "$ac_ct_OBJCOPY"; then
41080  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41081else
41082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41083for as_dir in $PATH
41084do
41085  IFS=$as_save_IFS
41086  test -z "$as_dir" && as_dir=.
41087    for ac_exec_ext in '' $ac_executable_extensions; do
41088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41089    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41091    break 2
41092  fi
41093done
41094  done
41095IFS=$as_save_IFS
41096
41097fi
41098fi
41099ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41100if test -n "$ac_ct_OBJCOPY"; then
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41102$as_echo "$ac_ct_OBJCOPY" >&6; }
41103else
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41105$as_echo "no" >&6; }
41106fi
41107
41108
41109  test -n "$ac_ct_OBJCOPY" && break
41110done
41111
41112  if test "x$ac_ct_OBJCOPY" = x; then
41113    OBJCOPY=""
41114  else
41115    case $cross_compiling:$ac_tool_warned in
41116yes:)
41117{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41118$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41119ac_tool_warned=yes ;;
41120esac
41121    OBJCOPY=$ac_ct_OBJCOPY
41122  fi
41123fi
41124
41125    else
41126      # If it succeeded, then it was overridden by the user. We will use it
41127      # for the tool.
41128
41129      # First remove it from the list of overridden variables, so we can test
41130      # for unknown variables in the end.
41131      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41132
41133      # Check if we try to supply an empty value
41134      if test "x$OBJCOPY" = x; then
41135        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41136$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41138$as_echo_n "checking for OBJCOPY... " >&6; }
41139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41140$as_echo "disabled" >&6; }
41141      else
41142        # Check if the provided tool contains a complete path.
41143        tool_specified="$OBJCOPY"
41144        tool_basename="${tool_specified##*/}"
41145        if test "x$tool_basename" = "x$tool_specified"; then
41146          # A command without a complete path is provided, search $PATH.
41147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41148$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41149          # Extract the first word of "$tool_basename", so it can be a program name with args.
41150set dummy $tool_basename; ac_word=$2
41151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41152$as_echo_n "checking for $ac_word... " >&6; }
41153if ${ac_cv_path_OBJCOPY+:} false; then :
41154  $as_echo_n "(cached) " >&6
41155else
41156  case $OBJCOPY in
41157  [\\/]* | ?:[\\/]*)
41158  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41159  ;;
41160  *)
41161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41162for as_dir in $PATH
41163do
41164  IFS=$as_save_IFS
41165  test -z "$as_dir" && as_dir=.
41166    for ac_exec_ext in '' $ac_executable_extensions; do
41167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41168    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41170    break 2
41171  fi
41172done
41173  done
41174IFS=$as_save_IFS
41175
41176  ;;
41177esac
41178fi
41179OBJCOPY=$ac_cv_path_OBJCOPY
41180if test -n "$OBJCOPY"; then
41181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41182$as_echo "$OBJCOPY" >&6; }
41183else
41184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41185$as_echo "no" >&6; }
41186fi
41187
41188
41189          if test "x$OBJCOPY" = x; then
41190            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41191          fi
41192        else
41193          # Otherwise we believe it is a complete path. Use it as it is.
41194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41195$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41196          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41197$as_echo_n "checking for OBJCOPY... " >&6; }
41198          if test ! -x "$tool_specified"; then
41199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41200$as_echo "not found" >&6; }
41201            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41202          fi
41203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41204$as_echo "$tool_specified" >&6; }
41205        fi
41206      fi
41207    fi
41208
41209  fi
41210
41211
41212    # Only call fixup if objcopy was found.
41213    if test -n "$OBJCOPY"; then
41214
41215  # Only process if variable expands to non-empty
41216
41217  if test "x$OBJCOPY" != x; then
41218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41219
41220  # First separate the path from the arguments. This will split at the first
41221  # space.
41222  complete="$OBJCOPY"
41223  path="${complete%% *}"
41224  tmp="$complete EOL"
41225  arguments="${tmp#* }"
41226
41227  # Input might be given as Windows format, start by converting to
41228  # unix format.
41229  new_path=`$CYGPATH -u "$path"`
41230
41231  # Now try to locate executable using which
41232  new_path=`$WHICH "$new_path" 2> /dev/null`
41233  # bat and cmd files are not always considered executable in cygwin causing which
41234  # to not find them
41235  if test "x$new_path" = x \
41236      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41237      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41238    new_path=`$CYGPATH -u "$path"`
41239  fi
41240  if test "x$new_path" = x; then
41241    # Oops. Which didn't find the executable.
41242    # The splitting of arguments from the executable at a space might have been incorrect,
41243    # since paths with space are more likely in Windows. Give it another try with the whole
41244    # argument.
41245    path="$complete"
41246    arguments="EOL"
41247    new_path=`$CYGPATH -u "$path"`
41248    new_path=`$WHICH "$new_path" 2> /dev/null`
41249    # bat and cmd files are not always considered executable in cygwin causing which
41250    # to not find them
41251    if test "x$new_path" = x \
41252        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41253        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41254      new_path=`$CYGPATH -u "$path"`
41255    fi
41256    if test "x$new_path" = x; then
41257      # It's still not found. Now this is an unrecoverable error.
41258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41259$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41260      has_space=`$ECHO "$complete" | $GREP " "`
41261      if test "x$has_space" != x; then
41262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41264      fi
41265      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41266    fi
41267  fi
41268
41269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41272  # "foo.exe" is OK but "foo" is an error.
41273  #
41274  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41275  # It is also a way to make sure we got the proper file name for the real test later on.
41276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41277  if test "x$test_shortpath" = x; then
41278    # Short path failed, file does not exist as specified.
41279    # Try adding .exe or .cmd
41280    if test -f "${new_path}.exe"; then
41281      input_to_shortpath="${new_path}.exe"
41282    elif test -f "${new_path}.cmd"; then
41283      input_to_shortpath="${new_path}.cmd"
41284    else
41285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41286$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41287      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41288$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41289      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41290    fi
41291  else
41292    input_to_shortpath="$new_path"
41293  fi
41294
41295  # Call helper function which possibly converts this using DOS-style short mode.
41296  # If so, the updated path is stored in $new_path.
41297  new_path="$input_to_shortpath"
41298
41299  input_path="$input_to_shortpath"
41300  # Check if we need to convert this using DOS-style short mode. If the path
41301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41302  # take no chances and rewrite it.
41303  # Note: m4 eats our [], so we need to use [ and ] instead.
41304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41305  if test "x$has_forbidden_chars" != x; then
41306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41310      # Going to short mode and back again did indeed matter. Since short mode is
41311      # case insensitive, let's make it lowercase to improve readability.
41312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41313      # Now convert it back to Unix-style (cygpath)
41314      input_path=`$CYGPATH -u "$shortmode_path"`
41315      new_path="$input_path"
41316    fi
41317  fi
41318
41319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41320  if test "x$test_cygdrive_prefix" = x; then
41321    # As a simple fix, exclude /usr/bin since it's not a real path.
41322    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41324      # a path prefixed by /cygdrive for fixpath to work.
41325      new_path="$CYGWIN_ROOT_PATH$input_path"
41326    fi
41327  fi
41328
41329  # remove trailing .exe if any
41330  new_path="${new_path/%.exe/}"
41331
41332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41333
41334  # First separate the path from the arguments. This will split at the first
41335  # space.
41336  complete="$OBJCOPY"
41337  path="${complete%% *}"
41338  tmp="$complete EOL"
41339  arguments="${tmp#* }"
41340
41341  # Input might be given as Windows format, start by converting to
41342  # unix format.
41343  new_path="$path"
41344
41345  windows_path="$new_path"
41346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41347    unix_path=`$CYGPATH -u "$windows_path"`
41348    new_path="$unix_path"
41349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41351    new_path="$unix_path"
41352  fi
41353
41354
41355  # Now try to locate executable using which
41356  new_path=`$WHICH "$new_path" 2> /dev/null`
41357
41358  if test "x$new_path" = x; then
41359    # Oops. Which didn't find the executable.
41360    # The splitting of arguments from the executable at a space might have been incorrect,
41361    # since paths with space are more likely in Windows. Give it another try with the whole
41362    # argument.
41363    path="$complete"
41364    arguments="EOL"
41365    new_path="$path"
41366
41367  windows_path="$new_path"
41368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41369    unix_path=`$CYGPATH -u "$windows_path"`
41370    new_path="$unix_path"
41371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41373    new_path="$unix_path"
41374  fi
41375
41376
41377    new_path=`$WHICH "$new_path" 2> /dev/null`
41378    # bat and cmd files are not always considered executable in MSYS causing which
41379    # to not find them
41380    if test "x$new_path" = x \
41381        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41382        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41383      new_path="$path"
41384
41385  windows_path="$new_path"
41386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41387    unix_path=`$CYGPATH -u "$windows_path"`
41388    new_path="$unix_path"
41389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41391    new_path="$unix_path"
41392  fi
41393
41394    fi
41395
41396    if test "x$new_path" = x; then
41397      # It's still not found. Now this is an unrecoverable error.
41398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41399$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41400      has_space=`$ECHO "$complete" | $GREP " "`
41401      if test "x$has_space" != x; then
41402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41404      fi
41405      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41406    fi
41407  fi
41408
41409  # Now new_path has a complete unix path to the binary
41410  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41411    # Keep paths in /bin as-is, but remove trailing .exe if any
41412    new_path="${new_path/%.exe/}"
41413    # Do not save /bin paths to all_fixpath_prefixes!
41414  else
41415    # Not in mixed or Windows style, start by that.
41416    new_path=`cmd //c echo $new_path`
41417
41418  input_path="$new_path"
41419  # Check if we need to convert this using DOS-style short mode. If the path
41420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41421  # take no chances and rewrite it.
41422  # Note: m4 eats our [], so we need to use [ and ] instead.
41423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41424  if test "x$has_forbidden_chars" != x; then
41425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41427  fi
41428
41429    # Output is in $new_path
41430
41431  windows_path="$new_path"
41432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41433    unix_path=`$CYGPATH -u "$windows_path"`
41434    new_path="$unix_path"
41435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41437    new_path="$unix_path"
41438  fi
41439
41440    # remove trailing .exe if any
41441    new_path="${new_path/%.exe/}"
41442
41443    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41444    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41445  fi
41446
41447    else
41448      # We're on a unix platform. Hooray! :)
41449      # First separate the path from the arguments. This will split at the first
41450      # space.
41451      complete="$OBJCOPY"
41452      path="${complete%% *}"
41453      tmp="$complete EOL"
41454      arguments="${tmp#* }"
41455
41456      # Cannot rely on the command "which" here since it doesn't always work.
41457      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41458      if test -z "$is_absolute_path"; then
41459        # Path to executable is not absolute. Find it.
41460        IFS_save="$IFS"
41461        IFS=:
41462        for p in $PATH; do
41463          if test -f "$p/$path" && test -x "$p/$path"; then
41464            new_path="$p/$path"
41465            break
41466          fi
41467        done
41468        IFS="$IFS_save"
41469      else
41470        # This is an absolute path, we can use it without further modifications.
41471        new_path="$path"
41472      fi
41473
41474      if test "x$new_path" = x; then
41475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41476$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41477        has_space=`$ECHO "$complete" | $GREP " "`
41478        if test "x$has_space" != x; then
41479          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41480$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41481        fi
41482        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41483      fi
41484    fi
41485
41486    # Now join together the path and the arguments once again
41487    if test "x$arguments" != xEOL; then
41488      new_complete="$new_path ${arguments% *}"
41489    else
41490      new_complete="$new_path"
41491    fi
41492
41493    if test "x$complete" != "x$new_complete"; then
41494      OBJCOPY="$new_complete"
41495      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41496$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41497    fi
41498  fi
41499
41500      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41501        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41502        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41503        # - version number is last blank separate word on first line
41504        # - version number formats that have been seen:
41505        #   - <major>.<minor>
41506        #   - <major>.<minor>.<micro>
41507        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41508        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41509         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41510              -e 's/.* //' \
41511              -e '/^[01]\./b bad' \
41512              -e '/^2\./{' \
41513              -e '  s/^2\.//' \
41514              -e '  /^[0-9]$/b bad' \
41515              -e '  /^[0-9]\./b bad' \
41516              -e '  /^1[0-9]$/b bad' \
41517              -e '  /^1[0-9]\./b bad' \
41518              -e '  /^20\./b bad' \
41519              -e '  /^21\.0$/b bad' \
41520              -e '  /^21\.0\./b bad' \
41521              -e '}' \
41522              -e ':good' \
41523              -e 's/.*/VALID_VERSION/p' \
41524              -e 'q' \
41525              -e ':bad' \
41526              -e 's/.*/BAD_VERSION/p' \
41527              -e 'q'`
41528        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41529          OBJCOPY=
41530          { $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
41531$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41532          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41533$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41534          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41535$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41536          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41537$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41538          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41539$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41540        fi
41541      fi
41542    fi
41543  fi
41544
41545
41546
41547  # Publish this variable in the help.
41548
41549
41550  if [ -z "${OBJDUMP+x}" ]; then
41551    # The variable is not set by user, try to locate tool using the code snippet
41552    if test -n "$ac_tool_prefix"; then
41553  for ac_prog in gobjdump objdump
41554  do
41555    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41556set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41558$as_echo_n "checking for $ac_word... " >&6; }
41559if ${ac_cv_prog_OBJDUMP+:} false; then :
41560  $as_echo_n "(cached) " >&6
41561else
41562  if test -n "$OBJDUMP"; then
41563  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41564else
41565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41566for as_dir in $PATH
41567do
41568  IFS=$as_save_IFS
41569  test -z "$as_dir" && as_dir=.
41570    for ac_exec_ext in '' $ac_executable_extensions; do
41571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41572    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41574    break 2
41575  fi
41576done
41577  done
41578IFS=$as_save_IFS
41579
41580fi
41581fi
41582OBJDUMP=$ac_cv_prog_OBJDUMP
41583if test -n "$OBJDUMP"; then
41584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41585$as_echo "$OBJDUMP" >&6; }
41586else
41587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41588$as_echo "no" >&6; }
41589fi
41590
41591
41592    test -n "$OBJDUMP" && break
41593  done
41594fi
41595if test -z "$OBJDUMP"; then
41596  ac_ct_OBJDUMP=$OBJDUMP
41597  for ac_prog in gobjdump objdump
41598do
41599  # Extract the first word of "$ac_prog", so it can be a program name with args.
41600set dummy $ac_prog; ac_word=$2
41601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41602$as_echo_n "checking for $ac_word... " >&6; }
41603if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41604  $as_echo_n "(cached) " >&6
41605else
41606  if test -n "$ac_ct_OBJDUMP"; then
41607  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41608else
41609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41610for as_dir in $PATH
41611do
41612  IFS=$as_save_IFS
41613  test -z "$as_dir" && as_dir=.
41614    for ac_exec_ext in '' $ac_executable_extensions; do
41615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41616    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41618    break 2
41619  fi
41620done
41621  done
41622IFS=$as_save_IFS
41623
41624fi
41625fi
41626ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41627if test -n "$ac_ct_OBJDUMP"; then
41628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41629$as_echo "$ac_ct_OBJDUMP" >&6; }
41630else
41631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41632$as_echo "no" >&6; }
41633fi
41634
41635
41636  test -n "$ac_ct_OBJDUMP" && break
41637done
41638
41639  if test "x$ac_ct_OBJDUMP" = x; then
41640    OBJDUMP=""
41641  else
41642    case $cross_compiling:$ac_tool_warned in
41643yes:)
41644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41646ac_tool_warned=yes ;;
41647esac
41648    OBJDUMP=$ac_ct_OBJDUMP
41649  fi
41650fi
41651
41652  else
41653    # The variable is set, but is it from the command line or the environment?
41654
41655    # Try to remove the string !OBJDUMP! from our list.
41656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41658      # If it failed, the variable was not from the command line. Ignore it,
41659      # but warn the user (except for BASH, which is always set by the calling BASH).
41660      if test "xOBJDUMP" != xBASH; then
41661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41662$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41663      fi
41664      # Try to locate tool using the code snippet
41665      if test -n "$ac_tool_prefix"; then
41666  for ac_prog in gobjdump objdump
41667  do
41668    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41669set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41671$as_echo_n "checking for $ac_word... " >&6; }
41672if ${ac_cv_prog_OBJDUMP+:} false; then :
41673  $as_echo_n "(cached) " >&6
41674else
41675  if test -n "$OBJDUMP"; then
41676  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41677else
41678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41679for as_dir in $PATH
41680do
41681  IFS=$as_save_IFS
41682  test -z "$as_dir" && as_dir=.
41683    for ac_exec_ext in '' $ac_executable_extensions; do
41684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41685    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41687    break 2
41688  fi
41689done
41690  done
41691IFS=$as_save_IFS
41692
41693fi
41694fi
41695OBJDUMP=$ac_cv_prog_OBJDUMP
41696if test -n "$OBJDUMP"; then
41697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41698$as_echo "$OBJDUMP" >&6; }
41699else
41700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41701$as_echo "no" >&6; }
41702fi
41703
41704
41705    test -n "$OBJDUMP" && break
41706  done
41707fi
41708if test -z "$OBJDUMP"; then
41709  ac_ct_OBJDUMP=$OBJDUMP
41710  for ac_prog in gobjdump objdump
41711do
41712  # Extract the first word of "$ac_prog", so it can be a program name with args.
41713set dummy $ac_prog; ac_word=$2
41714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41715$as_echo_n "checking for $ac_word... " >&6; }
41716if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41717  $as_echo_n "(cached) " >&6
41718else
41719  if test -n "$ac_ct_OBJDUMP"; then
41720  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41721else
41722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41723for as_dir in $PATH
41724do
41725  IFS=$as_save_IFS
41726  test -z "$as_dir" && as_dir=.
41727    for ac_exec_ext in '' $ac_executable_extensions; do
41728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41729    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41731    break 2
41732  fi
41733done
41734  done
41735IFS=$as_save_IFS
41736
41737fi
41738fi
41739ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41740if test -n "$ac_ct_OBJDUMP"; then
41741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41742$as_echo "$ac_ct_OBJDUMP" >&6; }
41743else
41744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41745$as_echo "no" >&6; }
41746fi
41747
41748
41749  test -n "$ac_ct_OBJDUMP" && break
41750done
41751
41752  if test "x$ac_ct_OBJDUMP" = x; then
41753    OBJDUMP=""
41754  else
41755    case $cross_compiling:$ac_tool_warned in
41756yes:)
41757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41759ac_tool_warned=yes ;;
41760esac
41761    OBJDUMP=$ac_ct_OBJDUMP
41762  fi
41763fi
41764
41765    else
41766      # If it succeeded, then it was overridden by the user. We will use it
41767      # for the tool.
41768
41769      # First remove it from the list of overridden variables, so we can test
41770      # for unknown variables in the end.
41771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41772
41773      # Check if we try to supply an empty value
41774      if test "x$OBJDUMP" = x; then
41775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41776$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41778$as_echo_n "checking for OBJDUMP... " >&6; }
41779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41780$as_echo "disabled" >&6; }
41781      else
41782        # Check if the provided tool contains a complete path.
41783        tool_specified="$OBJDUMP"
41784        tool_basename="${tool_specified##*/}"
41785        if test "x$tool_basename" = "x$tool_specified"; then
41786          # A command without a complete path is provided, search $PATH.
41787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41788$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41789          # Extract the first word of "$tool_basename", so it can be a program name with args.
41790set dummy $tool_basename; ac_word=$2
41791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41792$as_echo_n "checking for $ac_word... " >&6; }
41793if ${ac_cv_path_OBJDUMP+:} false; then :
41794  $as_echo_n "(cached) " >&6
41795else
41796  case $OBJDUMP in
41797  [\\/]* | ?:[\\/]*)
41798  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41799  ;;
41800  *)
41801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41802for as_dir in $PATH
41803do
41804  IFS=$as_save_IFS
41805  test -z "$as_dir" && as_dir=.
41806    for ac_exec_ext in '' $ac_executable_extensions; do
41807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41808    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41810    break 2
41811  fi
41812done
41813  done
41814IFS=$as_save_IFS
41815
41816  ;;
41817esac
41818fi
41819OBJDUMP=$ac_cv_path_OBJDUMP
41820if test -n "$OBJDUMP"; then
41821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41822$as_echo "$OBJDUMP" >&6; }
41823else
41824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41825$as_echo "no" >&6; }
41826fi
41827
41828
41829          if test "x$OBJDUMP" = x; then
41830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41831          fi
41832        else
41833          # Otherwise we believe it is a complete path. Use it as it is.
41834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41835$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41837$as_echo_n "checking for OBJDUMP... " >&6; }
41838          if test ! -x "$tool_specified"; then
41839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41840$as_echo "not found" >&6; }
41841            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41842          fi
41843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41844$as_echo "$tool_specified" >&6; }
41845        fi
41846      fi
41847    fi
41848
41849  fi
41850
41851
41852  if test "x$OBJDUMP" != x; then
41853    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41854    # bails if argument is missing.
41855
41856  # Only process if variable expands to non-empty
41857
41858  if test "x$OBJDUMP" != x; then
41859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41860
41861  # First separate the path from the arguments. This will split at the first
41862  # space.
41863  complete="$OBJDUMP"
41864  path="${complete%% *}"
41865  tmp="$complete EOL"
41866  arguments="${tmp#* }"
41867
41868  # Input might be given as Windows format, start by converting to
41869  # unix format.
41870  new_path=`$CYGPATH -u "$path"`
41871
41872  # Now try to locate executable using which
41873  new_path=`$WHICH "$new_path" 2> /dev/null`
41874  # bat and cmd files are not always considered executable in cygwin causing which
41875  # to not find them
41876  if test "x$new_path" = x \
41877      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41878      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41879    new_path=`$CYGPATH -u "$path"`
41880  fi
41881  if test "x$new_path" = x; then
41882    # Oops. Which didn't find the executable.
41883    # The splitting of arguments from the executable at a space might have been incorrect,
41884    # since paths with space are more likely in Windows. Give it another try with the whole
41885    # argument.
41886    path="$complete"
41887    arguments="EOL"
41888    new_path=`$CYGPATH -u "$path"`
41889    new_path=`$WHICH "$new_path" 2> /dev/null`
41890    # bat and cmd files are not always considered executable in cygwin causing which
41891    # to not find them
41892    if test "x$new_path" = x \
41893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41895      new_path=`$CYGPATH -u "$path"`
41896    fi
41897    if test "x$new_path" = x; then
41898      # It's still not found. Now this is an unrecoverable error.
41899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41900$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41901      has_space=`$ECHO "$complete" | $GREP " "`
41902      if test "x$has_space" != x; then
41903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41905      fi
41906      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41907    fi
41908  fi
41909
41910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41913  # "foo.exe" is OK but "foo" is an error.
41914  #
41915  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41916  # It is also a way to make sure we got the proper file name for the real test later on.
41917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41918  if test "x$test_shortpath" = x; then
41919    # Short path failed, file does not exist as specified.
41920    # Try adding .exe or .cmd
41921    if test -f "${new_path}.exe"; then
41922      input_to_shortpath="${new_path}.exe"
41923    elif test -f "${new_path}.cmd"; then
41924      input_to_shortpath="${new_path}.cmd"
41925    else
41926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41927$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41928      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41929$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41930      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41931    fi
41932  else
41933    input_to_shortpath="$new_path"
41934  fi
41935
41936  # Call helper function which possibly converts this using DOS-style short mode.
41937  # If so, the updated path is stored in $new_path.
41938  new_path="$input_to_shortpath"
41939
41940  input_path="$input_to_shortpath"
41941  # Check if we need to convert this using DOS-style short mode. If the path
41942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41943  # take no chances and rewrite it.
41944  # Note: m4 eats our [], so we need to use [ and ] instead.
41945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41946  if test "x$has_forbidden_chars" != x; then
41947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41951      # Going to short mode and back again did indeed matter. Since short mode is
41952      # case insensitive, let's make it lowercase to improve readability.
41953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41954      # Now convert it back to Unix-style (cygpath)
41955      input_path=`$CYGPATH -u "$shortmode_path"`
41956      new_path="$input_path"
41957    fi
41958  fi
41959
41960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41961  if test "x$test_cygdrive_prefix" = x; then
41962    # As a simple fix, exclude /usr/bin since it's not a real path.
41963    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41965      # a path prefixed by /cygdrive for fixpath to work.
41966      new_path="$CYGWIN_ROOT_PATH$input_path"
41967    fi
41968  fi
41969
41970  # remove trailing .exe if any
41971  new_path="${new_path/%.exe/}"
41972
41973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41974
41975  # First separate the path from the arguments. This will split at the first
41976  # space.
41977  complete="$OBJDUMP"
41978  path="${complete%% *}"
41979  tmp="$complete EOL"
41980  arguments="${tmp#* }"
41981
41982  # Input might be given as Windows format, start by converting to
41983  # unix format.
41984  new_path="$path"
41985
41986  windows_path="$new_path"
41987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41988    unix_path=`$CYGPATH -u "$windows_path"`
41989    new_path="$unix_path"
41990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41992    new_path="$unix_path"
41993  fi
41994
41995
41996  # Now try to locate executable using which
41997  new_path=`$WHICH "$new_path" 2> /dev/null`
41998
41999  if test "x$new_path" = x; then
42000    # Oops. Which didn't find the executable.
42001    # The splitting of arguments from the executable at a space might have been incorrect,
42002    # since paths with space are more likely in Windows. Give it another try with the whole
42003    # argument.
42004    path="$complete"
42005    arguments="EOL"
42006    new_path="$path"
42007
42008  windows_path="$new_path"
42009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42010    unix_path=`$CYGPATH -u "$windows_path"`
42011    new_path="$unix_path"
42012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42014    new_path="$unix_path"
42015  fi
42016
42017
42018    new_path=`$WHICH "$new_path" 2> /dev/null`
42019    # bat and cmd files are not always considered executable in MSYS causing which
42020    # to not find them
42021    if test "x$new_path" = x \
42022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42024      new_path="$path"
42025
42026  windows_path="$new_path"
42027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42028    unix_path=`$CYGPATH -u "$windows_path"`
42029    new_path="$unix_path"
42030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42032    new_path="$unix_path"
42033  fi
42034
42035    fi
42036
42037    if test "x$new_path" = x; then
42038      # It's still not found. Now this is an unrecoverable error.
42039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42040$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42041      has_space=`$ECHO "$complete" | $GREP " "`
42042      if test "x$has_space" != x; then
42043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42045      fi
42046      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42047    fi
42048  fi
42049
42050  # Now new_path has a complete unix path to the binary
42051  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42052    # Keep paths in /bin as-is, but remove trailing .exe if any
42053    new_path="${new_path/%.exe/}"
42054    # Do not save /bin paths to all_fixpath_prefixes!
42055  else
42056    # Not in mixed or Windows style, start by that.
42057    new_path=`cmd //c echo $new_path`
42058
42059  input_path="$new_path"
42060  # Check if we need to convert this using DOS-style short mode. If the path
42061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42062  # take no chances and rewrite it.
42063  # Note: m4 eats our [], so we need to use [ and ] instead.
42064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42065  if test "x$has_forbidden_chars" != x; then
42066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42068  fi
42069
42070    # Output is in $new_path
42071
42072  windows_path="$new_path"
42073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42074    unix_path=`$CYGPATH -u "$windows_path"`
42075    new_path="$unix_path"
42076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42078    new_path="$unix_path"
42079  fi
42080
42081    # remove trailing .exe if any
42082    new_path="${new_path/%.exe/}"
42083
42084    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42085    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42086  fi
42087
42088    else
42089      # We're on a unix platform. Hooray! :)
42090      # First separate the path from the arguments. This will split at the first
42091      # space.
42092      complete="$OBJDUMP"
42093      path="${complete%% *}"
42094      tmp="$complete EOL"
42095      arguments="${tmp#* }"
42096
42097      # Cannot rely on the command "which" here since it doesn't always work.
42098      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42099      if test -z "$is_absolute_path"; then
42100        # Path to executable is not absolute. Find it.
42101        IFS_save="$IFS"
42102        IFS=:
42103        for p in $PATH; do
42104          if test -f "$p/$path" && test -x "$p/$path"; then
42105            new_path="$p/$path"
42106            break
42107          fi
42108        done
42109        IFS="$IFS_save"
42110      else
42111        # This is an absolute path, we can use it without further modifications.
42112        new_path="$path"
42113      fi
42114
42115      if test "x$new_path" = x; then
42116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42117$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42118        has_space=`$ECHO "$complete" | $GREP " "`
42119        if test "x$has_space" != x; then
42120          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42121$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42122        fi
42123        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42124      fi
42125    fi
42126
42127    # Now join together the path and the arguments once again
42128    if test "x$arguments" != xEOL; then
42129      new_complete="$new_path ${arguments% *}"
42130    else
42131      new_complete="$new_path"
42132    fi
42133
42134    if test "x$complete" != "x$new_complete"; then
42135      OBJDUMP="$new_complete"
42136      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42137$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42138    fi
42139  fi
42140
42141  fi
42142
42143
42144  # Restore old path.
42145  PATH="$OLD_PATH"
42146
42147  # Restore the flags to the user specified values.
42148  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42149  CFLAGS="$ORG_CFLAGS"
42150  CXXFLAGS="$ORG_CXXFLAGS"
42151
42152
42153# Finally do some processing after the detection phase
42154
42155  if test "x$COMPILE_TYPE" = "xcross"; then
42156    # Now we need to find a C/C++ compiler that can build executables for the
42157    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42158    # used once. Also, we need to do this without adding a tools dir to the
42159    # path, otherwise we might pick up cross-compilers which don't use standard
42160    # naming.
42161
42162    OLDPATH="$PATH"
42163
42164
42165# Check whether --with-build-devkit was given.
42166if test "${with_build_devkit+set}" = set; then :
42167  withval=$with_build_devkit;
42168fi
42169
42170    if test "x$with_build_devkit" = "xyes"; then
42171      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42172    elif test -n "$with_build_devkit"; then
42173      if test ! -d "$with_build_devkit"; then
42174        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42175      else
42176
42177  # Only process if variable expands to non-empty
42178
42179  if test "x$with_build_devkit" != x; then
42180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42181
42182  # Input might be given as Windows format, start by converting to
42183  # unix format.
42184  path="$with_build_devkit"
42185  new_path=`$CYGPATH -u "$path"`
42186
42187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42190  # "foo.exe" is OK but "foo" is an error.
42191  #
42192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42193  # It is also a way to make sure we got the proper file name for the real test later on.
42194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42195  if test "x$test_shortpath" = x; then
42196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42197$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42198    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42199  fi
42200
42201  # Call helper function which possibly converts this using DOS-style short mode.
42202  # If so, the updated path is stored in $new_path.
42203
42204  input_path="$new_path"
42205  # Check if we need to convert this using DOS-style short mode. If the path
42206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42207  # take no chances and rewrite it.
42208  # Note: m4 eats our [], so we need to use [ and ] instead.
42209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42210  if test "x$has_forbidden_chars" != x; then
42211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42215      # Going to short mode and back again did indeed matter. Since short mode is
42216      # case insensitive, let's make it lowercase to improve readability.
42217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42218      # Now convert it back to Unix-style (cygpath)
42219      input_path=`$CYGPATH -u "$shortmode_path"`
42220      new_path="$input_path"
42221    fi
42222  fi
42223
42224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42225  if test "x$test_cygdrive_prefix" = x; then
42226    # As a simple fix, exclude /usr/bin since it's not a real path.
42227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42229      # a path prefixed by /cygdrive for fixpath to work.
42230      new_path="$CYGWIN_ROOT_PATH$input_path"
42231    fi
42232  fi
42233
42234
42235  if test "x$path" != "x$new_path"; then
42236    with_build_devkit="$new_path"
42237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42238$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42239  fi
42240
42241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42242
42243  path="$with_build_devkit"
42244  has_colon=`$ECHO $path | $GREP ^.:`
42245  new_path="$path"
42246  if test "x$has_colon" = x; then
42247    # Not in mixed or Windows style, start by that.
42248    new_path=`cmd //c echo $path`
42249  fi
42250
42251
42252  input_path="$new_path"
42253  # Check if we need to convert this using DOS-style short mode. If the path
42254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42255  # take no chances and rewrite it.
42256  # Note: m4 eats our [], so we need to use [ and ] instead.
42257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42258  if test "x$has_forbidden_chars" != x; then
42259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42261  fi
42262
42263
42264  windows_path="$new_path"
42265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42266    unix_path=`$CYGPATH -u "$windows_path"`
42267    new_path="$unix_path"
42268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42270    new_path="$unix_path"
42271  fi
42272
42273  if test "x$path" != "x$new_path"; then
42274    with_build_devkit="$new_path"
42275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42276$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42277  fi
42278
42279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42281
42282    else
42283      # We're on a unix platform. Hooray! :)
42284      path="$with_build_devkit"
42285      has_space=`$ECHO "$path" | $GREP " "`
42286      if test "x$has_space" != x; then
42287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42288$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42290      fi
42291
42292      # Use eval to expand a potential ~
42293      eval path="$path"
42294      if test ! -f "$path" && test ! -d "$path"; then
42295        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42296      fi
42297
42298      if test -d "$path"; then
42299        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42300      else
42301        dir="`$DIRNAME "$path"`"
42302        base="`$BASENAME "$path"`"
42303        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
42304      fi
42305    fi
42306  fi
42307
42308        BUILD_DEVKIT_ROOT="$with_build_devkit"
42309        # Check for a meta data info file in the root of the devkit
42310        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42311          # Process devkit.info so that existing devkit variables are not
42312          # modified by this
42313          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42314              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42315              -e "s/\$host/\$build/g" \
42316              $BUILD_DEVKIT_ROOT/devkit.info \
42317              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42318          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42319          # This potentially sets the following:
42320          # A descriptive name of the devkit
42321
42322  if test "x$BUILD_DEVKIT_NAME" = x; then
42323    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42324  fi
42325
42326          # Corresponds to --with-extra-path
42327
42328  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42329    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42330  fi
42331
42332          # Corresponds to --with-toolchain-path
42333
42334  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42335    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42336  fi
42337
42338          # Corresponds to --with-sysroot
42339
42340  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42341    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42342  fi
42343
42344          # Skip the Window specific parts
42345        fi
42346
42347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42348$as_echo_n "checking for build platform devkit... " >&6; }
42349        if test "x$BUILD_DEVKIT_NAME" != x; then
42350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42351$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42352        else
42353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42354$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42355        fi
42356
42357        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42358
42359  if test "x$BUILD_SYSROOT" != "x"; then
42360    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42361      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42362        # Solaris Studio does not have a concept of sysroot. Instead we must
42363        # make sure the default include and lib dirs are appended to each
42364        # compile and link command line.
42365        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42366        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42367            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42368            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42369      fi
42370    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42371      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42372      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42373    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42374      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42375      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42376    fi
42377    # Propagate the sysroot args to hotspot
42378    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42379    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42380    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42381    # The global CFLAGS and LDFLAGS variables need these for configure to function
42382    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42383    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42384    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42385    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42386  fi
42387
42388  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42389    # We also need -iframework<path>/System/Library/Frameworks
42390    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42391    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42392    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42393    # set this here so it doesn't have to be peppered throughout the forest
42394    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42395    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42396  fi
42397
42398
42399
42400
42401
42402         # Fallback default of just /bin if DEVKIT_PATH is not defined
42403        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42404          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42405        fi
42406        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42407      fi
42408    fi
42409
42410    # FIXME: we should list the discovered compilers as an exclude pattern!
42411    # If we do that, we can do this detection before POST_DETECTION, and still
42412    # find the build compilers in the tools dir, if needed.
42413
42414
42415
42416  # Publish this variable in the help.
42417
42418
42419  if [ -z "${BUILD_CC+x}" ]; then
42420    # The variable is not set by user, try to locate tool using the code snippet
42421    for ac_prog in cl cc gcc
42422do
42423  # Extract the first word of "$ac_prog", so it can be a program name with args.
42424set dummy $ac_prog; ac_word=$2
42425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42426$as_echo_n "checking for $ac_word... " >&6; }
42427if ${ac_cv_path_BUILD_CC+:} false; then :
42428  $as_echo_n "(cached) " >&6
42429else
42430  case $BUILD_CC in
42431  [\\/]* | ?:[\\/]*)
42432  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42433  ;;
42434  *)
42435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42436for as_dir in $PATH
42437do
42438  IFS=$as_save_IFS
42439  test -z "$as_dir" && as_dir=.
42440    for ac_exec_ext in '' $ac_executable_extensions; do
42441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42442    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42444    break 2
42445  fi
42446done
42447  done
42448IFS=$as_save_IFS
42449
42450  ;;
42451esac
42452fi
42453BUILD_CC=$ac_cv_path_BUILD_CC
42454if test -n "$BUILD_CC"; then
42455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42456$as_echo "$BUILD_CC" >&6; }
42457else
42458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42459$as_echo "no" >&6; }
42460fi
42461
42462
42463  test -n "$BUILD_CC" && break
42464done
42465
42466  else
42467    # The variable is set, but is it from the command line or the environment?
42468
42469    # Try to remove the string !BUILD_CC! from our list.
42470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42472      # If it failed, the variable was not from the command line. Ignore it,
42473      # but warn the user (except for BASH, which is always set by the calling BASH).
42474      if test "xBUILD_CC" != xBASH; then
42475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42476$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42477      fi
42478      # Try to locate tool using the code snippet
42479      for ac_prog in cl cc gcc
42480do
42481  # Extract the first word of "$ac_prog", so it can be a program name with args.
42482set dummy $ac_prog; ac_word=$2
42483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42484$as_echo_n "checking for $ac_word... " >&6; }
42485if ${ac_cv_path_BUILD_CC+:} false; then :
42486  $as_echo_n "(cached) " >&6
42487else
42488  case $BUILD_CC in
42489  [\\/]* | ?:[\\/]*)
42490  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42491  ;;
42492  *)
42493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42494for as_dir in $PATH
42495do
42496  IFS=$as_save_IFS
42497  test -z "$as_dir" && as_dir=.
42498    for ac_exec_ext in '' $ac_executable_extensions; do
42499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42500    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42502    break 2
42503  fi
42504done
42505  done
42506IFS=$as_save_IFS
42507
42508  ;;
42509esac
42510fi
42511BUILD_CC=$ac_cv_path_BUILD_CC
42512if test -n "$BUILD_CC"; then
42513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42514$as_echo "$BUILD_CC" >&6; }
42515else
42516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42517$as_echo "no" >&6; }
42518fi
42519
42520
42521  test -n "$BUILD_CC" && break
42522done
42523
42524    else
42525      # If it succeeded, then it was overridden by the user. We will use it
42526      # for the tool.
42527
42528      # First remove it from the list of overridden variables, so we can test
42529      # for unknown variables in the end.
42530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42531
42532      # Check if we try to supply an empty value
42533      if test "x$BUILD_CC" = x; then
42534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42535$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42537$as_echo_n "checking for BUILD_CC... " >&6; }
42538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42539$as_echo "disabled" >&6; }
42540      else
42541        # Check if the provided tool contains a complete path.
42542        tool_specified="$BUILD_CC"
42543        tool_basename="${tool_specified##*/}"
42544        if test "x$tool_basename" = "x$tool_specified"; then
42545          # A command without a complete path is provided, search $PATH.
42546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42547$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42548          # Extract the first word of "$tool_basename", so it can be a program name with args.
42549set dummy $tool_basename; ac_word=$2
42550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42551$as_echo_n "checking for $ac_word... " >&6; }
42552if ${ac_cv_path_BUILD_CC+:} false; then :
42553  $as_echo_n "(cached) " >&6
42554else
42555  case $BUILD_CC in
42556  [\\/]* | ?:[\\/]*)
42557  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42558  ;;
42559  *)
42560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42561for as_dir in $PATH
42562do
42563  IFS=$as_save_IFS
42564  test -z "$as_dir" && as_dir=.
42565    for ac_exec_ext in '' $ac_executable_extensions; do
42566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42567    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42569    break 2
42570  fi
42571done
42572  done
42573IFS=$as_save_IFS
42574
42575  ;;
42576esac
42577fi
42578BUILD_CC=$ac_cv_path_BUILD_CC
42579if test -n "$BUILD_CC"; then
42580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42581$as_echo "$BUILD_CC" >&6; }
42582else
42583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42584$as_echo "no" >&6; }
42585fi
42586
42587
42588          if test "x$BUILD_CC" = x; then
42589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42590          fi
42591        else
42592          # Otherwise we believe it is a complete path. Use it as it is.
42593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42594$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42596$as_echo_n "checking for BUILD_CC... " >&6; }
42597          if test ! -x "$tool_specified"; then
42598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42599$as_echo "not found" >&6; }
42600            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42601          fi
42602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42603$as_echo "$tool_specified" >&6; }
42604        fi
42605      fi
42606    fi
42607
42608  fi
42609
42610
42611
42612  if test "x$BUILD_CC" = x; then
42613    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42614  fi
42615
42616
42617
42618  # Only process if variable expands to non-empty
42619
42620  if test "x$BUILD_CC" != x; then
42621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42622
42623  # First separate the path from the arguments. This will split at the first
42624  # space.
42625  complete="$BUILD_CC"
42626  path="${complete%% *}"
42627  tmp="$complete EOL"
42628  arguments="${tmp#* }"
42629
42630  # Input might be given as Windows format, start by converting to
42631  # unix format.
42632  new_path=`$CYGPATH -u "$path"`
42633
42634  # Now try to locate executable using which
42635  new_path=`$WHICH "$new_path" 2> /dev/null`
42636  # bat and cmd files are not always considered executable in cygwin causing which
42637  # to not find them
42638  if test "x$new_path" = x \
42639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42641    new_path=`$CYGPATH -u "$path"`
42642  fi
42643  if test "x$new_path" = x; then
42644    # Oops. Which didn't find the executable.
42645    # The splitting of arguments from the executable at a space might have been incorrect,
42646    # since paths with space are more likely in Windows. Give it another try with the whole
42647    # argument.
42648    path="$complete"
42649    arguments="EOL"
42650    new_path=`$CYGPATH -u "$path"`
42651    new_path=`$WHICH "$new_path" 2> /dev/null`
42652    # bat and cmd files are not always considered executable in cygwin causing which
42653    # to not find them
42654    if test "x$new_path" = x \
42655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42657      new_path=`$CYGPATH -u "$path"`
42658    fi
42659    if test "x$new_path" = x; then
42660      # It's still not found. Now this is an unrecoverable error.
42661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42662$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42663      has_space=`$ECHO "$complete" | $GREP " "`
42664      if test "x$has_space" != x; then
42665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42667      fi
42668      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42669    fi
42670  fi
42671
42672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42675  # "foo.exe" is OK but "foo" is an error.
42676  #
42677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42678  # It is also a way to make sure we got the proper file name for the real test later on.
42679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42680  if test "x$test_shortpath" = x; then
42681    # Short path failed, file does not exist as specified.
42682    # Try adding .exe or .cmd
42683    if test -f "${new_path}.exe"; then
42684      input_to_shortpath="${new_path}.exe"
42685    elif test -f "${new_path}.cmd"; then
42686      input_to_shortpath="${new_path}.cmd"
42687    else
42688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42689$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42692      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42693    fi
42694  else
42695    input_to_shortpath="$new_path"
42696  fi
42697
42698  # Call helper function which possibly converts this using DOS-style short mode.
42699  # If so, the updated path is stored in $new_path.
42700  new_path="$input_to_shortpath"
42701
42702  input_path="$input_to_shortpath"
42703  # Check if we need to convert this using DOS-style short mode. If the path
42704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42705  # take no chances and rewrite it.
42706  # Note: m4 eats our [], so we need to use [ and ] instead.
42707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42708  if test "x$has_forbidden_chars" != x; then
42709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42713      # Going to short mode and back again did indeed matter. Since short mode is
42714      # case insensitive, let's make it lowercase to improve readability.
42715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42716      # Now convert it back to Unix-style (cygpath)
42717      input_path=`$CYGPATH -u "$shortmode_path"`
42718      new_path="$input_path"
42719    fi
42720  fi
42721
42722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42723  if test "x$test_cygdrive_prefix" = x; then
42724    # As a simple fix, exclude /usr/bin since it's not a real path.
42725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42727      # a path prefixed by /cygdrive for fixpath to work.
42728      new_path="$CYGWIN_ROOT_PATH$input_path"
42729    fi
42730  fi
42731
42732  # remove trailing .exe if any
42733  new_path="${new_path/%.exe/}"
42734
42735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42736
42737  # First separate the path from the arguments. This will split at the first
42738  # space.
42739  complete="$BUILD_CC"
42740  path="${complete%% *}"
42741  tmp="$complete EOL"
42742  arguments="${tmp#* }"
42743
42744  # Input might be given as Windows format, start by converting to
42745  # unix format.
42746  new_path="$path"
42747
42748  windows_path="$new_path"
42749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42750    unix_path=`$CYGPATH -u "$windows_path"`
42751    new_path="$unix_path"
42752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42754    new_path="$unix_path"
42755  fi
42756
42757
42758  # Now try to locate executable using which
42759  new_path=`$WHICH "$new_path" 2> /dev/null`
42760
42761  if test "x$new_path" = x; then
42762    # Oops. Which didn't find the executable.
42763    # The splitting of arguments from the executable at a space might have been incorrect,
42764    # since paths with space are more likely in Windows. Give it another try with the whole
42765    # argument.
42766    path="$complete"
42767    arguments="EOL"
42768    new_path="$path"
42769
42770  windows_path="$new_path"
42771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42772    unix_path=`$CYGPATH -u "$windows_path"`
42773    new_path="$unix_path"
42774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42776    new_path="$unix_path"
42777  fi
42778
42779
42780    new_path=`$WHICH "$new_path" 2> /dev/null`
42781    # bat and cmd files are not always considered executable in MSYS causing which
42782    # to not find them
42783    if test "x$new_path" = x \
42784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42786      new_path="$path"
42787
42788  windows_path="$new_path"
42789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42790    unix_path=`$CYGPATH -u "$windows_path"`
42791    new_path="$unix_path"
42792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42794    new_path="$unix_path"
42795  fi
42796
42797    fi
42798
42799    if test "x$new_path" = x; then
42800      # It's still not found. Now this is an unrecoverable error.
42801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42802$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42803      has_space=`$ECHO "$complete" | $GREP " "`
42804      if test "x$has_space" != x; then
42805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42807      fi
42808      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42809    fi
42810  fi
42811
42812  # Now new_path has a complete unix path to the binary
42813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42814    # Keep paths in /bin as-is, but remove trailing .exe if any
42815    new_path="${new_path/%.exe/}"
42816    # Do not save /bin paths to all_fixpath_prefixes!
42817  else
42818    # Not in mixed or Windows style, start by that.
42819    new_path=`cmd //c echo $new_path`
42820
42821  input_path="$new_path"
42822  # Check if we need to convert this using DOS-style short mode. If the path
42823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42824  # take no chances and rewrite it.
42825  # Note: m4 eats our [], so we need to use [ and ] instead.
42826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42827  if test "x$has_forbidden_chars" != x; then
42828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42830  fi
42831
42832    # Output is in $new_path
42833
42834  windows_path="$new_path"
42835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42836    unix_path=`$CYGPATH -u "$windows_path"`
42837    new_path="$unix_path"
42838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42840    new_path="$unix_path"
42841  fi
42842
42843    # remove trailing .exe if any
42844    new_path="${new_path/%.exe/}"
42845
42846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42848  fi
42849
42850    else
42851      # We're on a unix platform. Hooray! :)
42852      # First separate the path from the arguments. This will split at the first
42853      # space.
42854      complete="$BUILD_CC"
42855      path="${complete%% *}"
42856      tmp="$complete EOL"
42857      arguments="${tmp#* }"
42858
42859      # Cannot rely on the command "which" here since it doesn't always work.
42860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42861      if test -z "$is_absolute_path"; then
42862        # Path to executable is not absolute. Find it.
42863        IFS_save="$IFS"
42864        IFS=:
42865        for p in $PATH; do
42866          if test -f "$p/$path" && test -x "$p/$path"; then
42867            new_path="$p/$path"
42868            break
42869          fi
42870        done
42871        IFS="$IFS_save"
42872      else
42873        # This is an absolute path, we can use it without further modifications.
42874        new_path="$path"
42875      fi
42876
42877      if test "x$new_path" = x; then
42878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42879$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42880        has_space=`$ECHO "$complete" | $GREP " "`
42881        if test "x$has_space" != x; then
42882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42884        fi
42885        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42886      fi
42887    fi
42888
42889    # Now join together the path and the arguments once again
42890    if test "x$arguments" != xEOL; then
42891      new_complete="$new_path ${arguments% *}"
42892    else
42893      new_complete="$new_path"
42894    fi
42895
42896    if test "x$complete" != "x$new_complete"; then
42897      BUILD_CC="$new_complete"
42898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42899$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42900    fi
42901  fi
42902
42903
42904
42905
42906  # Publish this variable in the help.
42907
42908
42909  if [ -z "${BUILD_CXX+x}" ]; then
42910    # The variable is not set by user, try to locate tool using the code snippet
42911    for ac_prog in cl CC g++
42912do
42913  # Extract the first word of "$ac_prog", so it can be a program name with args.
42914set dummy $ac_prog; ac_word=$2
42915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42916$as_echo_n "checking for $ac_word... " >&6; }
42917if ${ac_cv_path_BUILD_CXX+:} false; then :
42918  $as_echo_n "(cached) " >&6
42919else
42920  case $BUILD_CXX in
42921  [\\/]* | ?:[\\/]*)
42922  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42923  ;;
42924  *)
42925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42926for as_dir in $PATH
42927do
42928  IFS=$as_save_IFS
42929  test -z "$as_dir" && as_dir=.
42930    for ac_exec_ext in '' $ac_executable_extensions; do
42931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42932    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42934    break 2
42935  fi
42936done
42937  done
42938IFS=$as_save_IFS
42939
42940  ;;
42941esac
42942fi
42943BUILD_CXX=$ac_cv_path_BUILD_CXX
42944if test -n "$BUILD_CXX"; then
42945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42946$as_echo "$BUILD_CXX" >&6; }
42947else
42948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42949$as_echo "no" >&6; }
42950fi
42951
42952
42953  test -n "$BUILD_CXX" && break
42954done
42955
42956  else
42957    # The variable is set, but is it from the command line or the environment?
42958
42959    # Try to remove the string !BUILD_CXX! from our list.
42960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42962      # If it failed, the variable was not from the command line. Ignore it,
42963      # but warn the user (except for BASH, which is always set by the calling BASH).
42964      if test "xBUILD_CXX" != xBASH; then
42965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42966$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42967      fi
42968      # Try to locate tool using the code snippet
42969      for ac_prog in cl CC g++
42970do
42971  # Extract the first word of "$ac_prog", so it can be a program name with args.
42972set dummy $ac_prog; ac_word=$2
42973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42974$as_echo_n "checking for $ac_word... " >&6; }
42975if ${ac_cv_path_BUILD_CXX+:} false; then :
42976  $as_echo_n "(cached) " >&6
42977else
42978  case $BUILD_CXX in
42979  [\\/]* | ?:[\\/]*)
42980  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42981  ;;
42982  *)
42983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42984for as_dir in $PATH
42985do
42986  IFS=$as_save_IFS
42987  test -z "$as_dir" && as_dir=.
42988    for ac_exec_ext in '' $ac_executable_extensions; do
42989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42990    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42992    break 2
42993  fi
42994done
42995  done
42996IFS=$as_save_IFS
42997
42998  ;;
42999esac
43000fi
43001BUILD_CXX=$ac_cv_path_BUILD_CXX
43002if test -n "$BUILD_CXX"; then
43003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43004$as_echo "$BUILD_CXX" >&6; }
43005else
43006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43007$as_echo "no" >&6; }
43008fi
43009
43010
43011  test -n "$BUILD_CXX" && break
43012done
43013
43014    else
43015      # If it succeeded, then it was overridden by the user. We will use it
43016      # for the tool.
43017
43018      # First remove it from the list of overridden variables, so we can test
43019      # for unknown variables in the end.
43020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43021
43022      # Check if we try to supply an empty value
43023      if test "x$BUILD_CXX" = x; then
43024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43025$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43027$as_echo_n "checking for BUILD_CXX... " >&6; }
43028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43029$as_echo "disabled" >&6; }
43030      else
43031        # Check if the provided tool contains a complete path.
43032        tool_specified="$BUILD_CXX"
43033        tool_basename="${tool_specified##*/}"
43034        if test "x$tool_basename" = "x$tool_specified"; then
43035          # A command without a complete path is provided, search $PATH.
43036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43037$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43038          # Extract the first word of "$tool_basename", so it can be a program name with args.
43039set dummy $tool_basename; ac_word=$2
43040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43041$as_echo_n "checking for $ac_word... " >&6; }
43042if ${ac_cv_path_BUILD_CXX+:} false; then :
43043  $as_echo_n "(cached) " >&6
43044else
43045  case $BUILD_CXX in
43046  [\\/]* | ?:[\\/]*)
43047  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43048  ;;
43049  *)
43050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43051for as_dir in $PATH
43052do
43053  IFS=$as_save_IFS
43054  test -z "$as_dir" && as_dir=.
43055    for ac_exec_ext in '' $ac_executable_extensions; do
43056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43057    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43059    break 2
43060  fi
43061done
43062  done
43063IFS=$as_save_IFS
43064
43065  ;;
43066esac
43067fi
43068BUILD_CXX=$ac_cv_path_BUILD_CXX
43069if test -n "$BUILD_CXX"; then
43070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43071$as_echo "$BUILD_CXX" >&6; }
43072else
43073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43074$as_echo "no" >&6; }
43075fi
43076
43077
43078          if test "x$BUILD_CXX" = x; then
43079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43080          fi
43081        else
43082          # Otherwise we believe it is a complete path. Use it as it is.
43083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43084$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43086$as_echo_n "checking for BUILD_CXX... " >&6; }
43087          if test ! -x "$tool_specified"; then
43088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43089$as_echo "not found" >&6; }
43090            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43091          fi
43092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43093$as_echo "$tool_specified" >&6; }
43094        fi
43095      fi
43096    fi
43097
43098  fi
43099
43100
43101
43102  if test "x$BUILD_CXX" = x; then
43103    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43104  fi
43105
43106
43107
43108  # Only process if variable expands to non-empty
43109
43110  if test "x$BUILD_CXX" != x; then
43111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43112
43113  # First separate the path from the arguments. This will split at the first
43114  # space.
43115  complete="$BUILD_CXX"
43116  path="${complete%% *}"
43117  tmp="$complete EOL"
43118  arguments="${tmp#* }"
43119
43120  # Input might be given as Windows format, start by converting to
43121  # unix format.
43122  new_path=`$CYGPATH -u "$path"`
43123
43124  # Now try to locate executable using which
43125  new_path=`$WHICH "$new_path" 2> /dev/null`
43126  # bat and cmd files are not always considered executable in cygwin causing which
43127  # to not find them
43128  if test "x$new_path" = x \
43129      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43130      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43131    new_path=`$CYGPATH -u "$path"`
43132  fi
43133  if test "x$new_path" = x; then
43134    # Oops. Which didn't find the executable.
43135    # The splitting of arguments from the executable at a space might have been incorrect,
43136    # since paths with space are more likely in Windows. Give it another try with the whole
43137    # argument.
43138    path="$complete"
43139    arguments="EOL"
43140    new_path=`$CYGPATH -u "$path"`
43141    new_path=`$WHICH "$new_path" 2> /dev/null`
43142    # bat and cmd files are not always considered executable in cygwin causing which
43143    # to not find them
43144    if test "x$new_path" = x \
43145        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43146        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43147      new_path=`$CYGPATH -u "$path"`
43148    fi
43149    if test "x$new_path" = x; then
43150      # It's still not found. Now this is an unrecoverable error.
43151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43152$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43153      has_space=`$ECHO "$complete" | $GREP " "`
43154      if test "x$has_space" != x; then
43155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43157      fi
43158      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43159    fi
43160  fi
43161
43162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43165  # "foo.exe" is OK but "foo" is an error.
43166  #
43167  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43168  # It is also a way to make sure we got the proper file name for the real test later on.
43169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43170  if test "x$test_shortpath" = x; then
43171    # Short path failed, file does not exist as specified.
43172    # Try adding .exe or .cmd
43173    if test -f "${new_path}.exe"; then
43174      input_to_shortpath="${new_path}.exe"
43175    elif test -f "${new_path}.cmd"; then
43176      input_to_shortpath="${new_path}.cmd"
43177    else
43178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43179$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43180      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43181$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43182      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43183    fi
43184  else
43185    input_to_shortpath="$new_path"
43186  fi
43187
43188  # Call helper function which possibly converts this using DOS-style short mode.
43189  # If so, the updated path is stored in $new_path.
43190  new_path="$input_to_shortpath"
43191
43192  input_path="$input_to_shortpath"
43193  # Check if we need to convert this using DOS-style short mode. If the path
43194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43195  # take no chances and rewrite it.
43196  # Note: m4 eats our [], so we need to use [ and ] instead.
43197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43198  if test "x$has_forbidden_chars" != x; then
43199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43203      # Going to short mode and back again did indeed matter. Since short mode is
43204      # case insensitive, let's make it lowercase to improve readability.
43205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43206      # Now convert it back to Unix-style (cygpath)
43207      input_path=`$CYGPATH -u "$shortmode_path"`
43208      new_path="$input_path"
43209    fi
43210  fi
43211
43212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43213  if test "x$test_cygdrive_prefix" = x; then
43214    # As a simple fix, exclude /usr/bin since it's not a real path.
43215    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43217      # a path prefixed by /cygdrive for fixpath to work.
43218      new_path="$CYGWIN_ROOT_PATH$input_path"
43219    fi
43220  fi
43221
43222  # remove trailing .exe if any
43223  new_path="${new_path/%.exe/}"
43224
43225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43226
43227  # First separate the path from the arguments. This will split at the first
43228  # space.
43229  complete="$BUILD_CXX"
43230  path="${complete%% *}"
43231  tmp="$complete EOL"
43232  arguments="${tmp#* }"
43233
43234  # Input might be given as Windows format, start by converting to
43235  # unix format.
43236  new_path="$path"
43237
43238  windows_path="$new_path"
43239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43240    unix_path=`$CYGPATH -u "$windows_path"`
43241    new_path="$unix_path"
43242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43244    new_path="$unix_path"
43245  fi
43246
43247
43248  # Now try to locate executable using which
43249  new_path=`$WHICH "$new_path" 2> /dev/null`
43250
43251  if test "x$new_path" = x; then
43252    # Oops. Which didn't find the executable.
43253    # The splitting of arguments from the executable at a space might have been incorrect,
43254    # since paths with space are more likely in Windows. Give it another try with the whole
43255    # argument.
43256    path="$complete"
43257    arguments="EOL"
43258    new_path="$path"
43259
43260  windows_path="$new_path"
43261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43262    unix_path=`$CYGPATH -u "$windows_path"`
43263    new_path="$unix_path"
43264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43266    new_path="$unix_path"
43267  fi
43268
43269
43270    new_path=`$WHICH "$new_path" 2> /dev/null`
43271    # bat and cmd files are not always considered executable in MSYS causing which
43272    # to not find them
43273    if test "x$new_path" = x \
43274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43276      new_path="$path"
43277
43278  windows_path="$new_path"
43279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43280    unix_path=`$CYGPATH -u "$windows_path"`
43281    new_path="$unix_path"
43282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43284    new_path="$unix_path"
43285  fi
43286
43287    fi
43288
43289    if test "x$new_path" = x; then
43290      # It's still not found. Now this is an unrecoverable error.
43291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43292$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43293      has_space=`$ECHO "$complete" | $GREP " "`
43294      if test "x$has_space" != x; then
43295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43297      fi
43298      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43299    fi
43300  fi
43301
43302  # Now new_path has a complete unix path to the binary
43303  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43304    # Keep paths in /bin as-is, but remove trailing .exe if any
43305    new_path="${new_path/%.exe/}"
43306    # Do not save /bin paths to all_fixpath_prefixes!
43307  else
43308    # Not in mixed or Windows style, start by that.
43309    new_path=`cmd //c echo $new_path`
43310
43311  input_path="$new_path"
43312  # Check if we need to convert this using DOS-style short mode. If the path
43313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43314  # take no chances and rewrite it.
43315  # Note: m4 eats our [], so we need to use [ and ] instead.
43316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43317  if test "x$has_forbidden_chars" != x; then
43318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43320  fi
43321
43322    # Output is in $new_path
43323
43324  windows_path="$new_path"
43325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43326    unix_path=`$CYGPATH -u "$windows_path"`
43327    new_path="$unix_path"
43328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43330    new_path="$unix_path"
43331  fi
43332
43333    # remove trailing .exe if any
43334    new_path="${new_path/%.exe/}"
43335
43336    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43337    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43338  fi
43339
43340    else
43341      # We're on a unix platform. Hooray! :)
43342      # First separate the path from the arguments. This will split at the first
43343      # space.
43344      complete="$BUILD_CXX"
43345      path="${complete%% *}"
43346      tmp="$complete EOL"
43347      arguments="${tmp#* }"
43348
43349      # Cannot rely on the command "which" here since it doesn't always work.
43350      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43351      if test -z "$is_absolute_path"; then
43352        # Path to executable is not absolute. Find it.
43353        IFS_save="$IFS"
43354        IFS=:
43355        for p in $PATH; do
43356          if test -f "$p/$path" && test -x "$p/$path"; then
43357            new_path="$p/$path"
43358            break
43359          fi
43360        done
43361        IFS="$IFS_save"
43362      else
43363        # This is an absolute path, we can use it without further modifications.
43364        new_path="$path"
43365      fi
43366
43367      if test "x$new_path" = x; then
43368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43369$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43370        has_space=`$ECHO "$complete" | $GREP " "`
43371        if test "x$has_space" != x; then
43372          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43373$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43374        fi
43375        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43376      fi
43377    fi
43378
43379    # Now join together the path and the arguments once again
43380    if test "x$arguments" != xEOL; then
43381      new_complete="$new_path ${arguments% *}"
43382    else
43383      new_complete="$new_path"
43384    fi
43385
43386    if test "x$complete" != "x$new_complete"; then
43387      BUILD_CXX="$new_complete"
43388      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43389$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43390    fi
43391  fi
43392
43393
43394
43395  # Publish this variable in the help.
43396
43397
43398  if [ -z "${BUILD_NM+x}" ]; then
43399    # The variable is not set by user, try to locate tool using the code snippet
43400    for ac_prog in nm gcc-nm
43401do
43402  # Extract the first word of "$ac_prog", so it can be a program name with args.
43403set dummy $ac_prog; ac_word=$2
43404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43405$as_echo_n "checking for $ac_word... " >&6; }
43406if ${ac_cv_path_BUILD_NM+:} false; then :
43407  $as_echo_n "(cached) " >&6
43408else
43409  case $BUILD_NM in
43410  [\\/]* | ?:[\\/]*)
43411  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43412  ;;
43413  *)
43414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43415for as_dir in $PATH
43416do
43417  IFS=$as_save_IFS
43418  test -z "$as_dir" && as_dir=.
43419    for ac_exec_ext in '' $ac_executable_extensions; do
43420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43421    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43423    break 2
43424  fi
43425done
43426  done
43427IFS=$as_save_IFS
43428
43429  ;;
43430esac
43431fi
43432BUILD_NM=$ac_cv_path_BUILD_NM
43433if test -n "$BUILD_NM"; then
43434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43435$as_echo "$BUILD_NM" >&6; }
43436else
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43438$as_echo "no" >&6; }
43439fi
43440
43441
43442  test -n "$BUILD_NM" && break
43443done
43444
43445  else
43446    # The variable is set, but is it from the command line or the environment?
43447
43448    # Try to remove the string !BUILD_NM! from our list.
43449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43451      # If it failed, the variable was not from the command line. Ignore it,
43452      # but warn the user (except for BASH, which is always set by the calling BASH).
43453      if test "xBUILD_NM" != xBASH; then
43454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43455$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43456      fi
43457      # Try to locate tool using the code snippet
43458      for ac_prog in nm gcc-nm
43459do
43460  # Extract the first word of "$ac_prog", so it can be a program name with args.
43461set dummy $ac_prog; ac_word=$2
43462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43463$as_echo_n "checking for $ac_word... " >&6; }
43464if ${ac_cv_path_BUILD_NM+:} false; then :
43465  $as_echo_n "(cached) " >&6
43466else
43467  case $BUILD_NM in
43468  [\\/]* | ?:[\\/]*)
43469  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43470  ;;
43471  *)
43472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43473for as_dir in $PATH
43474do
43475  IFS=$as_save_IFS
43476  test -z "$as_dir" && as_dir=.
43477    for ac_exec_ext in '' $ac_executable_extensions; do
43478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43479    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43481    break 2
43482  fi
43483done
43484  done
43485IFS=$as_save_IFS
43486
43487  ;;
43488esac
43489fi
43490BUILD_NM=$ac_cv_path_BUILD_NM
43491if test -n "$BUILD_NM"; then
43492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43493$as_echo "$BUILD_NM" >&6; }
43494else
43495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43496$as_echo "no" >&6; }
43497fi
43498
43499
43500  test -n "$BUILD_NM" && break
43501done
43502
43503    else
43504      # If it succeeded, then it was overridden by the user. We will use it
43505      # for the tool.
43506
43507      # First remove it from the list of overridden variables, so we can test
43508      # for unknown variables in the end.
43509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43510
43511      # Check if we try to supply an empty value
43512      if test "x$BUILD_NM" = x; then
43513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43514$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43516$as_echo_n "checking for BUILD_NM... " >&6; }
43517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43518$as_echo "disabled" >&6; }
43519      else
43520        # Check if the provided tool contains a complete path.
43521        tool_specified="$BUILD_NM"
43522        tool_basename="${tool_specified##*/}"
43523        if test "x$tool_basename" = "x$tool_specified"; then
43524          # A command without a complete path is provided, search $PATH.
43525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43526$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43527          # Extract the first word of "$tool_basename", so it can be a program name with args.
43528set dummy $tool_basename; ac_word=$2
43529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43530$as_echo_n "checking for $ac_word... " >&6; }
43531if ${ac_cv_path_BUILD_NM+:} false; then :
43532  $as_echo_n "(cached) " >&6
43533else
43534  case $BUILD_NM in
43535  [\\/]* | ?:[\\/]*)
43536  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43537  ;;
43538  *)
43539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43540for as_dir in $PATH
43541do
43542  IFS=$as_save_IFS
43543  test -z "$as_dir" && as_dir=.
43544    for ac_exec_ext in '' $ac_executable_extensions; do
43545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43546    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43548    break 2
43549  fi
43550done
43551  done
43552IFS=$as_save_IFS
43553
43554  ;;
43555esac
43556fi
43557BUILD_NM=$ac_cv_path_BUILD_NM
43558if test -n "$BUILD_NM"; then
43559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43560$as_echo "$BUILD_NM" >&6; }
43561else
43562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43563$as_echo "no" >&6; }
43564fi
43565
43566
43567          if test "x$BUILD_NM" = x; then
43568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43569          fi
43570        else
43571          # Otherwise we believe it is a complete path. Use it as it is.
43572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43573$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43575$as_echo_n "checking for BUILD_NM... " >&6; }
43576          if test ! -x "$tool_specified"; then
43577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43578$as_echo "not found" >&6; }
43579            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43580          fi
43581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43582$as_echo "$tool_specified" >&6; }
43583        fi
43584      fi
43585    fi
43586
43587  fi
43588
43589
43590
43591  # Only process if variable expands to non-empty
43592
43593  if test "x$BUILD_NM" != x; then
43594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43595
43596  # First separate the path from the arguments. This will split at the first
43597  # space.
43598  complete="$BUILD_NM"
43599  path="${complete%% *}"
43600  tmp="$complete EOL"
43601  arguments="${tmp#* }"
43602
43603  # Input might be given as Windows format, start by converting to
43604  # unix format.
43605  new_path=`$CYGPATH -u "$path"`
43606
43607  # Now try to locate executable using which
43608  new_path=`$WHICH "$new_path" 2> /dev/null`
43609  # bat and cmd files are not always considered executable in cygwin causing which
43610  # to not find them
43611  if test "x$new_path" = x \
43612      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43613      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43614    new_path=`$CYGPATH -u "$path"`
43615  fi
43616  if test "x$new_path" = x; then
43617    # Oops. Which didn't find the executable.
43618    # The splitting of arguments from the executable at a space might have been incorrect,
43619    # since paths with space are more likely in Windows. Give it another try with the whole
43620    # argument.
43621    path="$complete"
43622    arguments="EOL"
43623    new_path=`$CYGPATH -u "$path"`
43624    new_path=`$WHICH "$new_path" 2> /dev/null`
43625    # bat and cmd files are not always considered executable in cygwin causing which
43626    # to not find them
43627    if test "x$new_path" = x \
43628        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43629        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43630      new_path=`$CYGPATH -u "$path"`
43631    fi
43632    if test "x$new_path" = x; then
43633      # It's still not found. Now this is an unrecoverable error.
43634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43635$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43636      has_space=`$ECHO "$complete" | $GREP " "`
43637      if test "x$has_space" != x; then
43638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43640      fi
43641      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43642    fi
43643  fi
43644
43645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43648  # "foo.exe" is OK but "foo" is an error.
43649  #
43650  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43651  # It is also a way to make sure we got the proper file name for the real test later on.
43652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43653  if test "x$test_shortpath" = x; then
43654    # Short path failed, file does not exist as specified.
43655    # Try adding .exe or .cmd
43656    if test -f "${new_path}.exe"; then
43657      input_to_shortpath="${new_path}.exe"
43658    elif test -f "${new_path}.cmd"; then
43659      input_to_shortpath="${new_path}.cmd"
43660    else
43661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43662$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43663      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43664$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43665      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43666    fi
43667  else
43668    input_to_shortpath="$new_path"
43669  fi
43670
43671  # Call helper function which possibly converts this using DOS-style short mode.
43672  # If so, the updated path is stored in $new_path.
43673  new_path="$input_to_shortpath"
43674
43675  input_path="$input_to_shortpath"
43676  # Check if we need to convert this using DOS-style short mode. If the path
43677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43678  # take no chances and rewrite it.
43679  # Note: m4 eats our [], so we need to use [ and ] instead.
43680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43681  if test "x$has_forbidden_chars" != x; then
43682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43686      # Going to short mode and back again did indeed matter. Since short mode is
43687      # case insensitive, let's make it lowercase to improve readability.
43688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43689      # Now convert it back to Unix-style (cygpath)
43690      input_path=`$CYGPATH -u "$shortmode_path"`
43691      new_path="$input_path"
43692    fi
43693  fi
43694
43695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43696  if test "x$test_cygdrive_prefix" = x; then
43697    # As a simple fix, exclude /usr/bin since it's not a real path.
43698    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43700      # a path prefixed by /cygdrive for fixpath to work.
43701      new_path="$CYGWIN_ROOT_PATH$input_path"
43702    fi
43703  fi
43704
43705  # remove trailing .exe if any
43706  new_path="${new_path/%.exe/}"
43707
43708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43709
43710  # First separate the path from the arguments. This will split at the first
43711  # space.
43712  complete="$BUILD_NM"
43713  path="${complete%% *}"
43714  tmp="$complete EOL"
43715  arguments="${tmp#* }"
43716
43717  # Input might be given as Windows format, start by converting to
43718  # unix format.
43719  new_path="$path"
43720
43721  windows_path="$new_path"
43722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43723    unix_path=`$CYGPATH -u "$windows_path"`
43724    new_path="$unix_path"
43725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43727    new_path="$unix_path"
43728  fi
43729
43730
43731  # Now try to locate executable using which
43732  new_path=`$WHICH "$new_path" 2> /dev/null`
43733
43734  if test "x$new_path" = x; then
43735    # Oops. Which didn't find the executable.
43736    # The splitting of arguments from the executable at a space might have been incorrect,
43737    # since paths with space are more likely in Windows. Give it another try with the whole
43738    # argument.
43739    path="$complete"
43740    arguments="EOL"
43741    new_path="$path"
43742
43743  windows_path="$new_path"
43744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43745    unix_path=`$CYGPATH -u "$windows_path"`
43746    new_path="$unix_path"
43747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43749    new_path="$unix_path"
43750  fi
43751
43752
43753    new_path=`$WHICH "$new_path" 2> /dev/null`
43754    # bat and cmd files are not always considered executable in MSYS causing which
43755    # to not find them
43756    if test "x$new_path" = x \
43757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43759      new_path="$path"
43760
43761  windows_path="$new_path"
43762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43763    unix_path=`$CYGPATH -u "$windows_path"`
43764    new_path="$unix_path"
43765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43767    new_path="$unix_path"
43768  fi
43769
43770    fi
43771
43772    if test "x$new_path" = x; then
43773      # It's still not found. Now this is an unrecoverable error.
43774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43775$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43776      has_space=`$ECHO "$complete" | $GREP " "`
43777      if test "x$has_space" != x; then
43778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43780      fi
43781      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43782    fi
43783  fi
43784
43785  # Now new_path has a complete unix path to the binary
43786  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43787    # Keep paths in /bin as-is, but remove trailing .exe if any
43788    new_path="${new_path/%.exe/}"
43789    # Do not save /bin paths to all_fixpath_prefixes!
43790  else
43791    # Not in mixed or Windows style, start by that.
43792    new_path=`cmd //c echo $new_path`
43793
43794  input_path="$new_path"
43795  # Check if we need to convert this using DOS-style short mode. If the path
43796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43797  # take no chances and rewrite it.
43798  # Note: m4 eats our [], so we need to use [ and ] instead.
43799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43800  if test "x$has_forbidden_chars" != x; then
43801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43803  fi
43804
43805    # Output is in $new_path
43806
43807  windows_path="$new_path"
43808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43809    unix_path=`$CYGPATH -u "$windows_path"`
43810    new_path="$unix_path"
43811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43813    new_path="$unix_path"
43814  fi
43815
43816    # remove trailing .exe if any
43817    new_path="${new_path/%.exe/}"
43818
43819    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43820    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43821  fi
43822
43823    else
43824      # We're on a unix platform. Hooray! :)
43825      # First separate the path from the arguments. This will split at the first
43826      # space.
43827      complete="$BUILD_NM"
43828      path="${complete%% *}"
43829      tmp="$complete EOL"
43830      arguments="${tmp#* }"
43831
43832      # Cannot rely on the command "which" here since it doesn't always work.
43833      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43834      if test -z "$is_absolute_path"; then
43835        # Path to executable is not absolute. Find it.
43836        IFS_save="$IFS"
43837        IFS=:
43838        for p in $PATH; do
43839          if test -f "$p/$path" && test -x "$p/$path"; then
43840            new_path="$p/$path"
43841            break
43842          fi
43843        done
43844        IFS="$IFS_save"
43845      else
43846        # This is an absolute path, we can use it without further modifications.
43847        new_path="$path"
43848      fi
43849
43850      if test "x$new_path" = x; then
43851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43852$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43853        has_space=`$ECHO "$complete" | $GREP " "`
43854        if test "x$has_space" != x; then
43855          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43856$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43857        fi
43858        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43859      fi
43860    fi
43861
43862    # Now join together the path and the arguments once again
43863    if test "x$arguments" != xEOL; then
43864      new_complete="$new_path ${arguments% *}"
43865    else
43866      new_complete="$new_path"
43867    fi
43868
43869    if test "x$complete" != "x$new_complete"; then
43870      BUILD_NM="$new_complete"
43871      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
43872$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
43873    fi
43874  fi
43875
43876
43877
43878  # Publish this variable in the help.
43879
43880
43881  if [ -z "${BUILD_AR+x}" ]; then
43882    # The variable is not set by user, try to locate tool using the code snippet
43883    for ac_prog in ar gcc-ar
43884do
43885  # Extract the first word of "$ac_prog", so it can be a program name with args.
43886set dummy $ac_prog; ac_word=$2
43887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43888$as_echo_n "checking for $ac_word... " >&6; }
43889if ${ac_cv_path_BUILD_AR+:} false; then :
43890  $as_echo_n "(cached) " >&6
43891else
43892  case $BUILD_AR in
43893  [\\/]* | ?:[\\/]*)
43894  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
43895  ;;
43896  *)
43897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43898for as_dir in $PATH
43899do
43900  IFS=$as_save_IFS
43901  test -z "$as_dir" && as_dir=.
43902    for ac_exec_ext in '' $ac_executable_extensions; do
43903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43904    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
43905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43906    break 2
43907  fi
43908done
43909  done
43910IFS=$as_save_IFS
43911
43912  ;;
43913esac
43914fi
43915BUILD_AR=$ac_cv_path_BUILD_AR
43916if test -n "$BUILD_AR"; then
43917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
43918$as_echo "$BUILD_AR" >&6; }
43919else
43920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43921$as_echo "no" >&6; }
43922fi
43923
43924
43925  test -n "$BUILD_AR" && break
43926done
43927
43928  else
43929    # The variable is set, but is it from the command line or the environment?
43930
43931    # Try to remove the string !BUILD_AR! from our list.
43932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
43933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43934      # If it failed, the variable was not from the command line. Ignore it,
43935      # but warn the user (except for BASH, which is always set by the calling BASH).
43936      if test "xBUILD_AR" != xBASH; then
43937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
43938$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
43939      fi
43940      # Try to locate tool using the code snippet
43941      for ac_prog in ar gcc-ar
43942do
43943  # Extract the first word of "$ac_prog", so it can be a program name with args.
43944set dummy $ac_prog; ac_word=$2
43945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43946$as_echo_n "checking for $ac_word... " >&6; }
43947if ${ac_cv_path_BUILD_AR+:} false; then :
43948  $as_echo_n "(cached) " >&6
43949else
43950  case $BUILD_AR in
43951  [\\/]* | ?:[\\/]*)
43952  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
43953  ;;
43954  *)
43955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43956for as_dir in $PATH
43957do
43958  IFS=$as_save_IFS
43959  test -z "$as_dir" && as_dir=.
43960    for ac_exec_ext in '' $ac_executable_extensions; do
43961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43962    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
43963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43964    break 2
43965  fi
43966done
43967  done
43968IFS=$as_save_IFS
43969
43970  ;;
43971esac
43972fi
43973BUILD_AR=$ac_cv_path_BUILD_AR
43974if test -n "$BUILD_AR"; then
43975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
43976$as_echo "$BUILD_AR" >&6; }
43977else
43978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43979$as_echo "no" >&6; }
43980fi
43981
43982
43983  test -n "$BUILD_AR" && break
43984done
43985
43986    else
43987      # If it succeeded, then it was overridden by the user. We will use it
43988      # for the tool.
43989
43990      # First remove it from the list of overridden variables, so we can test
43991      # for unknown variables in the end.
43992      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43993
43994      # Check if we try to supply an empty value
43995      if test "x$BUILD_AR" = x; then
43996        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
43997$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
43998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
43999$as_echo_n "checking for BUILD_AR... " >&6; }
44000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44001$as_echo "disabled" >&6; }
44002      else
44003        # Check if the provided tool contains a complete path.
44004        tool_specified="$BUILD_AR"
44005        tool_basename="${tool_specified##*/}"
44006        if test "x$tool_basename" = "x$tool_specified"; then
44007          # A command without a complete path is provided, search $PATH.
44008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44009$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44010          # Extract the first word of "$tool_basename", so it can be a program name with args.
44011set dummy $tool_basename; ac_word=$2
44012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44013$as_echo_n "checking for $ac_word... " >&6; }
44014if ${ac_cv_path_BUILD_AR+:} false; then :
44015  $as_echo_n "(cached) " >&6
44016else
44017  case $BUILD_AR in
44018  [\\/]* | ?:[\\/]*)
44019  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44020  ;;
44021  *)
44022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44023for as_dir in $PATH
44024do
44025  IFS=$as_save_IFS
44026  test -z "$as_dir" && as_dir=.
44027    for ac_exec_ext in '' $ac_executable_extensions; do
44028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44029    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44031    break 2
44032  fi
44033done
44034  done
44035IFS=$as_save_IFS
44036
44037  ;;
44038esac
44039fi
44040BUILD_AR=$ac_cv_path_BUILD_AR
44041if test -n "$BUILD_AR"; then
44042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44043$as_echo "$BUILD_AR" >&6; }
44044else
44045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44046$as_echo "no" >&6; }
44047fi
44048
44049
44050          if test "x$BUILD_AR" = x; then
44051            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44052          fi
44053        else
44054          # Otherwise we believe it is a complete path. Use it as it is.
44055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44056$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44057          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44058$as_echo_n "checking for BUILD_AR... " >&6; }
44059          if test ! -x "$tool_specified"; then
44060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44061$as_echo "not found" >&6; }
44062            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44063          fi
44064          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44065$as_echo "$tool_specified" >&6; }
44066        fi
44067      fi
44068    fi
44069
44070  fi
44071
44072
44073
44074  # Only process if variable expands to non-empty
44075
44076  if test "x$BUILD_AR" != x; then
44077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44078
44079  # First separate the path from the arguments. This will split at the first
44080  # space.
44081  complete="$BUILD_AR"
44082  path="${complete%% *}"
44083  tmp="$complete EOL"
44084  arguments="${tmp#* }"
44085
44086  # Input might be given as Windows format, start by converting to
44087  # unix format.
44088  new_path=`$CYGPATH -u "$path"`
44089
44090  # Now try to locate executable using which
44091  new_path=`$WHICH "$new_path" 2> /dev/null`
44092  # bat and cmd files are not always considered executable in cygwin causing which
44093  # to not find them
44094  if test "x$new_path" = x \
44095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44097    new_path=`$CYGPATH -u "$path"`
44098  fi
44099  if test "x$new_path" = x; then
44100    # Oops. Which didn't find the executable.
44101    # The splitting of arguments from the executable at a space might have been incorrect,
44102    # since paths with space are more likely in Windows. Give it another try with the whole
44103    # argument.
44104    path="$complete"
44105    arguments="EOL"
44106    new_path=`$CYGPATH -u "$path"`
44107    new_path=`$WHICH "$new_path" 2> /dev/null`
44108    # bat and cmd files are not always considered executable in cygwin causing which
44109    # to not find them
44110    if test "x$new_path" = x \
44111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44113      new_path=`$CYGPATH -u "$path"`
44114    fi
44115    if test "x$new_path" = x; then
44116      # It's still not found. Now this is an unrecoverable error.
44117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44118$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44119      has_space=`$ECHO "$complete" | $GREP " "`
44120      if test "x$has_space" != x; then
44121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44123      fi
44124      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44125    fi
44126  fi
44127
44128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44131  # "foo.exe" is OK but "foo" is an error.
44132  #
44133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44134  # It is also a way to make sure we got the proper file name for the real test later on.
44135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44136  if test "x$test_shortpath" = x; then
44137    # Short path failed, file does not exist as specified.
44138    # Try adding .exe or .cmd
44139    if test -f "${new_path}.exe"; then
44140      input_to_shortpath="${new_path}.exe"
44141    elif test -f "${new_path}.cmd"; then
44142      input_to_shortpath="${new_path}.cmd"
44143    else
44144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44145$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44148      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44149    fi
44150  else
44151    input_to_shortpath="$new_path"
44152  fi
44153
44154  # Call helper function which possibly converts this using DOS-style short mode.
44155  # If so, the updated path is stored in $new_path.
44156  new_path="$input_to_shortpath"
44157
44158  input_path="$input_to_shortpath"
44159  # Check if we need to convert this using DOS-style short mode. If the path
44160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44161  # take no chances and rewrite it.
44162  # Note: m4 eats our [], so we need to use [ and ] instead.
44163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44164  if test "x$has_forbidden_chars" != x; then
44165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44169      # Going to short mode and back again did indeed matter. Since short mode is
44170      # case insensitive, let's make it lowercase to improve readability.
44171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44172      # Now convert it back to Unix-style (cygpath)
44173      input_path=`$CYGPATH -u "$shortmode_path"`
44174      new_path="$input_path"
44175    fi
44176  fi
44177
44178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44179  if test "x$test_cygdrive_prefix" = x; then
44180    # As a simple fix, exclude /usr/bin since it's not a real path.
44181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44183      # a path prefixed by /cygdrive for fixpath to work.
44184      new_path="$CYGWIN_ROOT_PATH$input_path"
44185    fi
44186  fi
44187
44188  # remove trailing .exe if any
44189  new_path="${new_path/%.exe/}"
44190
44191    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44192
44193  # First separate the path from the arguments. This will split at the first
44194  # space.
44195  complete="$BUILD_AR"
44196  path="${complete%% *}"
44197  tmp="$complete EOL"
44198  arguments="${tmp#* }"
44199
44200  # Input might be given as Windows format, start by converting to
44201  # unix format.
44202  new_path="$path"
44203
44204  windows_path="$new_path"
44205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44206    unix_path=`$CYGPATH -u "$windows_path"`
44207    new_path="$unix_path"
44208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44210    new_path="$unix_path"
44211  fi
44212
44213
44214  # Now try to locate executable using which
44215  new_path=`$WHICH "$new_path" 2> /dev/null`
44216
44217  if test "x$new_path" = x; then
44218    # Oops. Which didn't find the executable.
44219    # The splitting of arguments from the executable at a space might have been incorrect,
44220    # since paths with space are more likely in Windows. Give it another try with the whole
44221    # argument.
44222    path="$complete"
44223    arguments="EOL"
44224    new_path="$path"
44225
44226  windows_path="$new_path"
44227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44228    unix_path=`$CYGPATH -u "$windows_path"`
44229    new_path="$unix_path"
44230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44232    new_path="$unix_path"
44233  fi
44234
44235
44236    new_path=`$WHICH "$new_path" 2> /dev/null`
44237    # bat and cmd files are not always considered executable in MSYS causing which
44238    # to not find them
44239    if test "x$new_path" = x \
44240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44242      new_path="$path"
44243
44244  windows_path="$new_path"
44245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44246    unix_path=`$CYGPATH -u "$windows_path"`
44247    new_path="$unix_path"
44248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44250    new_path="$unix_path"
44251  fi
44252
44253    fi
44254
44255    if test "x$new_path" = x; then
44256      # It's still not found. Now this is an unrecoverable error.
44257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44258$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44259      has_space=`$ECHO "$complete" | $GREP " "`
44260      if test "x$has_space" != x; then
44261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44263      fi
44264      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44265    fi
44266  fi
44267
44268  # Now new_path has a complete unix path to the binary
44269  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44270    # Keep paths in /bin as-is, but remove trailing .exe if any
44271    new_path="${new_path/%.exe/}"
44272    # Do not save /bin paths to all_fixpath_prefixes!
44273  else
44274    # Not in mixed or Windows style, start by that.
44275    new_path=`cmd //c echo $new_path`
44276
44277  input_path="$new_path"
44278  # Check if we need to convert this using DOS-style short mode. If the path
44279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44280  # take no chances and rewrite it.
44281  # Note: m4 eats our [], so we need to use [ and ] instead.
44282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44283  if test "x$has_forbidden_chars" != x; then
44284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44286  fi
44287
44288    # Output is in $new_path
44289
44290  windows_path="$new_path"
44291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44292    unix_path=`$CYGPATH -u "$windows_path"`
44293    new_path="$unix_path"
44294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44296    new_path="$unix_path"
44297  fi
44298
44299    # remove trailing .exe if any
44300    new_path="${new_path/%.exe/}"
44301
44302    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44303    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44304  fi
44305
44306    else
44307      # We're on a unix platform. Hooray! :)
44308      # First separate the path from the arguments. This will split at the first
44309      # space.
44310      complete="$BUILD_AR"
44311      path="${complete%% *}"
44312      tmp="$complete EOL"
44313      arguments="${tmp#* }"
44314
44315      # Cannot rely on the command "which" here since it doesn't always work.
44316      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44317      if test -z "$is_absolute_path"; then
44318        # Path to executable is not absolute. Find it.
44319        IFS_save="$IFS"
44320        IFS=:
44321        for p in $PATH; do
44322          if test -f "$p/$path" && test -x "$p/$path"; then
44323            new_path="$p/$path"
44324            break
44325          fi
44326        done
44327        IFS="$IFS_save"
44328      else
44329        # This is an absolute path, we can use it without further modifications.
44330        new_path="$path"
44331      fi
44332
44333      if test "x$new_path" = x; then
44334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44335$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44336        has_space=`$ECHO "$complete" | $GREP " "`
44337        if test "x$has_space" != x; then
44338          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44339$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44340        fi
44341        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44342      fi
44343    fi
44344
44345    # Now join together the path and the arguments once again
44346    if test "x$arguments" != xEOL; then
44347      new_complete="$new_path ${arguments% *}"
44348    else
44349      new_complete="$new_path"
44350    fi
44351
44352    if test "x$complete" != "x$new_complete"; then
44353      BUILD_AR="$new_complete"
44354      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44355$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44356    fi
44357  fi
44358
44359    # Assume the C compiler is the assembler
44360    BUILD_AS="$BUILD_CC -c"
44361    # Just like for the target compiler, use the compiler as linker
44362    BUILD_LD="$BUILD_CC"
44363    BUILD_LDCXX="$BUILD_CXX"
44364
44365    PATH="$OLDPATH"
44366  else
44367    # If we are not cross compiling, use the normal target compilers for
44368    # building the build platform executables.
44369    BUILD_CC="$CC"
44370    BUILD_CXX="$CXX"
44371    BUILD_LD="$LD"
44372    BUILD_LDCXX="$LDCXX"
44373    BUILD_NM="$NM"
44374    BUILD_AS="$AS"
44375    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44376    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44377    BUILD_AR="$AR"
44378  fi
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44392    # For hotspot, we need these in Windows mixed path,
44393    # so rewrite them all. Need added .exe suffix.
44394    HOTSPOT_CXX="$CXX.exe"
44395    HOTSPOT_LD="$LD.exe"
44396    HOTSPOT_MT="$MT.exe"
44397    HOTSPOT_RC="$RC.exe"
44398
44399  unix_path="$HOTSPOT_CXX"
44400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44401    windows_path=`$CYGPATH -m "$unix_path"`
44402    HOTSPOT_CXX="$windows_path"
44403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44404    windows_path=`cmd //c echo $unix_path`
44405    HOTSPOT_CXX="$windows_path"
44406  fi
44407
44408
44409  unix_path="$HOTSPOT_LD"
44410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44411    windows_path=`$CYGPATH -m "$unix_path"`
44412    HOTSPOT_LD="$windows_path"
44413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44414    windows_path=`cmd //c echo $unix_path`
44415    HOTSPOT_LD="$windows_path"
44416  fi
44417
44418
44419  unix_path="$HOTSPOT_MT"
44420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44421    windows_path=`$CYGPATH -m "$unix_path"`
44422    HOTSPOT_MT="$windows_path"
44423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44424    windows_path=`cmd //c echo $unix_path`
44425    HOTSPOT_MT="$windows_path"
44426  fi
44427
44428
44429  unix_path="$HOTSPOT_RC"
44430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44431    windows_path=`$CYGPATH -m "$unix_path"`
44432    HOTSPOT_RC="$windows_path"
44433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44434    windows_path=`cmd //c echo $unix_path`
44435    HOTSPOT_RC="$windows_path"
44436  fi
44437
44438
44439
44440  else
44441    HOTSPOT_CXX="$CXX"
44442    HOTSPOT_LD="$LD"
44443  fi
44444
44445
44446
44447  if test  "x$TOOLCHAIN_TYPE" = xclang; then
44448    USE_CLANG=true
44449  fi
44450
44451
44452
44453
44454
44455  # The package path is used only on macosx?
44456  # FIXME: clean this up, and/or move it elsewhere.
44457  PACKAGE_PATH=/opt/local
44458
44459
44460  # Check for extra potential brokenness.
44461  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44462    # On Windows, double-check that we got the right compiler.
44463    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44464    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44465    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44466      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44467        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
44468      fi
44469    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44470      if test "x$COMPILER_CPU_TEST" != "xx64"; then
44471        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44472      fi
44473    fi
44474  fi
44475
44476  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44477    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44478    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44479    # This is later checked when setting flags.
44480
44481    # "-Og" suppported for GCC 4.8 and later
44482    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44483
44484
44485
44486
44487
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530    # Execute function body
44531
44532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44533$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44534  supports=yes
44535
44536  saved_cflags="$CFLAGS"
44537  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44538  ac_ext=c
44539ac_cpp='$CPP $CPPFLAGS'
44540ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44541ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44542ac_compiler_gnu=$ac_cv_c_compiler_gnu
44543
44544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44545/* end confdefs.h.  */
44546int i;
44547_ACEOF
44548if ac_fn_c_try_compile "$LINENO"; then :
44549
44550else
44551  supports=no
44552fi
44553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44554  ac_ext=cpp
44555ac_cpp='$CXXCPP $CPPFLAGS'
44556ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44557ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44558ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44559
44560  CFLAGS="$saved_cflags"
44561
44562  saved_cxxflags="$CXXFLAGS"
44563  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44564  ac_ext=cpp
44565ac_cpp='$CXXCPP $CPPFLAGS'
44566ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44567ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44568ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44569
44570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44571/* end confdefs.h.  */
44572int i;
44573_ACEOF
44574if ac_fn_cxx_try_compile "$LINENO"; then :
44575
44576else
44577  supports=no
44578fi
44579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44580  ac_ext=cpp
44581ac_cpp='$CXXCPP $CPPFLAGS'
44582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44585
44586  CXXFLAGS="$saved_cxxflags"
44587
44588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44589$as_echo "$supports" >&6; }
44590  if test "x$supports" = "xyes" ; then
44591    :
44592    HAS_CFLAG_OPTIMIZE_DEBUG=true
44593  else
44594    :
44595    HAS_CFLAG_OPTIMIZE_DEBUG=false
44596  fi
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609
44610    # "-z relro" supported in GNU binutils 2.17 and later
44611    LINKER_RELRO_FLAG="-Wl,-z,relro"
44612
44613
44614
44615
44616
44617
44618
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659    # Execute function body
44660
44661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44662$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44663  supports=yes
44664
44665  saved_ldflags="$LDFLAGS"
44666  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44667  ac_ext=c
44668ac_cpp='$CPP $CPPFLAGS'
44669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44671ac_compiler_gnu=$ac_cv_c_compiler_gnu
44672
44673  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44674/* end confdefs.h.  */
44675
44676int
44677main ()
44678{
44679
44680  ;
44681  return 0;
44682}
44683_ACEOF
44684if ac_fn_c_try_link "$LINENO"; then :
44685
44686else
44687  supports=no
44688fi
44689rm -f core conftest.err conftest.$ac_objext \
44690    conftest$ac_exeext conftest.$ac_ext
44691  ac_ext=cpp
44692ac_cpp='$CXXCPP $CPPFLAGS'
44693ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44694ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44695ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44696
44697  LDFLAGS="$saved_ldflags"
44698
44699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44700$as_echo "$supports" >&6; }
44701  if test "x$supports" = "xyes" ; then
44702    :
44703    HAS_LINKER_RELRO=true
44704  else
44705    :
44706    HAS_LINKER_RELRO=false
44707  fi
44708
44709
44710
44711
44712
44713
44714
44715
44716
44717
44718
44719
44720
44721    # "-z now" supported in GNU binutils 2.11 and later
44722    LINKER_NOW_FLAG="-Wl,-z,now"
44723
44724
44725
44726
44727
44728
44729
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770    # Execute function body
44771
44772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44773$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44774  supports=yes
44775
44776  saved_ldflags="$LDFLAGS"
44777  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44778  ac_ext=c
44779ac_cpp='$CPP $CPPFLAGS'
44780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44782ac_compiler_gnu=$ac_cv_c_compiler_gnu
44783
44784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44785/* end confdefs.h.  */
44786
44787int
44788main ()
44789{
44790
44791  ;
44792  return 0;
44793}
44794_ACEOF
44795if ac_fn_c_try_link "$LINENO"; then :
44796
44797else
44798  supports=no
44799fi
44800rm -f core conftest.err conftest.$ac_objext \
44801    conftest$ac_exeext conftest.$ac_ext
44802  ac_ext=cpp
44803ac_cpp='$CXXCPP $CPPFLAGS'
44804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44807
44808  LDFLAGS="$saved_ldflags"
44809
44810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44811$as_echo "$supports" >&6; }
44812  if test "x$supports" = "xyes" ; then
44813    :
44814    HAS_LINKER_NOW=true
44815  else
44816    :
44817    HAS_LINKER_NOW=false
44818  fi
44819
44820
44821
44822
44823
44824
44825
44826
44827
44828
44829
44830
44831  fi
44832
44833  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44834  # in executable.'
44835  USING_BROKEN_SUSE_LD=no
44836  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44838$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44839    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44840    $ECHO "int main() { }" > main.c
44841    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
44842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44843$as_echo "no" >&6; }
44844      USING_BROKEN_SUSE_LD=no
44845    else
44846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44847$as_echo "yes" >&6; }
44848      USING_BROKEN_SUSE_LD=yes
44849    fi
44850    rm -rf version-script.map main.c a.out
44851  fi
44852
44853
44854
44855# Setup the JTReg Regression Test Harness.
44856
44857
44858# Check whether --with-jtreg was given.
44859if test "${with_jtreg+set}" = set; then :
44860  withval=$with_jtreg;
44861else
44862  with_jtreg=no
44863fi
44864
44865
44866  if test "x$with_jtreg" = xno; then
44867    # jtreg disabled
44868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44869$as_echo_n "checking for jtreg... " >&6; }
44870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44871$as_echo "no" >&6; }
44872  else
44873    if test "x$with_jtreg" != xyes; then
44874      # with path specified.
44875      JT_HOME="$with_jtreg"
44876    fi
44877
44878    if test "x$JT_HOME" != x; then
44879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44880$as_echo_n "checking for jtreg... " >&6; }
44881
44882      # use JT_HOME enviroment var.
44883
44884  # Only process if variable expands to non-empty
44885
44886  if test "x$JT_HOME" != x; then
44887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44888
44889  # Input might be given as Windows format, start by converting to
44890  # unix format.
44891  path="$JT_HOME"
44892  new_path=`$CYGPATH -u "$path"`
44893
44894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44897  # "foo.exe" is OK but "foo" is an error.
44898  #
44899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44900  # It is also a way to make sure we got the proper file name for the real test later on.
44901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44902  if test "x$test_shortpath" = x; then
44903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44904$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44905    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
44906  fi
44907
44908  # Call helper function which possibly converts this using DOS-style short mode.
44909  # If so, the updated path is stored in $new_path.
44910
44911  input_path="$new_path"
44912  # Check if we need to convert this using DOS-style short mode. If the path
44913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44914  # take no chances and rewrite it.
44915  # Note: m4 eats our [], so we need to use [ and ] instead.
44916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44917  if test "x$has_forbidden_chars" != x; then
44918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44922      # Going to short mode and back again did indeed matter. Since short mode is
44923      # case insensitive, let's make it lowercase to improve readability.
44924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44925      # Now convert it back to Unix-style (cygpath)
44926      input_path=`$CYGPATH -u "$shortmode_path"`
44927      new_path="$input_path"
44928    fi
44929  fi
44930
44931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44932  if test "x$test_cygdrive_prefix" = x; then
44933    # As a simple fix, exclude /usr/bin since it's not a real path.
44934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44936      # a path prefixed by /cygdrive for fixpath to work.
44937      new_path="$CYGWIN_ROOT_PATH$input_path"
44938    fi
44939  fi
44940
44941
44942  if test "x$path" != "x$new_path"; then
44943    JT_HOME="$new_path"
44944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44945$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44946  fi
44947
44948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44949
44950  path="$JT_HOME"
44951  has_colon=`$ECHO $path | $GREP ^.:`
44952  new_path="$path"
44953  if test "x$has_colon" = x; then
44954    # Not in mixed or Windows style, start by that.
44955    new_path=`cmd //c echo $path`
44956  fi
44957
44958
44959  input_path="$new_path"
44960  # Check if we need to convert this using DOS-style short mode. If the path
44961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44962  # take no chances and rewrite it.
44963  # Note: m4 eats our [], so we need to use [ and ] instead.
44964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44965  if test "x$has_forbidden_chars" != x; then
44966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44968  fi
44969
44970
44971  windows_path="$new_path"
44972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44973    unix_path=`$CYGPATH -u "$windows_path"`
44974    new_path="$unix_path"
44975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44977    new_path="$unix_path"
44978  fi
44979
44980  if test "x$path" != "x$new_path"; then
44981    JT_HOME="$new_path"
44982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44983$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44984  fi
44985
44986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44988
44989    else
44990      # We're on a unix platform. Hooray! :)
44991      path="$JT_HOME"
44992      has_space=`$ECHO "$path" | $GREP " "`
44993      if test "x$has_space" != x; then
44994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44995$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44996        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44997      fi
44998
44999      # Use eval to expand a potential ~
45000      eval path="$path"
45001      if test ! -f "$path" && test ! -d "$path"; then
45002        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45003      fi
45004
45005      if test -d "$path"; then
45006        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45007      else
45008        dir="`$DIRNAME "$path"`"
45009        base="`$BASENAME "$path"`"
45010        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45011      fi
45012    fi
45013  fi
45014
45015
45016      # jtreg win32 script works for everybody
45017      JTREGEXE="$JT_HOME/bin/jtreg"
45018
45019      if test ! -f "$JTREGEXE"; then
45020        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45021      fi
45022
45023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45024$as_echo "$JTREGEXE" >&6; }
45025    else
45026      # try to find jtreg on path
45027
45028
45029
45030  # Publish this variable in the help.
45031
45032
45033  if [ -z "${JTREGEXE+x}" ]; then
45034    # The variable is not set by user, try to locate tool using the code snippet
45035    for ac_prog in jtreg
45036do
45037  # Extract the first word of "$ac_prog", so it can be a program name with args.
45038set dummy $ac_prog; ac_word=$2
45039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45040$as_echo_n "checking for $ac_word... " >&6; }
45041if ${ac_cv_path_JTREGEXE+:} false; then :
45042  $as_echo_n "(cached) " >&6
45043else
45044  case $JTREGEXE in
45045  [\\/]* | ?:[\\/]*)
45046  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45047  ;;
45048  *)
45049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45050for as_dir in $PATH
45051do
45052  IFS=$as_save_IFS
45053  test -z "$as_dir" && as_dir=.
45054    for ac_exec_ext in '' $ac_executable_extensions; do
45055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45056    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45058    break 2
45059  fi
45060done
45061  done
45062IFS=$as_save_IFS
45063
45064  ;;
45065esac
45066fi
45067JTREGEXE=$ac_cv_path_JTREGEXE
45068if test -n "$JTREGEXE"; then
45069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45070$as_echo "$JTREGEXE" >&6; }
45071else
45072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45073$as_echo "no" >&6; }
45074fi
45075
45076
45077  test -n "$JTREGEXE" && break
45078done
45079
45080  else
45081    # The variable is set, but is it from the command line or the environment?
45082
45083    # Try to remove the string !JTREGEXE! from our list.
45084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45086      # If it failed, the variable was not from the command line. Ignore it,
45087      # but warn the user (except for BASH, which is always set by the calling BASH).
45088      if test "xJTREGEXE" != xBASH; then
45089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45090$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45091      fi
45092      # Try to locate tool using the code snippet
45093      for ac_prog in jtreg
45094do
45095  # Extract the first word of "$ac_prog", so it can be a program name with args.
45096set dummy $ac_prog; ac_word=$2
45097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45098$as_echo_n "checking for $ac_word... " >&6; }
45099if ${ac_cv_path_JTREGEXE+:} false; then :
45100  $as_echo_n "(cached) " >&6
45101else
45102  case $JTREGEXE in
45103  [\\/]* | ?:[\\/]*)
45104  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45105  ;;
45106  *)
45107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45108for as_dir in $PATH
45109do
45110  IFS=$as_save_IFS
45111  test -z "$as_dir" && as_dir=.
45112    for ac_exec_ext in '' $ac_executable_extensions; do
45113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45114    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45116    break 2
45117  fi
45118done
45119  done
45120IFS=$as_save_IFS
45121
45122  ;;
45123esac
45124fi
45125JTREGEXE=$ac_cv_path_JTREGEXE
45126if test -n "$JTREGEXE"; then
45127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45128$as_echo "$JTREGEXE" >&6; }
45129else
45130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45131$as_echo "no" >&6; }
45132fi
45133
45134
45135  test -n "$JTREGEXE" && break
45136done
45137
45138    else
45139      # If it succeeded, then it was overridden by the user. We will use it
45140      # for the tool.
45141
45142      # First remove it from the list of overridden variables, so we can test
45143      # for unknown variables in the end.
45144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45145
45146      # Check if we try to supply an empty value
45147      if test "x$JTREGEXE" = x; then
45148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45149$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45151$as_echo_n "checking for JTREGEXE... " >&6; }
45152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45153$as_echo "disabled" >&6; }
45154      else
45155        # Check if the provided tool contains a complete path.
45156        tool_specified="$JTREGEXE"
45157        tool_basename="${tool_specified##*/}"
45158        if test "x$tool_basename" = "x$tool_specified"; then
45159          # A command without a complete path is provided, search $PATH.
45160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45161$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45162          # Extract the first word of "$tool_basename", so it can be a program name with args.
45163set dummy $tool_basename; ac_word=$2
45164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45165$as_echo_n "checking for $ac_word... " >&6; }
45166if ${ac_cv_path_JTREGEXE+:} false; then :
45167  $as_echo_n "(cached) " >&6
45168else
45169  case $JTREGEXE in
45170  [\\/]* | ?:[\\/]*)
45171  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45172  ;;
45173  *)
45174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45175for as_dir in $PATH
45176do
45177  IFS=$as_save_IFS
45178  test -z "$as_dir" && as_dir=.
45179    for ac_exec_ext in '' $ac_executable_extensions; do
45180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45181    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45183    break 2
45184  fi
45185done
45186  done
45187IFS=$as_save_IFS
45188
45189  ;;
45190esac
45191fi
45192JTREGEXE=$ac_cv_path_JTREGEXE
45193if test -n "$JTREGEXE"; then
45194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45195$as_echo "$JTREGEXE" >&6; }
45196else
45197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45198$as_echo "no" >&6; }
45199fi
45200
45201
45202          if test "x$JTREGEXE" = x; then
45203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45204          fi
45205        else
45206          # Otherwise we believe it is a complete path. Use it as it is.
45207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45208$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45210$as_echo_n "checking for JTREGEXE... " >&6; }
45211          if test ! -x "$tool_specified"; then
45212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45213$as_echo "not found" >&6; }
45214            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45215          fi
45216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45217$as_echo "$tool_specified" >&6; }
45218        fi
45219      fi
45220    fi
45221
45222  fi
45223
45224
45225
45226  if test "x$JTREGEXE" = x; then
45227    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45228  fi
45229
45230
45231      JT_HOME="`$DIRNAME $JTREGEXE`"
45232    fi
45233  fi
45234
45235
45236
45237
45238
45239
45240  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45241  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45242  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45243    COMPILER_TARGET_BITS_FLAG="-q"
45244    COMPILER_COMMAND_FILE_FLAG="-f"
45245  else
45246    COMPILER_TARGET_BITS_FLAG="-m"
45247    COMPILER_COMMAND_FILE_FLAG="@"
45248
45249    # The solstudio linker does not support @-files.
45250    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45251      COMPILER_COMMAND_FILE_FLAG=
45252    fi
45253
45254    # Check if @file is supported by gcc
45255    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
45257$as_echo_n "checking if @file is supported by gcc... " >&6; }
45258      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
45259      $ECHO "" "--version" > command.file
45260      if $CXX @command.file 2>&5 >&5; then
45261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45262$as_echo "yes" >&6; }
45263        COMPILER_COMMAND_FILE_FLAG="@"
45264      else
45265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45266$as_echo "no" >&6; }
45267        COMPILER_COMMAND_FILE_FLAG=
45268      fi
45269      rm -rf command.file
45270    fi
45271  fi
45272
45273
45274
45275  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45276  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45277    ARFLAGS="-r"
45278  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45279    ARFLAGS="-X64"
45280  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45281    # lib.exe is used as AR to create static libraries.
45282    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45283  else
45284    ARFLAGS=""
45285  fi
45286
45287
45288  ## Setup strip.
45289  # FIXME: should this really be per platform, or should it be per toolchain type?
45290  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45291  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45292  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45293    STRIPFLAGS="-g"
45294  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45295    STRIPFLAGS="-x"
45296  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45297    STRIPFLAGS="-S"
45298  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45299    STRIPFLAGS="-X32_64"
45300  fi
45301
45302
45303
45304  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45305    CC_OUT_OPTION=-Fo
45306    EXE_OUT_OPTION=-out:
45307    LD_OUT_OPTION=-out:
45308    AR_OUT_OPTION=-out:
45309  else
45310    # The option used to specify the target .o,.a or .so file.
45311    # When compiling, how to specify the to be created object file.
45312    CC_OUT_OPTION='-o$(SPACE)'
45313    # When linking, how to specify the to be created executable.
45314    EXE_OUT_OPTION='-o$(SPACE)'
45315    # When linking, how to specify the to be created dynamically linkable library.
45316    LD_OUT_OPTION='-o$(SPACE)'
45317    # When archiving, how to specify the to be create static archive for object files.
45318    AR_OUT_OPTION='rcs$(SPACE)'
45319  fi
45320
45321
45322
45323
45324
45325  # On Windows, we need to set RC flags.
45326  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45327    RC_FLAGS="-nologo -l0x409"
45328    if test "x$VARIANT" = xOPT; then
45329      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45330    fi
45331
45332    # The version variables used to create RC_FLAGS may be overridden
45333    # in a custom configure script, or possibly the command line.
45334    # Let those variables be expanded at make time in spec.gmk.
45335    # The \$ are escaped to the shell, and the $(...) variables
45336    # are evaluated by make.
45337    RC_FLAGS="$RC_FLAGS \
45338        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45339        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45340        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45341        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45342        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45343        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45344        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45345  fi
45346
45347
45348  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45349    # silence copyright notice and other headers.
45350    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45351  fi
45352
45353
45354# FIXME: Currently we must test this after toolchain but before flags. Fix!
45355
45356# Now we can test some aspects on the target using configure macros.
45357
45358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45359$as_echo_n "checking for ANSI C header files... " >&6; }
45360if ${ac_cv_header_stdc+:} false; then :
45361  $as_echo_n "(cached) " >&6
45362else
45363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45364/* end confdefs.h.  */
45365#include <stdlib.h>
45366#include <stdarg.h>
45367#include <string.h>
45368#include <float.h>
45369
45370int
45371main ()
45372{
45373
45374  ;
45375  return 0;
45376}
45377_ACEOF
45378if ac_fn_cxx_try_compile "$LINENO"; then :
45379  ac_cv_header_stdc=yes
45380else
45381  ac_cv_header_stdc=no
45382fi
45383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45384
45385if test $ac_cv_header_stdc = yes; then
45386  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45388/* end confdefs.h.  */
45389#include <string.h>
45390
45391_ACEOF
45392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45393  $EGREP "memchr" >/dev/null 2>&1; then :
45394
45395else
45396  ac_cv_header_stdc=no
45397fi
45398rm -f conftest*
45399
45400fi
45401
45402if test $ac_cv_header_stdc = yes; then
45403  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45405/* end confdefs.h.  */
45406#include <stdlib.h>
45407
45408_ACEOF
45409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45410  $EGREP "free" >/dev/null 2>&1; then :
45411
45412else
45413  ac_cv_header_stdc=no
45414fi
45415rm -f conftest*
45416
45417fi
45418
45419if test $ac_cv_header_stdc = yes; then
45420  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45421  if test "$cross_compiling" = yes; then :
45422  :
45423else
45424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45425/* end confdefs.h.  */
45426#include <ctype.h>
45427#include <stdlib.h>
45428#if ((' ' & 0x0FF) == 0x020)
45429# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45430# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45431#else
45432# define ISLOWER(c) \
45433		   (('a' <= (c) && (c) <= 'i') \
45434		     || ('j' <= (c) && (c) <= 'r') \
45435		     || ('s' <= (c) && (c) <= 'z'))
45436# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45437#endif
45438
45439#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45440int
45441main ()
45442{
45443  int i;
45444  for (i = 0; i < 256; i++)
45445    if (XOR (islower (i), ISLOWER (i))
45446	|| toupper (i) != TOUPPER (i))
45447      return 2;
45448  return 0;
45449}
45450_ACEOF
45451if ac_fn_cxx_try_run "$LINENO"; then :
45452
45453else
45454  ac_cv_header_stdc=no
45455fi
45456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45457  conftest.$ac_objext conftest.beam conftest.$ac_ext
45458fi
45459
45460fi
45461fi
45462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45463$as_echo "$ac_cv_header_stdc" >&6; }
45464if test $ac_cv_header_stdc = yes; then
45465
45466$as_echo "#define STDC_HEADERS 1" >>confdefs.h
45467
45468fi
45469
45470# On IRIX 5.3, sys/types and inttypes.h are conflicting.
45471for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45472		  inttypes.h stdint.h unistd.h
45473do :
45474  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45475ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45476"
45477if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45478  cat >>confdefs.h <<_ACEOF
45479#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45480_ACEOF
45481
45482fi
45483
45484done
45485
45486
45487
45488  ###############################################################################
45489  #
45490  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45491  # (The JVM can use 32 or 64 bit Java pointers but that decision
45492  # is made at runtime.)
45493  #
45494
45495  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45496    # Always specify -m flag on Solaris
45497    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45498
45499  # When we add flags to the "official" CFLAGS etc, we need to
45500  # keep track of these additions in ADDED_CFLAGS etc. These
45501  # will later be checked to make sure only controlled additions
45502  # have been made to CFLAGS etc.
45503  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45504  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45505  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45506
45507  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45508  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45509  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45510
45511  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45512  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45513  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45514
45515  elif test "x$COMPILE_TYPE" = xreduced; then
45516    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45517      # Specify -m if running reduced on unix platforms
45518
45519  # When we add flags to the "official" CFLAGS etc, we need to
45520  # keep track of these additions in ADDED_CFLAGS etc. These
45521  # will later be checked to make sure only controlled additions
45522  # have been made to CFLAGS etc.
45523  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45524  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45525  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45526
45527  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45528  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45529  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45530
45531  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45532  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45533  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45534
45535    fi
45536  fi
45537
45538  # Make compilation sanity check
45539  for ac_header in stdio.h
45540do :
45541  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45542if test "x$ac_cv_header_stdio_h" = xyes; then :
45543  cat >>confdefs.h <<_ACEOF
45544#define HAVE_STDIO_H 1
45545_ACEOF
45546
45547else
45548
45549    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45550$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45551    if test "x$COMPILE_TYPE" = xreduced; then
45552
45553  # Print a helpful message on how to acquire the necessary build dependency.
45554  # reduced is the help tag: freetype, cups, alsa etc
45555  MISSING_DEPENDENCY=reduced
45556
45557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45558    cygwin_help $MISSING_DEPENDENCY
45559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45560    msys_help $MISSING_DEPENDENCY
45561  else
45562    PKGHANDLER_COMMAND=
45563
45564    case $PKGHANDLER in
45565      apt-get)
45566        apt_help     $MISSING_DEPENDENCY ;;
45567      yum)
45568        yum_help     $MISSING_DEPENDENCY ;;
45569      port)
45570        port_help    $MISSING_DEPENDENCY ;;
45571      pkgutil)
45572        pkgutil_help $MISSING_DEPENDENCY ;;
45573      pkgadd)
45574        pkgadd_help  $MISSING_DEPENDENCY ;;
45575    esac
45576
45577    if test "x$PKGHANDLER_COMMAND" != x; then
45578      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45579    fi
45580  fi
45581
45582      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45583$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45584    elif test "x$COMPILE_TYPE" = xcross; then
45585      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45586$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45587    fi
45588    as_fn_error $? "Cannot continue." "$LINENO" 5
45589
45590fi
45591
45592done
45593
45594
45595  # The cast to long int works around a bug in the HP C Compiler
45596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45598# This bug is HP SR number 8606223364.
45599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45600$as_echo_n "checking size of int *... " >&6; }
45601if ${ac_cv_sizeof_int_p+:} false; then :
45602  $as_echo_n "(cached) " >&6
45603else
45604  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45605
45606else
45607  if test "$ac_cv_type_int_p" = yes; then
45608     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45610as_fn_error 77 "cannot compute sizeof (int *)
45611See \`config.log' for more details" "$LINENO" 5; }
45612   else
45613     ac_cv_sizeof_int_p=0
45614   fi
45615fi
45616
45617fi
45618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45619$as_echo "$ac_cv_sizeof_int_p" >&6; }
45620
45621
45622
45623cat >>confdefs.h <<_ACEOF
45624#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45625_ACEOF
45626
45627
45628
45629  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45630  if test "x$ac_cv_sizeof_int_p" = x; then
45631    # The test failed, lets stick to the assumed value.
45632    { $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
45633$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45634  else
45635    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45636
45637    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45638      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45639      # Let's try to implicitely set the compilers target architecture and retry the test
45640      { $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
45641$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;}
45642      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45643$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45644
45645  # When we add flags to the "official" CFLAGS etc, we need to
45646  # keep track of these additions in ADDED_CFLAGS etc. These
45647  # will later be checked to make sure only controlled additions
45648  # have been made to CFLAGS etc.
45649  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45650  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45651  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45652
45653  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45654  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45655  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45656
45657  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45658  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45659  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45660
45661
45662      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45663      unset ac_cv_sizeof_int_p
45664      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45665      cat >>confdefs.h <<_ACEOF
45666#undef SIZEOF_INT_P
45667_ACEOF
45668
45669      # The cast to long int works around a bug in the HP C Compiler
45670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45672# This bug is HP SR number 8606223364.
45673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45674$as_echo_n "checking size of int *... " >&6; }
45675if ${ac_cv_sizeof_int_p+:} false; then :
45676  $as_echo_n "(cached) " >&6
45677else
45678  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45679
45680else
45681  if test "$ac_cv_type_int_p" = yes; then
45682     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45684as_fn_error 77 "cannot compute sizeof (int *)
45685See \`config.log' for more details" "$LINENO" 5; }
45686   else
45687     ac_cv_sizeof_int_p=0
45688   fi
45689fi
45690
45691fi
45692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45693$as_echo "$ac_cv_sizeof_int_p" >&6; }
45694
45695
45696
45697cat >>confdefs.h <<_ACEOF
45698#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45699_ACEOF
45700
45701
45702
45703      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45704
45705      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45706        { $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
45707$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;}
45708        if test "x$COMPILE_TYPE" = xreduced; then
45709
45710  # Print a helpful message on how to acquire the necessary build dependency.
45711  # reduced is the help tag: freetype, cups, alsa etc
45712  MISSING_DEPENDENCY=reduced
45713
45714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45715    cygwin_help $MISSING_DEPENDENCY
45716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45717    msys_help $MISSING_DEPENDENCY
45718  else
45719    PKGHANDLER_COMMAND=
45720
45721    case $PKGHANDLER in
45722      apt-get)
45723        apt_help     $MISSING_DEPENDENCY ;;
45724      yum)
45725        yum_help     $MISSING_DEPENDENCY ;;
45726      port)
45727        port_help    $MISSING_DEPENDENCY ;;
45728      pkgutil)
45729        pkgutil_help $MISSING_DEPENDENCY ;;
45730      pkgadd)
45731        pkgadd_help  $MISSING_DEPENDENCY ;;
45732    esac
45733
45734    if test "x$PKGHANDLER_COMMAND" != x; then
45735      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45736    fi
45737  fi
45738
45739          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45740$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45741        elif test "x$COMPILE_TYPE" = xcross; then
45742          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45743$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45744        fi
45745        as_fn_error $? "Cannot continue." "$LINENO" 5
45746      fi
45747    fi
45748  fi
45749
45750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45751$as_echo_n "checking for target address size... " >&6; }
45752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45753$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45754
45755
45756  ###############################################################################
45757  #
45758  # Is the target little of big endian?
45759  #
45760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45761$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45762if ${ac_cv_c_bigendian+:} false; then :
45763  $as_echo_n "(cached) " >&6
45764else
45765  ac_cv_c_bigendian=unknown
45766    # See if we're dealing with a universal compiler.
45767    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45768/* end confdefs.h.  */
45769#ifndef __APPLE_CC__
45770	       not a universal capable compiler
45771	     #endif
45772	     typedef int dummy;
45773
45774_ACEOF
45775if ac_fn_cxx_try_compile "$LINENO"; then :
45776
45777	# Check for potential -arch flags.  It is not universal unless
45778	# there are at least two -arch flags with different values.
45779	ac_arch=
45780	ac_prev=
45781	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45782	 if test -n "$ac_prev"; then
45783	   case $ac_word in
45784	     i?86 | x86_64 | ppc | ppc64)
45785	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45786		 ac_arch=$ac_word
45787	       else
45788		 ac_cv_c_bigendian=universal
45789		 break
45790	       fi
45791	       ;;
45792	   esac
45793	   ac_prev=
45794	 elif test "x$ac_word" = "x-arch"; then
45795	   ac_prev=arch
45796	 fi
45797       done
45798fi
45799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45800    if test $ac_cv_c_bigendian = unknown; then
45801      # See if sys/param.h defines the BYTE_ORDER macro.
45802      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45803/* end confdefs.h.  */
45804#include <sys/types.h>
45805	     #include <sys/param.h>
45806
45807int
45808main ()
45809{
45810#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45811		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45812		     && LITTLE_ENDIAN)
45813	      bogus endian macros
45814	     #endif
45815
45816  ;
45817  return 0;
45818}
45819_ACEOF
45820if ac_fn_cxx_try_compile "$LINENO"; then :
45821  # It does; now see whether it defined to BIG_ENDIAN or not.
45822	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45823/* end confdefs.h.  */
45824#include <sys/types.h>
45825		#include <sys/param.h>
45826
45827int
45828main ()
45829{
45830#if BYTE_ORDER != BIG_ENDIAN
45831		 not big endian
45832		#endif
45833
45834  ;
45835  return 0;
45836}
45837_ACEOF
45838if ac_fn_cxx_try_compile "$LINENO"; then :
45839  ac_cv_c_bigendian=yes
45840else
45841  ac_cv_c_bigendian=no
45842fi
45843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45844fi
45845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45846    fi
45847    if test $ac_cv_c_bigendian = unknown; then
45848      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45849      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45850/* end confdefs.h.  */
45851#include <limits.h>
45852
45853int
45854main ()
45855{
45856#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
45857	      bogus endian macros
45858	     #endif
45859
45860  ;
45861  return 0;
45862}
45863_ACEOF
45864if ac_fn_cxx_try_compile "$LINENO"; then :
45865  # It does; now see whether it defined to _BIG_ENDIAN or not.
45866	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45867/* end confdefs.h.  */
45868#include <limits.h>
45869
45870int
45871main ()
45872{
45873#ifndef _BIG_ENDIAN
45874		 not big endian
45875		#endif
45876
45877  ;
45878  return 0;
45879}
45880_ACEOF
45881if ac_fn_cxx_try_compile "$LINENO"; then :
45882  ac_cv_c_bigendian=yes
45883else
45884  ac_cv_c_bigendian=no
45885fi
45886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45887fi
45888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45889    fi
45890    if test $ac_cv_c_bigendian = unknown; then
45891      # Compile a test program.
45892      if test "$cross_compiling" = yes; then :
45893  # Try to guess by grepping values from an object file.
45894	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45895/* end confdefs.h.  */
45896short int ascii_mm[] =
45897		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
45898		short int ascii_ii[] =
45899		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
45900		int use_ascii (int i) {
45901		  return ascii_mm[i] + ascii_ii[i];
45902		}
45903		short int ebcdic_ii[] =
45904		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
45905		short int ebcdic_mm[] =
45906		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
45907		int use_ebcdic (int i) {
45908		  return ebcdic_mm[i] + ebcdic_ii[i];
45909		}
45910		extern int foo;
45911
45912int
45913main ()
45914{
45915return use_ascii (foo) == use_ebcdic (foo);
45916  ;
45917  return 0;
45918}
45919_ACEOF
45920if ac_fn_cxx_try_compile "$LINENO"; then :
45921  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
45922	      ac_cv_c_bigendian=yes
45923	    fi
45924	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
45925	      if test "$ac_cv_c_bigendian" = unknown; then
45926		ac_cv_c_bigendian=no
45927	      else
45928		# finding both strings is unlikely to happen, but who knows?
45929		ac_cv_c_bigendian=unknown
45930	      fi
45931	    fi
45932fi
45933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45934else
45935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45936/* end confdefs.h.  */
45937$ac_includes_default
45938int
45939main ()
45940{
45941
45942	     /* Are we little or big endian?  From Harbison&Steele.  */
45943	     union
45944	     {
45945	       long int l;
45946	       char c[sizeof (long int)];
45947	     } u;
45948	     u.l = 1;
45949	     return u.c[sizeof (long int) - 1] == 1;
45950
45951  ;
45952  return 0;
45953}
45954_ACEOF
45955if ac_fn_cxx_try_run "$LINENO"; then :
45956  ac_cv_c_bigendian=no
45957else
45958  ac_cv_c_bigendian=yes
45959fi
45960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45961  conftest.$ac_objext conftest.beam conftest.$ac_ext
45962fi
45963
45964    fi
45965fi
45966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
45967$as_echo "$ac_cv_c_bigendian" >&6; }
45968 case $ac_cv_c_bigendian in #(
45969   yes)
45970     ENDIAN="big";; #(
45971   no)
45972     ENDIAN="little" ;; #(
45973   universal)
45974     ENDIAN="universal_endianness"
45975     ;; #(
45976   *)
45977     ENDIAN="unknown" ;;
45978 esac
45979
45980
45981  if test "x$ENDIAN" = xuniversal_endianness; then
45982    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
45983  fi
45984  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
45985    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
45986  fi
45987
45988
45989# Configure flags for the tools
45990
45991  ###############################################################################
45992  #
45993  # How to compile shared libraries.
45994  #
45995
45996  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45997    PICFLAG="-fPIC"
45998    C_FLAG_REORDER=''
45999    CXX_FLAG_REORDER=''
46000
46001    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46002      # Linking is different on MacOSX
46003      if test "x$STATIC_BUILD" = xtrue; then
46004        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46005      else
46006        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46007      fi
46008      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46009      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46010      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46011      SET_SHARED_LIBRARY_MAPFILE=''
46012    else
46013      # Default works for linux, might work on other platforms as well.
46014      SHARED_LIBRARY_FLAGS='-shared'
46015      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46016      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46017      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46018      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46019    fi
46020  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46021    C_FLAG_REORDER=''
46022    CXX_FLAG_REORDER=''
46023
46024    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46025      # Linking is different on MacOSX
46026      PICFLAG=''
46027      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46028      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46029      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46030      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46031      SET_SHARED_LIBRARY_MAPFILE=''
46032    else
46033      # Default works for linux, might work on other platforms as well.
46034      PICFLAG='-fPIC'
46035      SHARED_LIBRARY_FLAGS='-shared'
46036      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46037      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46038      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46039      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46040    fi
46041  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46042    PICFLAG="-KPIC"
46043    C_FLAG_REORDER='-xF'
46044    CXX_FLAG_REORDER='-xF'
46045    SHARED_LIBRARY_FLAGS="-G"
46046    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46047    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46048    SET_SHARED_LIBRARY_NAME='-h $1'
46049    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46050  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46051    PICFLAG="-qpic=large"
46052    C_FLAG_REORDER=''
46053    CXX_FLAG_REORDER=''
46054    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46055    SET_EXECUTABLE_ORIGIN=""
46056    SET_SHARED_LIBRARY_ORIGIN=''
46057    SET_SHARED_LIBRARY_NAME=''
46058    SET_SHARED_LIBRARY_MAPFILE=''
46059  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46060    PICFLAG=""
46061    C_FLAG_REORDER=''
46062    CXX_FLAG_REORDER=''
46063    SHARED_LIBRARY_FLAGS="-dll"
46064    SET_EXECUTABLE_ORIGIN=''
46065    SET_SHARED_LIBRARY_ORIGIN=''
46066    SET_SHARED_LIBRARY_NAME=''
46067    SET_SHARED_LIBRARY_MAPFILE=''
46068  fi
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46079    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46080    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46081    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46082  fi
46083  # The (cross) compiler is now configured, we can now test capabilities
46084  # of the target platform.
46085
46086
46087
46088  ###############################################################################
46089  #
46090  # Setup the opt flags for different compilers
46091  # and different operating systems.
46092  #
46093
46094  # FIXME: this was indirectly the old default, but just inherited.
46095  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46096  #   C_FLAG_DEPS="-MMD -MF"
46097  # fi
46098
46099  # Generate make dependency files
46100  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46101    C_FLAG_DEPS="-MMD -MF"
46102  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46103    C_FLAG_DEPS="-MMD -MF"
46104  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46105    C_FLAG_DEPS="-xMMD -xMF"
46106  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46107    C_FLAG_DEPS="-qmakedep=gcc -MF"
46108  fi
46109  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46110
46111
46112
46113  # Debug symbols
46114  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46115    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46116      # reduce from default "-g2" option to save space
46117      CFLAGS_DEBUG_SYMBOLS="-g1"
46118      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46119    else
46120      CFLAGS_DEBUG_SYMBOLS="-g"
46121      CXXFLAGS_DEBUG_SYMBOLS="-g"
46122    fi
46123  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46124    CFLAGS_DEBUG_SYMBOLS="-g"
46125    CXXFLAGS_DEBUG_SYMBOLS="-g"
46126  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46127    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46128    # -g0 enables debug symbols without disabling inlining.
46129    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46130  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46131    CFLAGS_DEBUG_SYMBOLS="-g"
46132    CXXFLAGS_DEBUG_SYMBOLS="-g"
46133  fi
46134
46135
46136
46137  # bounds, memory and behavior checking options
46138  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46139    case $DEBUG_LEVEL in
46140    release )
46141      # no adjustment
46142      ;;
46143    fastdebug )
46144      # no adjustment
46145      ;;
46146    slowdebug )
46147      # Add runtime stack smashing and undefined behavior checks.
46148      # Not all versions of gcc support -fstack-protector
46149      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46150
46151
46152
46153
46154
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
46191
46192    # Execute function body
46193
46194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46195$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46196  supports=yes
46197
46198  saved_cflags="$CFLAGS"
46199  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46200  ac_ext=c
46201ac_cpp='$CPP $CPPFLAGS'
46202ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46203ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46204ac_compiler_gnu=$ac_cv_c_compiler_gnu
46205
46206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46207/* end confdefs.h.  */
46208int i;
46209_ACEOF
46210if ac_fn_c_try_compile "$LINENO"; then :
46211
46212else
46213  supports=no
46214fi
46215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46216  ac_ext=cpp
46217ac_cpp='$CXXCPP $CPPFLAGS'
46218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46221
46222  CFLAGS="$saved_cflags"
46223
46224  saved_cxxflags="$CXXFLAGS"
46225  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46226  ac_ext=cpp
46227ac_cpp='$CXXCPP $CPPFLAGS'
46228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46231
46232  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46233/* end confdefs.h.  */
46234int i;
46235_ACEOF
46236if ac_fn_cxx_try_compile "$LINENO"; then :
46237
46238else
46239  supports=no
46240fi
46241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46242  ac_ext=cpp
46243ac_cpp='$CXXCPP $CPPFLAGS'
46244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46247
46248  CXXFLAGS="$saved_cxxflags"
46249
46250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46251$as_echo "$supports" >&6; }
46252  if test "x$supports" = "xyes" ; then
46253    :
46254
46255  else
46256    :
46257    STACK_PROTECTOR_CFLAG=""
46258  fi
46259
46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
46270
46271
46272      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46273      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46274      ;;
46275    esac
46276  fi
46277
46278  # Optimization levels
46279  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46280    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46281
46282    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46283      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46284      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46285      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46286      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46287      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46288      C_O_FLAG_NONE="-xregs=no%frameptr"
46289      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46290      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46291      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46292      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46293      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46294      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46295        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46296        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46297      fi
46298    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46299      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46300      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46301      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46302      C_O_FLAG_DEBUG=""
46303      C_O_FLAG_NONE=""
46304      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46305      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46306      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46307      C_O_FLAG_DEBUG=""
46308      CXX_O_FLAG_NONE=""
46309    fi
46310  else
46311    # The remaining toolchains share opt flags between CC and CXX;
46312    # setup for C and duplicate afterwards.
46313    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46314      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46315        # On MacOSX we optimize for size, something
46316        # we should do for all platforms?
46317        C_O_FLAG_HIGHEST="-Os"
46318        C_O_FLAG_HI="-Os"
46319        C_O_FLAG_NORM="-Os"
46320      else
46321        C_O_FLAG_HIGHEST="-O3"
46322        C_O_FLAG_HI="-O3"
46323        C_O_FLAG_NORM="-O2"
46324      fi
46325      C_O_FLAG_DEBUG="-O0"
46326      C_O_FLAG_NONE="-O0"
46327    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46328      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46329        # On MacOSX we optimize for size, something
46330        # we should do for all platforms?
46331        C_O_FLAG_HIGHEST="-Os"
46332        C_O_FLAG_HI="-Os"
46333        C_O_FLAG_NORM="-Os"
46334      else
46335        C_O_FLAG_HIGHEST="-O3"
46336        C_O_FLAG_HI="-O3"
46337        C_O_FLAG_NORM="-O2"
46338      fi
46339      C_O_FLAG_DEBUG="-O0"
46340      C_O_FLAG_NONE="-O0"
46341    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46342      C_O_FLAG_HIGHEST="-O3"
46343      C_O_FLAG_HI="-O3 -qstrict"
46344      C_O_FLAG_NORM="-O2"
46345      C_O_FLAG_DEBUG="-qnoopt"
46346      C_O_FLAG_NONE="-qnoopt"
46347    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46348      C_O_FLAG_HIGHEST="-O2"
46349      C_O_FLAG_HI="-O1"
46350      C_O_FLAG_NORM="-O1"
46351      C_O_FLAG_DEBUG="-Od"
46352      C_O_FLAG_NONE="-Od"
46353    fi
46354    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46355    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46356    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46357    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46358    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46359  fi
46360
46361  # Adjust optimization flags according to debug level.
46362  case $DEBUG_LEVEL in
46363    release )
46364      # no adjustment
46365      ;;
46366    fastdebug )
46367      # Not quite so much optimization
46368      C_O_FLAG_HI="$C_O_FLAG_NORM"
46369      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46370      ;;
46371    slowdebug )
46372      # Disable optimization
46373      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46374      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46375      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46376      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46377      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46378      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46379      ;;
46380  esac
46381
46382
46383
46384
46385
46386
46387
46388
46389
46390
46391
46392
46393
46394  # Special extras...
46395  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46396    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46397      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46398      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46399    fi
46400    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46401    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46402  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46403    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46404    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46405  fi
46406
46407  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46408  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46409  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46410
46411  ###############################################################################
46412  #
46413  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46414  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46415  #
46416
46417  # Setup compiler/platform specific flags into
46418  #    CFLAGS_JDK    - C Compiler flags
46419  #    CXXFLAGS_JDK  - C++ Compiler flags
46420  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46421  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46422    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46423      # Force compatibility with i586 on 32 bit intel platforms.
46424      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46425    fi
46426    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46427        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46428    case $OPENJDK_TARGET_CPU_ARCH in
46429      arm )
46430        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46431        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46432        ;;
46433      ppc )
46434        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46435        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46436        ;;
46437      * )
46438        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46439        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46440        ;;
46441    esac
46442  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46443    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46444	    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46445	      # Force compatibility with i586 on 32 bit intel platforms.
46446	      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46447	    fi
46448	    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46449	        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46450	    case $OPENJDK_TARGET_CPU_ARCH in
46451	      ppc )
46452	        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46453	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46454	        ;;
46455	      * )
46456	        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46457	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46458	        ;;
46459	    esac
46460    fi
46461  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46462    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46463    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46464      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46465    fi
46466
46467    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46468    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46469  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46470    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46471    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46472  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46473    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46474        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46475        -DWIN32_LEAN_AND_MEAN \
46476        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46477        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46478        -DWIN32 -DIAL"
46479    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46480      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46481    else
46482      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46483    fi
46484    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46485    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46486    # studio.
46487    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46488      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46489          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46490    fi
46491  fi
46492
46493  ###############################################################################
46494
46495  # Adjust flags according to debug level.
46496  case $DEBUG_LEVEL in
46497    fastdebug | slowdebug )
46498      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46499      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46500      JAVAC_FLAGS="$JAVAC_FLAGS -g"
46501      ;;
46502    release )
46503      ;;
46504    * )
46505      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46506      ;;
46507  esac
46508
46509  # Setup LP64
46510  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46511
46512  # Set some common defines. These works for all compilers, but assume
46513  # -D is universally accepted.
46514
46515  # Setup endianness
46516  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46517    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46518    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46519    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46520    #   Note: -Dmacro         is the same as    #define macro 1
46521    #         -Dmacro=        is the same as    #define macro
46522    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46523      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46524    else
46525      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46526    fi
46527  else
46528    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46529    # are defined in the system?
46530    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46531      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46532    else
46533      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46534    fi
46535  fi
46536
46537  # Setup target OS define. Use OS target name but in upper case.
46538  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46539  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46540
46541  # Setup target CPU
46542  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46543
46544  # Setup debug/release defines
46545  if test "x$DEBUG_LEVEL" = xrelease; then
46546    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46547    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46548      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46549    fi
46550  else
46551    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46552  fi
46553
46554  # Set some additional per-OS defines.
46555  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46556    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46557  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46558    # FIXME: PPC64 should not be here.
46559    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46560  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46561    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46562  fi
46563
46564  # Additional macosx handling
46565  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46566    # Setting these parameters makes it an error to link to macosx APIs that are
46567    # newer than the given OS version and makes the linked binaries compatible
46568    # even if built on a newer version of the OS.
46569    # The expected format is X.Y.Z
46570    MACOSX_VERSION_MIN=10.7.0
46571
46572
46573    # The macro takes the version with no dots, ex: 1070
46574    # Let the flags variables get resolved in make for easier override on make
46575    # command line.
46576    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46577    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46578  fi
46579
46580  # Setup some hard coded includes
46581  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46582      -I${JDK_TOPDIR}/src/java.base/share/native/include \
46583      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46584      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46585      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46586      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46587
46588  # The shared libraries are compiled using the picflag.
46589  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46590  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46591
46592  # Executable flags
46593  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46594  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46595
46596
46597
46598
46599
46600
46601  # Flags for compiling test libraries
46602  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46603  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46604
46605  # Flags for compiling test executables
46606  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46607  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46608
46609
46610
46611
46612
46613
46614  # Setup LDFLAGS et al.
46615  #
46616
46617  # Now this is odd. The JDK native libraries have to link against libjvm.so
46618  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46619  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46620  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46621  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46622  # libraries will link to whatever is in memory. Yuck.
46623  #
46624  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46625  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46626    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46627    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46628      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46629    fi
46630    # TODO: make -debug optional "--disable-full-debug-symbols"
46631    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46632  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46633    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46634    # We have previously set HAS_GNU_HASH if this is the case
46635    if test -n "$HAS_GNU_HASH"; then
46636      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
46637    fi
46638    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46639      # And since we now know that the linker is gnu, then add -z defs, to forbid
46640      # undefined symbols in object files.
46641      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
46642      case $DEBUG_LEVEL in
46643        release )
46644          # tell linker to optimize libraries.
46645          # Should this be supplied to the OSS linker as well?
46646          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
46647          ;;
46648        slowdebug )
46649          if test "x$HAS_LINKER_NOW" = "xtrue"; then
46650            # do relocations at load
46651            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46652            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46653          fi
46654          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46655            # mark relocations read only
46656            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46657            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46658          fi
46659          ;;
46660        fastdebug )
46661          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46662            # mark relocations read only
46663            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46664            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46665          fi
46666          ;;
46667        * )
46668          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46669          ;;
46670        esac
46671    fi
46672  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46673    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
46674    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46675  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46676    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46677  fi
46678
46679  # Customize LDFLAGS for executables
46680
46681  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46682
46683  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46684    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46685      LDFLAGS_STACK_SIZE=1048576
46686    else
46687      LDFLAGS_STACK_SIZE=327680
46688    fi
46689    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46690  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46691    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
46692  fi
46693
46694  # Customize LDFLAGS for libs
46695  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46696
46697  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
46698  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46699    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46700        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46701    JDKLIB_LIBS=""
46702  else
46703    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46704        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46705
46706    # On some platforms (mac) the linker warns about non existing -L dirs.
46707    # Add server first if available. Linking aginst client does not always produce the same results.
46708    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46709    # Default to server for other variants.
46710    if test "x$JVM_VARIANT_SERVER" = xtrue; then
46711      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46712    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46713      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46714    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46715      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46716    else
46717      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46718    fi
46719
46720    JDKLIB_LIBS="-ljava -ljvm"
46721    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46722      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46723    fi
46724  fi
46725
46726
46727
46728
46729
46730
46731
46732  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46733  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46734
46735
46736
46737
46738
46739  # Some Zero and Shark settings.
46740  # ZERO_ARCHFLAG tells the compiler which mode to build for
46741  case "${OPENJDK_TARGET_CPU}" in
46742    s390)
46743      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46744      ;;
46745    *)
46746      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46747  esac
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783
46784
46785
46786
46787
46788
46789
46790    # Execute function body
46791
46792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46793$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46794  supports=yes
46795
46796  saved_cflags="$CFLAGS"
46797  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46798  ac_ext=c
46799ac_cpp='$CPP $CPPFLAGS'
46800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46802ac_compiler_gnu=$ac_cv_c_compiler_gnu
46803
46804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46805/* end confdefs.h.  */
46806int i;
46807_ACEOF
46808if ac_fn_c_try_compile "$LINENO"; then :
46809
46810else
46811  supports=no
46812fi
46813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46814  ac_ext=cpp
46815ac_cpp='$CXXCPP $CPPFLAGS'
46816ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46817ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46818ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46819
46820  CFLAGS="$saved_cflags"
46821
46822  saved_cxxflags="$CXXFLAGS"
46823  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46824  ac_ext=cpp
46825ac_cpp='$CXXCPP $CPPFLAGS'
46826ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46827ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46828ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46829
46830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46831/* end confdefs.h.  */
46832int i;
46833_ACEOF
46834if ac_fn_cxx_try_compile "$LINENO"; then :
46835
46836else
46837  supports=no
46838fi
46839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46840  ac_ext=cpp
46841ac_cpp='$CXXCPP $CPPFLAGS'
46842ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46843ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46844ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46845
46846  CXXFLAGS="$saved_cxxflags"
46847
46848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46849$as_echo "$supports" >&6; }
46850  if test "x$supports" = "xyes" ; then
46851    :
46852
46853  else
46854    :
46855    ZERO_ARCHFLAG=""
46856  fi
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871  # Check that the compiler supports -mX (or -qX on AIX) flags
46872  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
46919
46920    # Execute function body
46921
46922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
46923$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
46924  supports=yes
46925
46926  saved_cflags="$CFLAGS"
46927  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46928  ac_ext=c
46929ac_cpp='$CPP $CPPFLAGS'
46930ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46931ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46932ac_compiler_gnu=$ac_cv_c_compiler_gnu
46933
46934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46935/* end confdefs.h.  */
46936int i;
46937_ACEOF
46938if ac_fn_c_try_compile "$LINENO"; then :
46939
46940else
46941  supports=no
46942fi
46943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46944  ac_ext=cpp
46945ac_cpp='$CXXCPP $CPPFLAGS'
46946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46949
46950  CFLAGS="$saved_cflags"
46951
46952  saved_cxxflags="$CXXFLAGS"
46953  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46954  ac_ext=cpp
46955ac_cpp='$CXXCPP $CPPFLAGS'
46956ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46957ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46958ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46959
46960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46961/* end confdefs.h.  */
46962int i;
46963_ACEOF
46964if ac_fn_cxx_try_compile "$LINENO"; then :
46965
46966else
46967  supports=no
46968fi
46969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46970  ac_ext=cpp
46971ac_cpp='$CXXCPP $CPPFLAGS'
46972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46975
46976  CXXFLAGS="$saved_cxxflags"
46977
46978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46979$as_echo "$supports" >&6; }
46980  if test "x$supports" = "xyes" ; then
46981    :
46982    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
46983  else
46984    :
46985    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
46986  fi
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001  # Check whether --enable-warnings-as-errors was given.
47002if test "${enable_warnings_as_errors+set}" = set; then :
47003  enableval=$enable_warnings_as_errors;
47004fi
47005
47006
47007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47008$as_echo_n "checking if native warnings are errors... " >&6; }
47009  if test "x$enable_warnings_as_errors" = "xyes"; then
47010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47011$as_echo "yes (explicitely set)" >&6; }
47012    WARNINGS_AS_ERRORS=true
47013  elif test "x$enable_warnings_as_errors" = "xno"; then
47014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47015$as_echo "no" >&6; }
47016    WARNINGS_AS_ERRORS=false
47017  elif test "x$enable_warnings_as_errors" = "x"; then
47018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47019$as_echo "yes (default)" >&6; }
47020    WARNINGS_AS_ERRORS=true
47021  else
47022    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47023  fi
47024
47025  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47026    # Set legacy hotspot variable
47027    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47028  else
47029    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47030  fi
47031
47032
47033
47034
47035  case "${TOOLCHAIN_TYPE}" in
47036    microsoft)
47037      DISABLE_WARNING_PREFIX="-wd"
47038      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47039      ;;
47040    solstudio)
47041      DISABLE_WARNING_PREFIX="-erroff="
47042      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47043      ;;
47044    gcc)
47045      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093    # Execute function body
47094
47095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47096$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47097  supports=yes
47098
47099  saved_cflags="$CFLAGS"
47100  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47101  ac_ext=c
47102ac_cpp='$CPP $CPPFLAGS'
47103ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47104ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47105ac_compiler_gnu=$ac_cv_c_compiler_gnu
47106
47107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47108/* end confdefs.h.  */
47109int i;
47110_ACEOF
47111if ac_fn_c_try_compile "$LINENO"; then :
47112
47113else
47114  supports=no
47115fi
47116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47117  ac_ext=cpp
47118ac_cpp='$CXXCPP $CPPFLAGS'
47119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47122
47123  CFLAGS="$saved_cflags"
47124
47125  saved_cxxflags="$CXXFLAGS"
47126  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47127  ac_ext=cpp
47128ac_cpp='$CXXCPP $CPPFLAGS'
47129ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47130ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47131ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47132
47133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47134/* end confdefs.h.  */
47135int i;
47136_ACEOF
47137if ac_fn_cxx_try_compile "$LINENO"; then :
47138
47139else
47140  supports=no
47141fi
47142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47143  ac_ext=cpp
47144ac_cpp='$CXXCPP $CPPFLAGS'
47145ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47146ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47147ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47148
47149  CXXFLAGS="$saved_cxxflags"
47150
47151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47152$as_echo "$supports" >&6; }
47153  if test "x$supports" = "xyes" ; then
47154    :
47155    GCC_CAN_DISABLE_WARNINGS=true
47156  else
47157    :
47158    GCC_CAN_DISABLE_WARNINGS=false
47159
47160  fi
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47174        DISABLE_WARNING_PREFIX="-Wno-"
47175      else
47176        DISABLE_WARNING_PREFIX=
47177      fi
47178      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47179      # Repeate the check for the BUILD_CC
47180      CC_OLD="$CC"
47181      CC="$BUILD_CC"
47182
47183
47184
47185
47186
47187
47188
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229    # Execute function body
47230
47231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47232$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47233  supports=yes
47234
47235  saved_cflags="$CFLAGS"
47236  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47237  ac_ext=c
47238ac_cpp='$CPP $CPPFLAGS'
47239ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47240ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47241ac_compiler_gnu=$ac_cv_c_compiler_gnu
47242
47243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47244/* end confdefs.h.  */
47245int i;
47246_ACEOF
47247if ac_fn_c_try_compile "$LINENO"; then :
47248
47249else
47250  supports=no
47251fi
47252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47253  ac_ext=cpp
47254ac_cpp='$CXXCPP $CPPFLAGS'
47255ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47256ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47257ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47258
47259  CFLAGS="$saved_cflags"
47260
47261  saved_cxxflags="$CXXFLAGS"
47262  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47263  ac_ext=cpp
47264ac_cpp='$CXXCPP $CPPFLAGS'
47265ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47266ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47267ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47268
47269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47270/* end confdefs.h.  */
47271int i;
47272_ACEOF
47273if ac_fn_cxx_try_compile "$LINENO"; then :
47274
47275else
47276  supports=no
47277fi
47278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47279  ac_ext=cpp
47280ac_cpp='$CXXCPP $CPPFLAGS'
47281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47284
47285  CXXFLAGS="$saved_cxxflags"
47286
47287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47288$as_echo "$supports" >&6; }
47289  if test "x$supports" = "xyes" ; then
47290    :
47291    BUILD_CC_CAN_DISABLE_WARNINGS=true
47292  else
47293    :
47294    BUILD_CC_CAN_DISABLE_WARNINGS=false
47295
47296  fi
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47310        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47311      else
47312        BUILD_CC_DISABLE_WARNING_PREFIX=
47313      fi
47314      CC="$CC_OLD"
47315      ;;
47316    clang)
47317      DISABLE_WARNING_PREFIX="-Wno-"
47318      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47319      ;;
47320  esac
47321
47322
47323
47324
47325# Setup debug symbols (need objcopy from the toolchain for that)
47326
47327  #
47328  # NATIVE_DEBUG_SYMBOLS
47329  # This must be done after the toolchain is setup, since we're looking at objcopy.
47330  #
47331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47332$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47333
47334# Check whether --with-native-debug-symbols was given.
47335if test "${with_native_debug_symbols+set}" = set; then :
47336  withval=$with_native_debug_symbols;
47337        if test "x$OPENJDK_TARGET_OS" = xaix; then
47338          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
47339            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
47340          fi
47341        fi
47342
47343else
47344
47345        if test "x$OPENJDK_TARGET_OS" = xaix; then
47346          # AIX doesn't support 'zipped' so use 'internal' as default
47347          with_native_debug_symbols="internal"
47348        else
47349          with_native_debug_symbols="zipped"
47350        fi
47351
47352fi
47353
47354  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47356$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47357
47358  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47359
47360    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47361      if test "x$OBJCOPY" = x; then
47362        # enabling of enable-debug-symbols and can't find objcopy
47363        # this is an error
47364        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47365      fi
47366    fi
47367
47368    COMPILE_WITH_DEBUG_SYMBOLS=true
47369    COPY_DEBUG_SYMBOLS=true
47370    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
47371
47372    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47373    DEBUG_BINARIES=false
47374    STRIP_POLICY=min_strip
47375
47376  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47377    COMPILE_WITH_DEBUG_SYMBOLS=false
47378    COPY_DEBUG_SYMBOLS=false
47379    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47380
47381    DEBUG_BINARIES=false
47382    STRIP_POLICY=no_strip
47383  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47384    COMPILE_WITH_DEBUG_SYMBOLS=true
47385    COPY_DEBUG_SYMBOLS=false
47386    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47387
47388    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
47389    DEBUG_BINARIES=true
47390    STRIP_POLICY=no_strip
47391    STRIP=""
47392
47393  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47394
47395    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47396      if test "x$OBJCOPY" = x; then
47397        # enabling of enable-debug-symbols and can't find objcopy
47398        # this is an error
47399        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47400      fi
47401    fi
47402
47403    COMPILE_WITH_DEBUG_SYMBOLS=true
47404    COPY_DEBUG_SYMBOLS=true
47405    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47406
47407    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47408    DEBUG_BINARIES=false
47409    STRIP_POLICY=min_strip
47410  else
47411    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47412  fi
47413
47414  # --enable-debug-symbols is deprecated.
47415  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47416
47417  # Check whether --enable-debug-symbols was given.
47418if test "${enable_debug_symbols+set}" = set; then :
47419  enableval=$enable_debug_symbols;
47420fi
47421
47422  if test "x$enable_debug_symbols" != x; then
47423    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47424$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47425
47426    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47427      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47428$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47429    fi
47430
47431  fi
47432
47433
47434  # --enable-zip-debug-info is deprecated.
47435  # Please use --with-native-debug-symbols=zipped .
47436
47437  # Check whether --enable-zip-debug-info was given.
47438if test "${enable_zip_debug_info+set}" = set; then :
47439  enableval=$enable_zip_debug_info;
47440fi
47441
47442  if test "x$enable_zip_debug_info" != x; then
47443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47444$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47445
47446    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47447      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47448$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47449    fi
47450
47451  fi
47452
47453
47454
47455
47456
47457
47458  # Legacy values
47459
47460
47461
47462
47463  # Check whether --enable-native-coverage was given.
47464if test "${enable_native_coverage+set}" = set; then :
47465  enableval=$enable_native_coverage;
47466fi
47467
47468  GCOV_ENABLED="false"
47469  if test "x$enable_native_coverage" = "xyes"; then
47470    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47472$as_echo_n "checking if native coverage is enabled... " >&6; }
47473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47474$as_echo "yes" >&6; }
47475      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47476      GCOV_LDFLAGS="-fprofile-arcs"
47477      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47478      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47479      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47480      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47481      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47482      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47483      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47484      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47485      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47486      GCOV_ENABLED="true"
47487    else
47488      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47489    fi
47490  elif test "x$enable_native_coverage" = "xno"; then
47491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47492$as_echo_n "checking if native coverage is enabled... " >&6; }
47493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47494$as_echo "no" >&6; }
47495  elif test "x$enable_native_coverage" != "x"; then
47496    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47497  fi
47498
47499
47500
47501
47502###############################################################################
47503#
47504# Check dependencies for external and internal libraries.
47505#
47506###############################################################################
47507
47508# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47509
47510  # When using cygwin or msys, we need a wrapper binary that renames
47511  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47512  # @files and rewrites these too! This wrapper binary is
47513  # called fixpath.
47514  FIXPATH=
47515  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47517$as_echo_n "checking if fixpath can be created... " >&6; }
47518    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47519    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47520    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47521    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47522      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47523      FIXPATH="$FIXPATH_BIN -c"
47524    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47525      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47526      # @ was chosen as separator to minimize risk of other tools messing around with it
47527      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47528          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47529      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47530      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47531    fi
47532    FIXPATH_SRC_W="$FIXPATH_SRC"
47533    FIXPATH_BIN_W="$FIXPATH_BIN"
47534
47535  unix_path="$FIXPATH_SRC_W"
47536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47537    windows_path=`$CYGPATH -m "$unix_path"`
47538    FIXPATH_SRC_W="$windows_path"
47539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47540    windows_path=`cmd //c echo $unix_path`
47541    FIXPATH_SRC_W="$windows_path"
47542  fi
47543
47544
47545  unix_path="$FIXPATH_BIN_W"
47546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47547    windows_path=`$CYGPATH -m "$unix_path"`
47548    FIXPATH_BIN_W="$windows_path"
47549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47550    windows_path=`cmd //c echo $unix_path`
47551    FIXPATH_BIN_W="$windows_path"
47552  fi
47553
47554    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47555    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47556    cd $FIXPATH_DIR
47557    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47558    cd $CURDIR
47559
47560    if test ! -x $FIXPATH_BIN; then
47561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47562$as_echo "no" >&6; }
47563      cat $FIXPATH_DIR/fixpath1.log
47564      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47565    fi
47566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47567$as_echo "yes" >&6; }
47568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47569$as_echo_n "checking if fixpath.exe works... " >&6; }
47570    cd $FIXPATH_DIR
47571    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47572        > $FIXPATH_DIR/fixpath2.log 2>&1
47573    cd $CURDIR
47574    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47576$as_echo "no" >&6; }
47577      cat $FIXPATH_DIR/fixpath2.log
47578      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47579    fi
47580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47581$as_echo "yes" >&6; }
47582
47583    FIXPATH_DETACH_FLAG="--detach"
47584  fi
47585
47586
47587
47588
47589
47590
47591  # Check if X11 is needed
47592  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47593    # No X11 support on windows or macosx
47594    NEEDS_LIB_X11=false
47595  else
47596    if test "x$SUPPORT_HEADFUL" = xno; then
47597      # No X11 support if building headless-only
47598      NEEDS_LIB_X11=false
47599    else
47600      # All other instances need X11
47601      NEEDS_LIB_X11=true
47602    fi
47603  fi
47604
47605  # Check if cups is needed
47606  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47607    # Windows have a separate print system
47608    NEEDS_LIB_CUPS=false
47609  else
47610    NEEDS_LIB_CUPS=true
47611  fi
47612
47613  # Check if freetype is needed
47614  if test "x$OPENJDK" = "xtrue"; then
47615    NEEDS_LIB_FREETYPE=true
47616  else
47617    NEEDS_LIB_FREETYPE=false
47618  fi
47619
47620  # Check if alsa is needed
47621  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47622    NEEDS_LIB_ALSA=true
47623  else
47624    NEEDS_LIB_ALSA=false
47625  fi
47626
47627  # Check if ffi is needed
47628  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47629    NEEDS_LIB_FFI=true
47630  else
47631    NEEDS_LIB_FFI=false
47632  fi
47633
47634
47635  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47636  # dynamic build is configured on command line.
47637
47638# Check whether --with-stdc++lib was given.
47639if test "${with_stdc__lib+set}" = set; then :
47640  withval=$with_stdc__lib;
47641        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47642                && test "x$with_stdc__lib" != xdefault; then
47643          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47644        fi
47645
47646else
47647  with_stdc__lib=default
47648
47649fi
47650
47651
47652  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47653    # Test if -lstdc++ works.
47654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47655$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47656    ac_ext=cpp
47657ac_cpp='$CXXCPP $CPPFLAGS'
47658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47661
47662    OLD_CXXFLAGS="$CXXFLAGS"
47663    CXXFLAGS="$CXXFLAGS -lstdc++"
47664    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47665/* end confdefs.h.  */
47666
47667int
47668main ()
47669{
47670return 0;
47671  ;
47672  return 0;
47673}
47674_ACEOF
47675if ac_fn_cxx_try_link "$LINENO"; then :
47676  has_dynamic_libstdcxx=yes
47677else
47678  has_dynamic_libstdcxx=no
47679fi
47680rm -f core conftest.err conftest.$ac_objext \
47681    conftest$ac_exeext conftest.$ac_ext
47682    CXXFLAGS="$OLD_CXXFLAGS"
47683    ac_ext=cpp
47684ac_cpp='$CXXCPP $CPPFLAGS'
47685ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47686ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47687ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47688
47689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47690$as_echo "$has_dynamic_libstdcxx" >&6; }
47691
47692    # Test if stdc++ can be linked statically.
47693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47694$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47695    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47696    ac_ext=cpp
47697ac_cpp='$CXXCPP $CPPFLAGS'
47698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47701
47702    OLD_LIBS="$LIBS"
47703    OLD_CXX="$CXX"
47704    LIBS="$STATIC_STDCXX_FLAGS"
47705    CXX="$CC"
47706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47707/* end confdefs.h.  */
47708
47709int
47710main ()
47711{
47712return 0;
47713  ;
47714  return 0;
47715}
47716_ACEOF
47717if ac_fn_cxx_try_link "$LINENO"; then :
47718  has_static_libstdcxx=yes
47719else
47720  has_static_libstdcxx=no
47721fi
47722rm -f core conftest.err conftest.$ac_objext \
47723    conftest$ac_exeext conftest.$ac_ext
47724    LIBS="$OLD_LIBS"
47725    CXX="$OLD_CXX"
47726    ac_ext=cpp
47727ac_cpp='$CXXCPP $CPPFLAGS'
47728ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47729ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47730ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47731
47732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47733$as_echo "$has_static_libstdcxx" >&6; }
47734
47735    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47736      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47737    fi
47738
47739    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47740      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47741    fi
47742
47743    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47744      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47745    fi
47746
47747    # If dynamic was requested, it's available since it would fail above otherwise.
47748    # If dynamic wasn't requested, go with static unless it isn't available.
47749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47750$as_echo_n "checking how to link with libstdc++... " >&6; }
47751    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47752      LIBCXX="$LIBCXX -lstdc++"
47753      LDCXX="$CXX"
47754      STATIC_CXX_SETTING="STATIC_CXX=false"
47755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47756$as_echo "dynamic" >&6; }
47757    else
47758      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47759      LDCXX="$CC"
47760      STATIC_CXX_SETTING="STATIC_CXX=true"
47761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47762$as_echo "static" >&6; }
47763    fi
47764  fi
47765
47766
47767  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47768  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47769    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47770  fi
47771
47772  # TODO better (platform agnostic) test
47773  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47774    LIBCXX="-lstdc++"
47775  fi
47776
47777
47778  # Setup Windows runtime dlls
47779  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47780
47781
47782# Check whether --with-msvcr-dll was given.
47783if test "${with_msvcr_dll+set}" = set; then :
47784  withval=$with_msvcr_dll;
47785fi
47786
47787
47788  if test "x$with_msvcr_dll" != x; then
47789    # If given explicitely by user, do not probe. If not present, fail directly.
47790
47791  DLL_NAME="$MSVCR_NAME"
47792  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47793  METHOD="--with-msvcr-dll"
47794  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47795    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47796$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47797
47798    # Need to check if the found msvcr is correct architecture
47799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47800$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47801    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47803      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47804      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47805      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47806        CORRECT_MSVCR_ARCH="PE32 executable"
47807      else
47808        CORRECT_MSVCR_ARCH="PE32+ executable"
47809      fi
47810    else
47811      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47812        CORRECT_MSVCR_ARCH=386
47813      else
47814        CORRECT_MSVCR_ARCH=x86-64
47815      fi
47816    fi
47817    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47819$as_echo "ok" >&6; }
47820      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47821
47822  # Only process if variable expands to non-empty
47823
47824  if test "x$MSVC_DLL" != x; then
47825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47826
47827  # Input might be given as Windows format, start by converting to
47828  # unix format.
47829  path="$MSVC_DLL"
47830  new_path=`$CYGPATH -u "$path"`
47831
47832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47835  # "foo.exe" is OK but "foo" is an error.
47836  #
47837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47838  # It is also a way to make sure we got the proper file name for the real test later on.
47839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47840  if test "x$test_shortpath" = x; then
47841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47842$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47843    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47844  fi
47845
47846  # Call helper function which possibly converts this using DOS-style short mode.
47847  # If so, the updated path is stored in $new_path.
47848
47849  input_path="$new_path"
47850  # Check if we need to convert this using DOS-style short mode. If the path
47851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47852  # take no chances and rewrite it.
47853  # Note: m4 eats our [], so we need to use [ and ] instead.
47854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47855  if test "x$has_forbidden_chars" != x; then
47856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47860      # Going to short mode and back again did indeed matter. Since short mode is
47861      # case insensitive, let's make it lowercase to improve readability.
47862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47863      # Now convert it back to Unix-style (cygpath)
47864      input_path=`$CYGPATH -u "$shortmode_path"`
47865      new_path="$input_path"
47866    fi
47867  fi
47868
47869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47870  if test "x$test_cygdrive_prefix" = x; then
47871    # As a simple fix, exclude /usr/bin since it's not a real path.
47872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47874      # a path prefixed by /cygdrive for fixpath to work.
47875      new_path="$CYGWIN_ROOT_PATH$input_path"
47876    fi
47877  fi
47878
47879
47880  if test "x$path" != "x$new_path"; then
47881    MSVC_DLL="$new_path"
47882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47883$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47884  fi
47885
47886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47887
47888  path="$MSVC_DLL"
47889  has_colon=`$ECHO $path | $GREP ^.:`
47890  new_path="$path"
47891  if test "x$has_colon" = x; then
47892    # Not in mixed or Windows style, start by that.
47893    new_path=`cmd //c echo $path`
47894  fi
47895
47896
47897  input_path="$new_path"
47898  # Check if we need to convert this using DOS-style short mode. If the path
47899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47900  # take no chances and rewrite it.
47901  # Note: m4 eats our [], so we need to use [ and ] instead.
47902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47903  if test "x$has_forbidden_chars" != x; then
47904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47906  fi
47907
47908
47909  windows_path="$new_path"
47910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47911    unix_path=`$CYGPATH -u "$windows_path"`
47912    new_path="$unix_path"
47913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47915    new_path="$unix_path"
47916  fi
47917
47918  if test "x$path" != "x$new_path"; then
47919    MSVC_DLL="$new_path"
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47921$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47922  fi
47923
47924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47926
47927    else
47928      # We're on a unix platform. Hooray! :)
47929      path="$MSVC_DLL"
47930      has_space=`$ECHO "$path" | $GREP " "`
47931      if test "x$has_space" != x; then
47932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47933$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47935      fi
47936
47937      # Use eval to expand a potential ~
47938      eval path="$path"
47939      if test ! -f "$path" && test ! -d "$path"; then
47940        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47941      fi
47942
47943      if test -d "$path"; then
47944        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47945      else
47946        dir="`$DIRNAME "$path"`"
47947        base="`$BASENAME "$path"`"
47948        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
47949      fi
47950    fi
47951  fi
47952
47953      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47954$as_echo_n "checking for $DLL_NAME... " >&6; }
47955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47956$as_echo "$MSVC_DLL" >&6; }
47957    else
47958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47959$as_echo "incorrect, ignoring" >&6; }
47960      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47961$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47962    fi
47963  fi
47964
47965    if test "x$MSVC_DLL" = x; then
47966      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47967    fi
47968    MSVCR_DLL="$MSVC_DLL"
47969  elif test "x$DEVKIT_MSVCR_DLL" != x; then
47970
47971  DLL_NAME="$MSVCR_NAME"
47972  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47973  METHOD="devkit"
47974  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47975    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47976$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47977
47978    # Need to check if the found msvcr is correct architecture
47979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47980$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47981    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47983      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47984      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47985      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47986        CORRECT_MSVCR_ARCH="PE32 executable"
47987      else
47988        CORRECT_MSVCR_ARCH="PE32+ executable"
47989      fi
47990    else
47991      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47992        CORRECT_MSVCR_ARCH=386
47993      else
47994        CORRECT_MSVCR_ARCH=x86-64
47995      fi
47996    fi
47997    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47999$as_echo "ok" >&6; }
48000      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48001
48002  # Only process if variable expands to non-empty
48003
48004  if test "x$MSVC_DLL" != x; then
48005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48006
48007  # Input might be given as Windows format, start by converting to
48008  # unix format.
48009  path="$MSVC_DLL"
48010  new_path=`$CYGPATH -u "$path"`
48011
48012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48015  # "foo.exe" is OK but "foo" is an error.
48016  #
48017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48018  # It is also a way to make sure we got the proper file name for the real test later on.
48019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48020  if test "x$test_shortpath" = x; then
48021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48022$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48023    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48024  fi
48025
48026  # Call helper function which possibly converts this using DOS-style short mode.
48027  # If so, the updated path is stored in $new_path.
48028
48029  input_path="$new_path"
48030  # Check if we need to convert this using DOS-style short mode. If the path
48031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48032  # take no chances and rewrite it.
48033  # Note: m4 eats our [], so we need to use [ and ] instead.
48034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48035  if test "x$has_forbidden_chars" != x; then
48036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48040      # Going to short mode and back again did indeed matter. Since short mode is
48041      # case insensitive, let's make it lowercase to improve readability.
48042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48043      # Now convert it back to Unix-style (cygpath)
48044      input_path=`$CYGPATH -u "$shortmode_path"`
48045      new_path="$input_path"
48046    fi
48047  fi
48048
48049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48050  if test "x$test_cygdrive_prefix" = x; then
48051    # As a simple fix, exclude /usr/bin since it's not a real path.
48052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48054      # a path prefixed by /cygdrive for fixpath to work.
48055      new_path="$CYGWIN_ROOT_PATH$input_path"
48056    fi
48057  fi
48058
48059
48060  if test "x$path" != "x$new_path"; then
48061    MSVC_DLL="$new_path"
48062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48063$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48064  fi
48065
48066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48067
48068  path="$MSVC_DLL"
48069  has_colon=`$ECHO $path | $GREP ^.:`
48070  new_path="$path"
48071  if test "x$has_colon" = x; then
48072    # Not in mixed or Windows style, start by that.
48073    new_path=`cmd //c echo $path`
48074  fi
48075
48076
48077  input_path="$new_path"
48078  # Check if we need to convert this using DOS-style short mode. If the path
48079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48080  # take no chances and rewrite it.
48081  # Note: m4 eats our [], so we need to use [ and ] instead.
48082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48083  if test "x$has_forbidden_chars" != x; then
48084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48086  fi
48087
48088
48089  windows_path="$new_path"
48090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48091    unix_path=`$CYGPATH -u "$windows_path"`
48092    new_path="$unix_path"
48093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48095    new_path="$unix_path"
48096  fi
48097
48098  if test "x$path" != "x$new_path"; then
48099    MSVC_DLL="$new_path"
48100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48101$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48102  fi
48103
48104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48106
48107    else
48108      # We're on a unix platform. Hooray! :)
48109      path="$MSVC_DLL"
48110      has_space=`$ECHO "$path" | $GREP " "`
48111      if test "x$has_space" != x; then
48112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48113$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48114        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48115      fi
48116
48117      # Use eval to expand a potential ~
48118      eval path="$path"
48119      if test ! -f "$path" && test ! -d "$path"; then
48120        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48121      fi
48122
48123      if test -d "$path"; then
48124        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48125      else
48126        dir="`$DIRNAME "$path"`"
48127        base="`$BASENAME "$path"`"
48128        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48129      fi
48130    fi
48131  fi
48132
48133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48134$as_echo_n "checking for $DLL_NAME... " >&6; }
48135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48136$as_echo "$MSVC_DLL" >&6; }
48137    else
48138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48139$as_echo "incorrect, ignoring" >&6; }
48140      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48141$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48142    fi
48143  fi
48144
48145    if test "x$MSVC_DLL" = x; then
48146      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48147    fi
48148    MSVCR_DLL="$MSVC_DLL"
48149  else
48150
48151  DLL_NAME="${MSVCR_NAME}"
48152  MSVC_DLL=
48153
48154  if test "x$MSVC_DLL" = x; then
48155    # Probe: Using well-known location from Visual Studio 10.0
48156    if test "x$VCINSTALLDIR" != x; then
48157      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48158
48159  windows_path="$CYGWIN_VC_INSTALL_DIR"
48160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48161    unix_path=`$CYGPATH -u "$windows_path"`
48162    CYGWIN_VC_INSTALL_DIR="$unix_path"
48163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48165    CYGWIN_VC_INSTALL_DIR="$unix_path"
48166  fi
48167
48168      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48169        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48170      else
48171        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48172      fi
48173      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48174
48175  DLL_NAME="$DLL_NAME"
48176  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48177  METHOD="well-known location in VCINSTALLDIR"
48178  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48179    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48180$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48181
48182    # Need to check if the found msvcr is correct architecture
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48184$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48185    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48187      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48188      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48189      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48190        CORRECT_MSVCR_ARCH="PE32 executable"
48191      else
48192        CORRECT_MSVCR_ARCH="PE32+ executable"
48193      fi
48194    else
48195      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48196        CORRECT_MSVCR_ARCH=386
48197      else
48198        CORRECT_MSVCR_ARCH=x86-64
48199      fi
48200    fi
48201    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48203$as_echo "ok" >&6; }
48204      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48205
48206  # Only process if variable expands to non-empty
48207
48208  if test "x$MSVC_DLL" != x; then
48209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48210
48211  # Input might be given as Windows format, start by converting to
48212  # unix format.
48213  path="$MSVC_DLL"
48214  new_path=`$CYGPATH -u "$path"`
48215
48216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48219  # "foo.exe" is OK but "foo" is an error.
48220  #
48221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48222  # It is also a way to make sure we got the proper file name for the real test later on.
48223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48224  if test "x$test_shortpath" = x; then
48225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48226$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48227    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48228  fi
48229
48230  # Call helper function which possibly converts this using DOS-style short mode.
48231  # If so, the updated path is stored in $new_path.
48232
48233  input_path="$new_path"
48234  # Check if we need to convert this using DOS-style short mode. If the path
48235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48236  # take no chances and rewrite it.
48237  # Note: m4 eats our [], so we need to use [ and ] instead.
48238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48239  if test "x$has_forbidden_chars" != x; then
48240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48244      # Going to short mode and back again did indeed matter. Since short mode is
48245      # case insensitive, let's make it lowercase to improve readability.
48246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48247      # Now convert it back to Unix-style (cygpath)
48248      input_path=`$CYGPATH -u "$shortmode_path"`
48249      new_path="$input_path"
48250    fi
48251  fi
48252
48253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48254  if test "x$test_cygdrive_prefix" = x; then
48255    # As a simple fix, exclude /usr/bin since it's not a real path.
48256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48258      # a path prefixed by /cygdrive for fixpath to work.
48259      new_path="$CYGWIN_ROOT_PATH$input_path"
48260    fi
48261  fi
48262
48263
48264  if test "x$path" != "x$new_path"; then
48265    MSVC_DLL="$new_path"
48266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48267$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48268  fi
48269
48270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48271
48272  path="$MSVC_DLL"
48273  has_colon=`$ECHO $path | $GREP ^.:`
48274  new_path="$path"
48275  if test "x$has_colon" = x; then
48276    # Not in mixed or Windows style, start by that.
48277    new_path=`cmd //c echo $path`
48278  fi
48279
48280
48281  input_path="$new_path"
48282  # Check if we need to convert this using DOS-style short mode. If the path
48283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48284  # take no chances and rewrite it.
48285  # Note: m4 eats our [], so we need to use [ and ] instead.
48286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48287  if test "x$has_forbidden_chars" != x; then
48288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48290  fi
48291
48292
48293  windows_path="$new_path"
48294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48295    unix_path=`$CYGPATH -u "$windows_path"`
48296    new_path="$unix_path"
48297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48299    new_path="$unix_path"
48300  fi
48301
48302  if test "x$path" != "x$new_path"; then
48303    MSVC_DLL="$new_path"
48304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48305$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48306  fi
48307
48308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48310
48311    else
48312      # We're on a unix platform. Hooray! :)
48313      path="$MSVC_DLL"
48314      has_space=`$ECHO "$path" | $GREP " "`
48315      if test "x$has_space" != x; then
48316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48317$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48319      fi
48320
48321      # Use eval to expand a potential ~
48322      eval path="$path"
48323      if test ! -f "$path" && test ! -d "$path"; then
48324        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48325      fi
48326
48327      if test -d "$path"; then
48328        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48329      else
48330        dir="`$DIRNAME "$path"`"
48331        base="`$BASENAME "$path"`"
48332        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48333      fi
48334    fi
48335  fi
48336
48337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48338$as_echo_n "checking for $DLL_NAME... " >&6; }
48339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48340$as_echo "$MSVC_DLL" >&6; }
48341    else
48342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48343$as_echo "incorrect, ignoring" >&6; }
48344      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48345$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48346    fi
48347  fi
48348
48349    fi
48350  fi
48351
48352  if test "x$MSVC_DLL" = x; then
48353    # Probe: Check in the Boot JDK directory.
48354    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48355
48356  DLL_NAME="$DLL_NAME"
48357  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48358  METHOD="well-known location in Boot JDK"
48359  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48360    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48361$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48362
48363    # Need to check if the found msvcr is correct architecture
48364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48365$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48366    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48368      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48369      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48370      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48371        CORRECT_MSVCR_ARCH="PE32 executable"
48372      else
48373        CORRECT_MSVCR_ARCH="PE32+ executable"
48374      fi
48375    else
48376      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48377        CORRECT_MSVCR_ARCH=386
48378      else
48379        CORRECT_MSVCR_ARCH=x86-64
48380      fi
48381    fi
48382    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48384$as_echo "ok" >&6; }
48385      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48386
48387  # Only process if variable expands to non-empty
48388
48389  if test "x$MSVC_DLL" != x; then
48390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48391
48392  # Input might be given as Windows format, start by converting to
48393  # unix format.
48394  path="$MSVC_DLL"
48395  new_path=`$CYGPATH -u "$path"`
48396
48397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48400  # "foo.exe" is OK but "foo" is an error.
48401  #
48402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48403  # It is also a way to make sure we got the proper file name for the real test later on.
48404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48405  if test "x$test_shortpath" = x; then
48406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48407$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48408    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48409  fi
48410
48411  # Call helper function which possibly converts this using DOS-style short mode.
48412  # If so, the updated path is stored in $new_path.
48413
48414  input_path="$new_path"
48415  # Check if we need to convert this using DOS-style short mode. If the path
48416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48417  # take no chances and rewrite it.
48418  # Note: m4 eats our [], so we need to use [ and ] instead.
48419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48420  if test "x$has_forbidden_chars" != x; then
48421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48425      # Going to short mode and back again did indeed matter. Since short mode is
48426      # case insensitive, let's make it lowercase to improve readability.
48427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48428      # Now convert it back to Unix-style (cygpath)
48429      input_path=`$CYGPATH -u "$shortmode_path"`
48430      new_path="$input_path"
48431    fi
48432  fi
48433
48434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48435  if test "x$test_cygdrive_prefix" = x; then
48436    # As a simple fix, exclude /usr/bin since it's not a real path.
48437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48439      # a path prefixed by /cygdrive for fixpath to work.
48440      new_path="$CYGWIN_ROOT_PATH$input_path"
48441    fi
48442  fi
48443
48444
48445  if test "x$path" != "x$new_path"; then
48446    MSVC_DLL="$new_path"
48447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48448$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48449  fi
48450
48451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48452
48453  path="$MSVC_DLL"
48454  has_colon=`$ECHO $path | $GREP ^.:`
48455  new_path="$path"
48456  if test "x$has_colon" = x; then
48457    # Not in mixed or Windows style, start by that.
48458    new_path=`cmd //c echo $path`
48459  fi
48460
48461
48462  input_path="$new_path"
48463  # Check if we need to convert this using DOS-style short mode. If the path
48464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48465  # take no chances and rewrite it.
48466  # Note: m4 eats our [], so we need to use [ and ] instead.
48467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48468  if test "x$has_forbidden_chars" != x; then
48469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48471  fi
48472
48473
48474  windows_path="$new_path"
48475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48476    unix_path=`$CYGPATH -u "$windows_path"`
48477    new_path="$unix_path"
48478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48480    new_path="$unix_path"
48481  fi
48482
48483  if test "x$path" != "x$new_path"; then
48484    MSVC_DLL="$new_path"
48485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48486$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48487  fi
48488
48489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48491
48492    else
48493      # We're on a unix platform. Hooray! :)
48494      path="$MSVC_DLL"
48495      has_space=`$ECHO "$path" | $GREP " "`
48496      if test "x$has_space" != x; then
48497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48498$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48500      fi
48501
48502      # Use eval to expand a potential ~
48503      eval path="$path"
48504      if test ! -f "$path" && test ! -d "$path"; then
48505        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48506      fi
48507
48508      if test -d "$path"; then
48509        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48510      else
48511        dir="`$DIRNAME "$path"`"
48512        base="`$BASENAME "$path"`"
48513        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48514      fi
48515    fi
48516  fi
48517
48518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48519$as_echo_n "checking for $DLL_NAME... " >&6; }
48520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48521$as_echo "$MSVC_DLL" >&6; }
48522    else
48523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48524$as_echo "incorrect, ignoring" >&6; }
48525      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48526$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48527    fi
48528  fi
48529
48530  fi
48531
48532  if test "x$MSVC_DLL" = x; then
48533    # Probe: Look in the Windows system32 directory
48534    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48535
48536  windows_path="$CYGWIN_SYSTEMROOT"
48537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48538    unix_path=`$CYGPATH -u "$windows_path"`
48539    CYGWIN_SYSTEMROOT="$unix_path"
48540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48542    CYGWIN_SYSTEMROOT="$unix_path"
48543  fi
48544
48545    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48546
48547  DLL_NAME="$DLL_NAME"
48548  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48549  METHOD="well-known location in SYSTEMROOT"
48550  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48551    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48552$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48553
48554    # Need to check if the found msvcr is correct architecture
48555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48556$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48557    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48559      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48560      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48561      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48562        CORRECT_MSVCR_ARCH="PE32 executable"
48563      else
48564        CORRECT_MSVCR_ARCH="PE32+ executable"
48565      fi
48566    else
48567      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48568        CORRECT_MSVCR_ARCH=386
48569      else
48570        CORRECT_MSVCR_ARCH=x86-64
48571      fi
48572    fi
48573    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48575$as_echo "ok" >&6; }
48576      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48577
48578  # Only process if variable expands to non-empty
48579
48580  if test "x$MSVC_DLL" != x; then
48581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48582
48583  # Input might be given as Windows format, start by converting to
48584  # unix format.
48585  path="$MSVC_DLL"
48586  new_path=`$CYGPATH -u "$path"`
48587
48588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48591  # "foo.exe" is OK but "foo" is an error.
48592  #
48593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48594  # It is also a way to make sure we got the proper file name for the real test later on.
48595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48596  if test "x$test_shortpath" = x; then
48597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48598$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48599    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48600  fi
48601
48602  # Call helper function which possibly converts this using DOS-style short mode.
48603  # If so, the updated path is stored in $new_path.
48604
48605  input_path="$new_path"
48606  # Check if we need to convert this using DOS-style short mode. If the path
48607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48608  # take no chances and rewrite it.
48609  # Note: m4 eats our [], so we need to use [ and ] instead.
48610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48611  if test "x$has_forbidden_chars" != x; then
48612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48616      # Going to short mode and back again did indeed matter. Since short mode is
48617      # case insensitive, let's make it lowercase to improve readability.
48618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48619      # Now convert it back to Unix-style (cygpath)
48620      input_path=`$CYGPATH -u "$shortmode_path"`
48621      new_path="$input_path"
48622    fi
48623  fi
48624
48625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48626  if test "x$test_cygdrive_prefix" = x; then
48627    # As a simple fix, exclude /usr/bin since it's not a real path.
48628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48630      # a path prefixed by /cygdrive for fixpath to work.
48631      new_path="$CYGWIN_ROOT_PATH$input_path"
48632    fi
48633  fi
48634
48635
48636  if test "x$path" != "x$new_path"; then
48637    MSVC_DLL="$new_path"
48638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48639$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48640  fi
48641
48642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48643
48644  path="$MSVC_DLL"
48645  has_colon=`$ECHO $path | $GREP ^.:`
48646  new_path="$path"
48647  if test "x$has_colon" = x; then
48648    # Not in mixed or Windows style, start by that.
48649    new_path=`cmd //c echo $path`
48650  fi
48651
48652
48653  input_path="$new_path"
48654  # Check if we need to convert this using DOS-style short mode. If the path
48655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48656  # take no chances and rewrite it.
48657  # Note: m4 eats our [], so we need to use [ and ] instead.
48658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48659  if test "x$has_forbidden_chars" != x; then
48660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48662  fi
48663
48664
48665  windows_path="$new_path"
48666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48667    unix_path=`$CYGPATH -u "$windows_path"`
48668    new_path="$unix_path"
48669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48671    new_path="$unix_path"
48672  fi
48673
48674  if test "x$path" != "x$new_path"; then
48675    MSVC_DLL="$new_path"
48676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48677$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48678  fi
48679
48680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48682
48683    else
48684      # We're on a unix platform. Hooray! :)
48685      path="$MSVC_DLL"
48686      has_space=`$ECHO "$path" | $GREP " "`
48687      if test "x$has_space" != x; then
48688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48689$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48691      fi
48692
48693      # Use eval to expand a potential ~
48694      eval path="$path"
48695      if test ! -f "$path" && test ! -d "$path"; then
48696        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48697      fi
48698
48699      if test -d "$path"; then
48700        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48701      else
48702        dir="`$DIRNAME "$path"`"
48703        base="`$BASENAME "$path"`"
48704        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48705      fi
48706    fi
48707  fi
48708
48709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48710$as_echo_n "checking for $DLL_NAME... " >&6; }
48711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48712$as_echo "$MSVC_DLL" >&6; }
48713    else
48714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48715$as_echo "incorrect, ignoring" >&6; }
48716      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48717$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48718    fi
48719  fi
48720
48721  fi
48722
48723  if test "x$MSVC_DLL" = x; then
48724    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48725    if test "x$VS100COMNTOOLS" != x; then
48726      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48727
48728  windows_path="$CYGWIN_VS_TOOLS_DIR"
48729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48730    unix_path=`$CYGPATH -u "$windows_path"`
48731    CYGWIN_VS_TOOLS_DIR="$unix_path"
48732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48734    CYGWIN_VS_TOOLS_DIR="$unix_path"
48735  fi
48736
48737      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48738        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48739	    | $GREP -i /x64/ | $HEAD --lines 1`
48740      else
48741        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48742	    | $GREP -i /x86/ | $HEAD --lines 1`
48743      fi
48744
48745  DLL_NAME="$DLL_NAME"
48746  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48747  METHOD="search of VS100COMNTOOLS"
48748  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48750$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48751
48752    # Need to check if the found msvcr is correct architecture
48753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48754$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48755    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48757      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48758      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48759      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48760        CORRECT_MSVCR_ARCH="PE32 executable"
48761      else
48762        CORRECT_MSVCR_ARCH="PE32+ executable"
48763      fi
48764    else
48765      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48766        CORRECT_MSVCR_ARCH=386
48767      else
48768        CORRECT_MSVCR_ARCH=x86-64
48769      fi
48770    fi
48771    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48773$as_echo "ok" >&6; }
48774      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48775
48776  # Only process if variable expands to non-empty
48777
48778  if test "x$MSVC_DLL" != x; then
48779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48780
48781  # Input might be given as Windows format, start by converting to
48782  # unix format.
48783  path="$MSVC_DLL"
48784  new_path=`$CYGPATH -u "$path"`
48785
48786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48789  # "foo.exe" is OK but "foo" is an error.
48790  #
48791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48792  # It is also a way to make sure we got the proper file name for the real test later on.
48793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48794  if test "x$test_shortpath" = x; then
48795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48796$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48797    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48798  fi
48799
48800  # Call helper function which possibly converts this using DOS-style short mode.
48801  # If so, the updated path is stored in $new_path.
48802
48803  input_path="$new_path"
48804  # Check if we need to convert this using DOS-style short mode. If the path
48805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48806  # take no chances and rewrite it.
48807  # Note: m4 eats our [], so we need to use [ and ] instead.
48808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48809  if test "x$has_forbidden_chars" != x; then
48810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48814      # Going to short mode and back again did indeed matter. Since short mode is
48815      # case insensitive, let's make it lowercase to improve readability.
48816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48817      # Now convert it back to Unix-style (cygpath)
48818      input_path=`$CYGPATH -u "$shortmode_path"`
48819      new_path="$input_path"
48820    fi
48821  fi
48822
48823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48824  if test "x$test_cygdrive_prefix" = x; then
48825    # As a simple fix, exclude /usr/bin since it's not a real path.
48826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48828      # a path prefixed by /cygdrive for fixpath to work.
48829      new_path="$CYGWIN_ROOT_PATH$input_path"
48830    fi
48831  fi
48832
48833
48834  if test "x$path" != "x$new_path"; then
48835    MSVC_DLL="$new_path"
48836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48837$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48838  fi
48839
48840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48841
48842  path="$MSVC_DLL"
48843  has_colon=`$ECHO $path | $GREP ^.:`
48844  new_path="$path"
48845  if test "x$has_colon" = x; then
48846    # Not in mixed or Windows style, start by that.
48847    new_path=`cmd //c echo $path`
48848  fi
48849
48850
48851  input_path="$new_path"
48852  # Check if we need to convert this using DOS-style short mode. If the path
48853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48854  # take no chances and rewrite it.
48855  # Note: m4 eats our [], so we need to use [ and ] instead.
48856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48857  if test "x$has_forbidden_chars" != x; then
48858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48860  fi
48861
48862
48863  windows_path="$new_path"
48864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48865    unix_path=`$CYGPATH -u "$windows_path"`
48866    new_path="$unix_path"
48867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48869    new_path="$unix_path"
48870  fi
48871
48872  if test "x$path" != "x$new_path"; then
48873    MSVC_DLL="$new_path"
48874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48875$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48876  fi
48877
48878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48880
48881    else
48882      # We're on a unix platform. Hooray! :)
48883      path="$MSVC_DLL"
48884      has_space=`$ECHO "$path" | $GREP " "`
48885      if test "x$has_space" != x; then
48886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48887$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48889      fi
48890
48891      # Use eval to expand a potential ~
48892      eval path="$path"
48893      if test ! -f "$path" && test ! -d "$path"; then
48894        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48895      fi
48896
48897      if test -d "$path"; then
48898        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48899      else
48900        dir="`$DIRNAME "$path"`"
48901        base="`$BASENAME "$path"`"
48902        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48903      fi
48904    fi
48905  fi
48906
48907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48908$as_echo_n "checking for $DLL_NAME... " >&6; }
48909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48910$as_echo "$MSVC_DLL" >&6; }
48911    else
48912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48913$as_echo "incorrect, ignoring" >&6; }
48914      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48915$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48916    fi
48917  fi
48918
48919    fi
48920  fi
48921
48922  if test "x$MSVC_DLL" = x; then
48923    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48924    # (This was the original behaviour; kept since it might turn something up)
48925    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48926      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48927        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48928	    | $GREP x64 | $HEAD --lines 1`
48929      else
48930        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48931	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48932        if test "x$POSSIBLE_MSVC_DLL" = x; then
48933          # We're grasping at straws now...
48934          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48935	      | $HEAD --lines 1`
48936        fi
48937      fi
48938
48939
48940  DLL_NAME="$DLL_NAME"
48941  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48942  METHOD="search of VCINSTALLDIR"
48943  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48944    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48945$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48946
48947    # Need to check if the found msvcr is correct architecture
48948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48949$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48950    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48952      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48953      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48954      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48955        CORRECT_MSVCR_ARCH="PE32 executable"
48956      else
48957        CORRECT_MSVCR_ARCH="PE32+ executable"
48958      fi
48959    else
48960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48961        CORRECT_MSVCR_ARCH=386
48962      else
48963        CORRECT_MSVCR_ARCH=x86-64
48964      fi
48965    fi
48966    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48968$as_echo "ok" >&6; }
48969      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48970
48971  # Only process if variable expands to non-empty
48972
48973  if test "x$MSVC_DLL" != x; then
48974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48975
48976  # Input might be given as Windows format, start by converting to
48977  # unix format.
48978  path="$MSVC_DLL"
48979  new_path=`$CYGPATH -u "$path"`
48980
48981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48984  # "foo.exe" is OK but "foo" is an error.
48985  #
48986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48987  # It is also a way to make sure we got the proper file name for the real test later on.
48988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48989  if test "x$test_shortpath" = x; then
48990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48991$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48992    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48993  fi
48994
48995  # Call helper function which possibly converts this using DOS-style short mode.
48996  # If so, the updated path is stored in $new_path.
48997
48998  input_path="$new_path"
48999  # Check if we need to convert this using DOS-style short mode. If the path
49000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49001  # take no chances and rewrite it.
49002  # Note: m4 eats our [], so we need to use [ and ] instead.
49003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49004  if test "x$has_forbidden_chars" != x; then
49005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49009      # Going to short mode and back again did indeed matter. Since short mode is
49010      # case insensitive, let's make it lowercase to improve readability.
49011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49012      # Now convert it back to Unix-style (cygpath)
49013      input_path=`$CYGPATH -u "$shortmode_path"`
49014      new_path="$input_path"
49015    fi
49016  fi
49017
49018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49019  if test "x$test_cygdrive_prefix" = x; then
49020    # As a simple fix, exclude /usr/bin since it's not a real path.
49021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49023      # a path prefixed by /cygdrive for fixpath to work.
49024      new_path="$CYGWIN_ROOT_PATH$input_path"
49025    fi
49026  fi
49027
49028
49029  if test "x$path" != "x$new_path"; then
49030    MSVC_DLL="$new_path"
49031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49032$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49033  fi
49034
49035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49036
49037  path="$MSVC_DLL"
49038  has_colon=`$ECHO $path | $GREP ^.:`
49039  new_path="$path"
49040  if test "x$has_colon" = x; then
49041    # Not in mixed or Windows style, start by that.
49042    new_path=`cmd //c echo $path`
49043  fi
49044
49045
49046  input_path="$new_path"
49047  # Check if we need to convert this using DOS-style short mode. If the path
49048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49049  # take no chances and rewrite it.
49050  # Note: m4 eats our [], so we need to use [ and ] instead.
49051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49052  if test "x$has_forbidden_chars" != x; then
49053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49055  fi
49056
49057
49058  windows_path="$new_path"
49059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49060    unix_path=`$CYGPATH -u "$windows_path"`
49061    new_path="$unix_path"
49062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49064    new_path="$unix_path"
49065  fi
49066
49067  if test "x$path" != "x$new_path"; then
49068    MSVC_DLL="$new_path"
49069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49070$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49071  fi
49072
49073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49075
49076    else
49077      # We're on a unix platform. Hooray! :)
49078      path="$MSVC_DLL"
49079      has_space=`$ECHO "$path" | $GREP " "`
49080      if test "x$has_space" != x; then
49081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49082$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49084      fi
49085
49086      # Use eval to expand a potential ~
49087      eval path="$path"
49088      if test ! -f "$path" && test ! -d "$path"; then
49089        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49090      fi
49091
49092      if test -d "$path"; then
49093        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49094      else
49095        dir="`$DIRNAME "$path"`"
49096        base="`$BASENAME "$path"`"
49097        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49098      fi
49099    fi
49100  fi
49101
49102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49103$as_echo_n "checking for $DLL_NAME... " >&6; }
49104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49105$as_echo "$MSVC_DLL" >&6; }
49106    else
49107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49108$as_echo "incorrect, ignoring" >&6; }
49109      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49110$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49111    fi
49112  fi
49113
49114    fi
49115  fi
49116
49117  if test "x$MSVC_DLL" = x; then
49118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49119$as_echo_n "checking for $DLL_NAME... " >&6; }
49120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49121$as_echo "no" >&6; }
49122    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49123  fi
49124
49125    MSVCR_DLL="$MSVC_DLL"
49126  fi
49127
49128
49129
49130# Check whether --with-msvcp-dll was given.
49131if test "${with_msvcp_dll+set}" = set; then :
49132  withval=$with_msvcp_dll;
49133fi
49134
49135
49136  if test "x$MSVCP_NAME" != "x"; then
49137    if test "x$with_msvcp_dll" != x; then
49138      # If given explicitely by user, do not probe. If not present, fail directly.
49139
49140  DLL_NAME="$MSVCP_NAME"
49141  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49142  METHOD="--with-msvcp-dll"
49143  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49144    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49145$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49146
49147    # Need to check if the found msvcr is correct architecture
49148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49149$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49150    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49152      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49153      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49154      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49155        CORRECT_MSVCR_ARCH="PE32 executable"
49156      else
49157        CORRECT_MSVCR_ARCH="PE32+ executable"
49158      fi
49159    else
49160      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49161        CORRECT_MSVCR_ARCH=386
49162      else
49163        CORRECT_MSVCR_ARCH=x86-64
49164      fi
49165    fi
49166    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49168$as_echo "ok" >&6; }
49169      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49170
49171  # Only process if variable expands to non-empty
49172
49173  if test "x$MSVC_DLL" != x; then
49174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49175
49176  # Input might be given as Windows format, start by converting to
49177  # unix format.
49178  path="$MSVC_DLL"
49179  new_path=`$CYGPATH -u "$path"`
49180
49181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49184  # "foo.exe" is OK but "foo" is an error.
49185  #
49186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49187  # It is also a way to make sure we got the proper file name for the real test later on.
49188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49189  if test "x$test_shortpath" = x; then
49190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49191$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49192    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49193  fi
49194
49195  # Call helper function which possibly converts this using DOS-style short mode.
49196  # If so, the updated path is stored in $new_path.
49197
49198  input_path="$new_path"
49199  # Check if we need to convert this using DOS-style short mode. If the path
49200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49201  # take no chances and rewrite it.
49202  # Note: m4 eats our [], so we need to use [ and ] instead.
49203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49204  if test "x$has_forbidden_chars" != x; then
49205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49209      # Going to short mode and back again did indeed matter. Since short mode is
49210      # case insensitive, let's make it lowercase to improve readability.
49211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49212      # Now convert it back to Unix-style (cygpath)
49213      input_path=`$CYGPATH -u "$shortmode_path"`
49214      new_path="$input_path"
49215    fi
49216  fi
49217
49218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49219  if test "x$test_cygdrive_prefix" = x; then
49220    # As a simple fix, exclude /usr/bin since it's not a real path.
49221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49223      # a path prefixed by /cygdrive for fixpath to work.
49224      new_path="$CYGWIN_ROOT_PATH$input_path"
49225    fi
49226  fi
49227
49228
49229  if test "x$path" != "x$new_path"; then
49230    MSVC_DLL="$new_path"
49231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49232$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49233  fi
49234
49235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49236
49237  path="$MSVC_DLL"
49238  has_colon=`$ECHO $path | $GREP ^.:`
49239  new_path="$path"
49240  if test "x$has_colon" = x; then
49241    # Not in mixed or Windows style, start by that.
49242    new_path=`cmd //c echo $path`
49243  fi
49244
49245
49246  input_path="$new_path"
49247  # Check if we need to convert this using DOS-style short mode. If the path
49248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49249  # take no chances and rewrite it.
49250  # Note: m4 eats our [], so we need to use [ and ] instead.
49251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49252  if test "x$has_forbidden_chars" != x; then
49253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49255  fi
49256
49257
49258  windows_path="$new_path"
49259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49260    unix_path=`$CYGPATH -u "$windows_path"`
49261    new_path="$unix_path"
49262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49264    new_path="$unix_path"
49265  fi
49266
49267  if test "x$path" != "x$new_path"; then
49268    MSVC_DLL="$new_path"
49269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49270$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49271  fi
49272
49273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49275
49276    else
49277      # We're on a unix platform. Hooray! :)
49278      path="$MSVC_DLL"
49279      has_space=`$ECHO "$path" | $GREP " "`
49280      if test "x$has_space" != x; then
49281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49282$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49284      fi
49285
49286      # Use eval to expand a potential ~
49287      eval path="$path"
49288      if test ! -f "$path" && test ! -d "$path"; then
49289        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49290      fi
49291
49292      if test -d "$path"; then
49293        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49294      else
49295        dir="`$DIRNAME "$path"`"
49296        base="`$BASENAME "$path"`"
49297        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49298      fi
49299    fi
49300  fi
49301
49302      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49303$as_echo_n "checking for $DLL_NAME... " >&6; }
49304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49305$as_echo "$MSVC_DLL" >&6; }
49306    else
49307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49308$as_echo "incorrect, ignoring" >&6; }
49309      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49310$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49311    fi
49312  fi
49313
49314      if test "x$MSVC_DLL" = x; then
49315        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49316      fi
49317      MSVCP_DLL="$MSVC_DLL"
49318    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49319
49320  DLL_NAME="$MSVCP_NAME"
49321  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49322  METHOD="devkit"
49323  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49324    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49325$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49326
49327    # Need to check if the found msvcr is correct architecture
49328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49329$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49330    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49332      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49333      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49334      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49335        CORRECT_MSVCR_ARCH="PE32 executable"
49336      else
49337        CORRECT_MSVCR_ARCH="PE32+ executable"
49338      fi
49339    else
49340      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49341        CORRECT_MSVCR_ARCH=386
49342      else
49343        CORRECT_MSVCR_ARCH=x86-64
49344      fi
49345    fi
49346    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49348$as_echo "ok" >&6; }
49349      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49350
49351  # Only process if variable expands to non-empty
49352
49353  if test "x$MSVC_DLL" != x; then
49354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49355
49356  # Input might be given as Windows format, start by converting to
49357  # unix format.
49358  path="$MSVC_DLL"
49359  new_path=`$CYGPATH -u "$path"`
49360
49361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49364  # "foo.exe" is OK but "foo" is an error.
49365  #
49366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49367  # It is also a way to make sure we got the proper file name for the real test later on.
49368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49369  if test "x$test_shortpath" = x; then
49370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49371$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49372    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49373  fi
49374
49375  # Call helper function which possibly converts this using DOS-style short mode.
49376  # If so, the updated path is stored in $new_path.
49377
49378  input_path="$new_path"
49379  # Check if we need to convert this using DOS-style short mode. If the path
49380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49381  # take no chances and rewrite it.
49382  # Note: m4 eats our [], so we need to use [ and ] instead.
49383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49384  if test "x$has_forbidden_chars" != x; then
49385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49389      # Going to short mode and back again did indeed matter. Since short mode is
49390      # case insensitive, let's make it lowercase to improve readability.
49391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49392      # Now convert it back to Unix-style (cygpath)
49393      input_path=`$CYGPATH -u "$shortmode_path"`
49394      new_path="$input_path"
49395    fi
49396  fi
49397
49398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49399  if test "x$test_cygdrive_prefix" = x; then
49400    # As a simple fix, exclude /usr/bin since it's not a real path.
49401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49403      # a path prefixed by /cygdrive for fixpath to work.
49404      new_path="$CYGWIN_ROOT_PATH$input_path"
49405    fi
49406  fi
49407
49408
49409  if test "x$path" != "x$new_path"; then
49410    MSVC_DLL="$new_path"
49411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49412$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49413  fi
49414
49415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49416
49417  path="$MSVC_DLL"
49418  has_colon=`$ECHO $path | $GREP ^.:`
49419  new_path="$path"
49420  if test "x$has_colon" = x; then
49421    # Not in mixed or Windows style, start by that.
49422    new_path=`cmd //c echo $path`
49423  fi
49424
49425
49426  input_path="$new_path"
49427  # Check if we need to convert this using DOS-style short mode. If the path
49428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49429  # take no chances and rewrite it.
49430  # Note: m4 eats our [], so we need to use [ and ] instead.
49431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49432  if test "x$has_forbidden_chars" != x; then
49433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49435  fi
49436
49437
49438  windows_path="$new_path"
49439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49440    unix_path=`$CYGPATH -u "$windows_path"`
49441    new_path="$unix_path"
49442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49444    new_path="$unix_path"
49445  fi
49446
49447  if test "x$path" != "x$new_path"; then
49448    MSVC_DLL="$new_path"
49449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49450$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49451  fi
49452
49453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49455
49456    else
49457      # We're on a unix platform. Hooray! :)
49458      path="$MSVC_DLL"
49459      has_space=`$ECHO "$path" | $GREP " "`
49460      if test "x$has_space" != x; then
49461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49462$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49464      fi
49465
49466      # Use eval to expand a potential ~
49467      eval path="$path"
49468      if test ! -f "$path" && test ! -d "$path"; then
49469        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49470      fi
49471
49472      if test -d "$path"; then
49473        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49474      else
49475        dir="`$DIRNAME "$path"`"
49476        base="`$BASENAME "$path"`"
49477        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49478      fi
49479    fi
49480  fi
49481
49482      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49483$as_echo_n "checking for $DLL_NAME... " >&6; }
49484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49485$as_echo "$MSVC_DLL" >&6; }
49486    else
49487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49488$as_echo "incorrect, ignoring" >&6; }
49489      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49490$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49491    fi
49492  fi
49493
49494      if test "x$MSVC_DLL" = x; then
49495        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49496      fi
49497      MSVCP_DLL="$MSVC_DLL"
49498    else
49499
49500  DLL_NAME="${MSVCP_NAME}"
49501  MSVC_DLL=
49502
49503  if test "x$MSVC_DLL" = x; then
49504    # Probe: Using well-known location from Visual Studio 10.0
49505    if test "x$VCINSTALLDIR" != x; then
49506      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49507
49508  windows_path="$CYGWIN_VC_INSTALL_DIR"
49509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49510    unix_path=`$CYGPATH -u "$windows_path"`
49511    CYGWIN_VC_INSTALL_DIR="$unix_path"
49512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49514    CYGWIN_VC_INSTALL_DIR="$unix_path"
49515  fi
49516
49517      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49518        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49519      else
49520        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49521      fi
49522      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49523
49524  DLL_NAME="$DLL_NAME"
49525  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49526  METHOD="well-known location in VCINSTALLDIR"
49527  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49528    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49529$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49530
49531    # Need to check if the found msvcr is correct architecture
49532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49533$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49534    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49536      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49537      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49538      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49539        CORRECT_MSVCR_ARCH="PE32 executable"
49540      else
49541        CORRECT_MSVCR_ARCH="PE32+ executable"
49542      fi
49543    else
49544      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49545        CORRECT_MSVCR_ARCH=386
49546      else
49547        CORRECT_MSVCR_ARCH=x86-64
49548      fi
49549    fi
49550    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49552$as_echo "ok" >&6; }
49553      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49554
49555  # Only process if variable expands to non-empty
49556
49557  if test "x$MSVC_DLL" != x; then
49558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49559
49560  # Input might be given as Windows format, start by converting to
49561  # unix format.
49562  path="$MSVC_DLL"
49563  new_path=`$CYGPATH -u "$path"`
49564
49565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49568  # "foo.exe" is OK but "foo" is an error.
49569  #
49570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49571  # It is also a way to make sure we got the proper file name for the real test later on.
49572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49573  if test "x$test_shortpath" = x; then
49574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49576    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49577  fi
49578
49579  # Call helper function which possibly converts this using DOS-style short mode.
49580  # If so, the updated path is stored in $new_path.
49581
49582  input_path="$new_path"
49583  # Check if we need to convert this using DOS-style short mode. If the path
49584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49585  # take no chances and rewrite it.
49586  # Note: m4 eats our [], so we need to use [ and ] instead.
49587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49588  if test "x$has_forbidden_chars" != x; then
49589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49593      # Going to short mode and back again did indeed matter. Since short mode is
49594      # case insensitive, let's make it lowercase to improve readability.
49595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49596      # Now convert it back to Unix-style (cygpath)
49597      input_path=`$CYGPATH -u "$shortmode_path"`
49598      new_path="$input_path"
49599    fi
49600  fi
49601
49602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49603  if test "x$test_cygdrive_prefix" = x; then
49604    # As a simple fix, exclude /usr/bin since it's not a real path.
49605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49607      # a path prefixed by /cygdrive for fixpath to work.
49608      new_path="$CYGWIN_ROOT_PATH$input_path"
49609    fi
49610  fi
49611
49612
49613  if test "x$path" != "x$new_path"; then
49614    MSVC_DLL="$new_path"
49615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49616$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49617  fi
49618
49619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49620
49621  path="$MSVC_DLL"
49622  has_colon=`$ECHO $path | $GREP ^.:`
49623  new_path="$path"
49624  if test "x$has_colon" = x; then
49625    # Not in mixed or Windows style, start by that.
49626    new_path=`cmd //c echo $path`
49627  fi
49628
49629
49630  input_path="$new_path"
49631  # Check if we need to convert this using DOS-style short mode. If the path
49632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49633  # take no chances and rewrite it.
49634  # Note: m4 eats our [], so we need to use [ and ] instead.
49635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49636  if test "x$has_forbidden_chars" != x; then
49637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49639  fi
49640
49641
49642  windows_path="$new_path"
49643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49644    unix_path=`$CYGPATH -u "$windows_path"`
49645    new_path="$unix_path"
49646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49648    new_path="$unix_path"
49649  fi
49650
49651  if test "x$path" != "x$new_path"; then
49652    MSVC_DLL="$new_path"
49653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49654$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49655  fi
49656
49657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49659
49660    else
49661      # We're on a unix platform. Hooray! :)
49662      path="$MSVC_DLL"
49663      has_space=`$ECHO "$path" | $GREP " "`
49664      if test "x$has_space" != x; then
49665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49666$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49668      fi
49669
49670      # Use eval to expand a potential ~
49671      eval path="$path"
49672      if test ! -f "$path" && test ! -d "$path"; then
49673        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49674      fi
49675
49676      if test -d "$path"; then
49677        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49678      else
49679        dir="`$DIRNAME "$path"`"
49680        base="`$BASENAME "$path"`"
49681        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49682      fi
49683    fi
49684  fi
49685
49686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49687$as_echo_n "checking for $DLL_NAME... " >&6; }
49688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49689$as_echo "$MSVC_DLL" >&6; }
49690    else
49691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49692$as_echo "incorrect, ignoring" >&6; }
49693      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49694$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49695    fi
49696  fi
49697
49698    fi
49699  fi
49700
49701  if test "x$MSVC_DLL" = x; then
49702    # Probe: Check in the Boot JDK directory.
49703    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49704
49705  DLL_NAME="$DLL_NAME"
49706  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49707  METHOD="well-known location in Boot JDK"
49708  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49709    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49710$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49711
49712    # Need to check if the found msvcr is correct architecture
49713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49714$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49715    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49717      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49718      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49719      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49720        CORRECT_MSVCR_ARCH="PE32 executable"
49721      else
49722        CORRECT_MSVCR_ARCH="PE32+ executable"
49723      fi
49724    else
49725      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49726        CORRECT_MSVCR_ARCH=386
49727      else
49728        CORRECT_MSVCR_ARCH=x86-64
49729      fi
49730    fi
49731    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49733$as_echo "ok" >&6; }
49734      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49735
49736  # Only process if variable expands to non-empty
49737
49738  if test "x$MSVC_DLL" != x; then
49739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49740
49741  # Input might be given as Windows format, start by converting to
49742  # unix format.
49743  path="$MSVC_DLL"
49744  new_path=`$CYGPATH -u "$path"`
49745
49746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49749  # "foo.exe" is OK but "foo" is an error.
49750  #
49751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49752  # It is also a way to make sure we got the proper file name for the real test later on.
49753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49754  if test "x$test_shortpath" = x; then
49755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49756$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49757    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49758  fi
49759
49760  # Call helper function which possibly converts this using DOS-style short mode.
49761  # If so, the updated path is stored in $new_path.
49762
49763  input_path="$new_path"
49764  # Check if we need to convert this using DOS-style short mode. If the path
49765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49766  # take no chances and rewrite it.
49767  # Note: m4 eats our [], so we need to use [ and ] instead.
49768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49769  if test "x$has_forbidden_chars" != x; then
49770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49774      # Going to short mode and back again did indeed matter. Since short mode is
49775      # case insensitive, let's make it lowercase to improve readability.
49776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49777      # Now convert it back to Unix-style (cygpath)
49778      input_path=`$CYGPATH -u "$shortmode_path"`
49779      new_path="$input_path"
49780    fi
49781  fi
49782
49783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49784  if test "x$test_cygdrive_prefix" = x; then
49785    # As a simple fix, exclude /usr/bin since it's not a real path.
49786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49788      # a path prefixed by /cygdrive for fixpath to work.
49789      new_path="$CYGWIN_ROOT_PATH$input_path"
49790    fi
49791  fi
49792
49793
49794  if test "x$path" != "x$new_path"; then
49795    MSVC_DLL="$new_path"
49796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49797$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49798  fi
49799
49800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49801
49802  path="$MSVC_DLL"
49803  has_colon=`$ECHO $path | $GREP ^.:`
49804  new_path="$path"
49805  if test "x$has_colon" = x; then
49806    # Not in mixed or Windows style, start by that.
49807    new_path=`cmd //c echo $path`
49808  fi
49809
49810
49811  input_path="$new_path"
49812  # Check if we need to convert this using DOS-style short mode. If the path
49813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49814  # take no chances and rewrite it.
49815  # Note: m4 eats our [], so we need to use [ and ] instead.
49816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49817  if test "x$has_forbidden_chars" != x; then
49818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49820  fi
49821
49822
49823  windows_path="$new_path"
49824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49825    unix_path=`$CYGPATH -u "$windows_path"`
49826    new_path="$unix_path"
49827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49829    new_path="$unix_path"
49830  fi
49831
49832  if test "x$path" != "x$new_path"; then
49833    MSVC_DLL="$new_path"
49834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49835$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49836  fi
49837
49838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49840
49841    else
49842      # We're on a unix platform. Hooray! :)
49843      path="$MSVC_DLL"
49844      has_space=`$ECHO "$path" | $GREP " "`
49845      if test "x$has_space" != x; then
49846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49847$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49849      fi
49850
49851      # Use eval to expand a potential ~
49852      eval path="$path"
49853      if test ! -f "$path" && test ! -d "$path"; then
49854        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49855      fi
49856
49857      if test -d "$path"; then
49858        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49859      else
49860        dir="`$DIRNAME "$path"`"
49861        base="`$BASENAME "$path"`"
49862        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49863      fi
49864    fi
49865  fi
49866
49867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49868$as_echo_n "checking for $DLL_NAME... " >&6; }
49869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49870$as_echo "$MSVC_DLL" >&6; }
49871    else
49872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49873$as_echo "incorrect, ignoring" >&6; }
49874      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49875$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49876    fi
49877  fi
49878
49879  fi
49880
49881  if test "x$MSVC_DLL" = x; then
49882    # Probe: Look in the Windows system32 directory
49883    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49884
49885  windows_path="$CYGWIN_SYSTEMROOT"
49886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49887    unix_path=`$CYGPATH -u "$windows_path"`
49888    CYGWIN_SYSTEMROOT="$unix_path"
49889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49891    CYGWIN_SYSTEMROOT="$unix_path"
49892  fi
49893
49894    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49895
49896  DLL_NAME="$DLL_NAME"
49897  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49898  METHOD="well-known location in SYSTEMROOT"
49899  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49900    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49901$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49902
49903    # Need to check if the found msvcr is correct architecture
49904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49905$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49906    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49908      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49909      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49910      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49911        CORRECT_MSVCR_ARCH="PE32 executable"
49912      else
49913        CORRECT_MSVCR_ARCH="PE32+ executable"
49914      fi
49915    else
49916      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49917        CORRECT_MSVCR_ARCH=386
49918      else
49919        CORRECT_MSVCR_ARCH=x86-64
49920      fi
49921    fi
49922    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49924$as_echo "ok" >&6; }
49925      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49926
49927  # Only process if variable expands to non-empty
49928
49929  if test "x$MSVC_DLL" != x; then
49930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49931
49932  # Input might be given as Windows format, start by converting to
49933  # unix format.
49934  path="$MSVC_DLL"
49935  new_path=`$CYGPATH -u "$path"`
49936
49937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49940  # "foo.exe" is OK but "foo" is an error.
49941  #
49942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49943  # It is also a way to make sure we got the proper file name for the real test later on.
49944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49945  if test "x$test_shortpath" = x; then
49946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49947$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49948    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49949  fi
49950
49951  # Call helper function which possibly converts this using DOS-style short mode.
49952  # If so, the updated path is stored in $new_path.
49953
49954  input_path="$new_path"
49955  # Check if we need to convert this using DOS-style short mode. If the path
49956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49957  # take no chances and rewrite it.
49958  # Note: m4 eats our [], so we need to use [ and ] instead.
49959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49960  if test "x$has_forbidden_chars" != x; then
49961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49965      # Going to short mode and back again did indeed matter. Since short mode is
49966      # case insensitive, let's make it lowercase to improve readability.
49967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49968      # Now convert it back to Unix-style (cygpath)
49969      input_path=`$CYGPATH -u "$shortmode_path"`
49970      new_path="$input_path"
49971    fi
49972  fi
49973
49974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49975  if test "x$test_cygdrive_prefix" = x; then
49976    # As a simple fix, exclude /usr/bin since it's not a real path.
49977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49979      # a path prefixed by /cygdrive for fixpath to work.
49980      new_path="$CYGWIN_ROOT_PATH$input_path"
49981    fi
49982  fi
49983
49984
49985  if test "x$path" != "x$new_path"; then
49986    MSVC_DLL="$new_path"
49987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49988$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49989  fi
49990
49991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49992
49993  path="$MSVC_DLL"
49994  has_colon=`$ECHO $path | $GREP ^.:`
49995  new_path="$path"
49996  if test "x$has_colon" = x; then
49997    # Not in mixed or Windows style, start by that.
49998    new_path=`cmd //c echo $path`
49999  fi
50000
50001
50002  input_path="$new_path"
50003  # Check if we need to convert this using DOS-style short mode. If the path
50004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50005  # take no chances and rewrite it.
50006  # Note: m4 eats our [], so we need to use [ and ] instead.
50007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50008  if test "x$has_forbidden_chars" != x; then
50009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50011  fi
50012
50013
50014  windows_path="$new_path"
50015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50016    unix_path=`$CYGPATH -u "$windows_path"`
50017    new_path="$unix_path"
50018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50020    new_path="$unix_path"
50021  fi
50022
50023  if test "x$path" != "x$new_path"; then
50024    MSVC_DLL="$new_path"
50025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50026$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50027  fi
50028
50029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50031
50032    else
50033      # We're on a unix platform. Hooray! :)
50034      path="$MSVC_DLL"
50035      has_space=`$ECHO "$path" | $GREP " "`
50036      if test "x$has_space" != x; then
50037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50038$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50040      fi
50041
50042      # Use eval to expand a potential ~
50043      eval path="$path"
50044      if test ! -f "$path" && test ! -d "$path"; then
50045        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50046      fi
50047
50048      if test -d "$path"; then
50049        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50050      else
50051        dir="`$DIRNAME "$path"`"
50052        base="`$BASENAME "$path"`"
50053        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50054      fi
50055    fi
50056  fi
50057
50058      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50059$as_echo_n "checking for $DLL_NAME... " >&6; }
50060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50061$as_echo "$MSVC_DLL" >&6; }
50062    else
50063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50064$as_echo "incorrect, ignoring" >&6; }
50065      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50066$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50067    fi
50068  fi
50069
50070  fi
50071
50072  if test "x$MSVC_DLL" = x; then
50073    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50074    if test "x$VS100COMNTOOLS" != x; then
50075      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50076
50077  windows_path="$CYGWIN_VS_TOOLS_DIR"
50078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50079    unix_path=`$CYGPATH -u "$windows_path"`
50080    CYGWIN_VS_TOOLS_DIR="$unix_path"
50081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50083    CYGWIN_VS_TOOLS_DIR="$unix_path"
50084  fi
50085
50086      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50087        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50088	    | $GREP -i /x64/ | $HEAD --lines 1`
50089      else
50090        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50091	    | $GREP -i /x86/ | $HEAD --lines 1`
50092      fi
50093
50094  DLL_NAME="$DLL_NAME"
50095  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50096  METHOD="search of VS100COMNTOOLS"
50097  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50098    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50099$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50100
50101    # Need to check if the found msvcr is correct architecture
50102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50103$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50104    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50106      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50107      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50108      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50109        CORRECT_MSVCR_ARCH="PE32 executable"
50110      else
50111        CORRECT_MSVCR_ARCH="PE32+ executable"
50112      fi
50113    else
50114      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50115        CORRECT_MSVCR_ARCH=386
50116      else
50117        CORRECT_MSVCR_ARCH=x86-64
50118      fi
50119    fi
50120    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50122$as_echo "ok" >&6; }
50123      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50124
50125  # Only process if variable expands to non-empty
50126
50127  if test "x$MSVC_DLL" != x; then
50128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50129
50130  # Input might be given as Windows format, start by converting to
50131  # unix format.
50132  path="$MSVC_DLL"
50133  new_path=`$CYGPATH -u "$path"`
50134
50135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50138  # "foo.exe" is OK but "foo" is an error.
50139  #
50140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50141  # It is also a way to make sure we got the proper file name for the real test later on.
50142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50143  if test "x$test_shortpath" = x; then
50144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50145$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50146    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50147  fi
50148
50149  # Call helper function which possibly converts this using DOS-style short mode.
50150  # If so, the updated path is stored in $new_path.
50151
50152  input_path="$new_path"
50153  # Check if we need to convert this using DOS-style short mode. If the path
50154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50155  # take no chances and rewrite it.
50156  # Note: m4 eats our [], so we need to use [ and ] instead.
50157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50158  if test "x$has_forbidden_chars" != x; then
50159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50163      # Going to short mode and back again did indeed matter. Since short mode is
50164      # case insensitive, let's make it lowercase to improve readability.
50165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50166      # Now convert it back to Unix-style (cygpath)
50167      input_path=`$CYGPATH -u "$shortmode_path"`
50168      new_path="$input_path"
50169    fi
50170  fi
50171
50172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50173  if test "x$test_cygdrive_prefix" = x; then
50174    # As a simple fix, exclude /usr/bin since it's not a real path.
50175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50177      # a path prefixed by /cygdrive for fixpath to work.
50178      new_path="$CYGWIN_ROOT_PATH$input_path"
50179    fi
50180  fi
50181
50182
50183  if test "x$path" != "x$new_path"; then
50184    MSVC_DLL="$new_path"
50185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50186$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50187  fi
50188
50189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50190
50191  path="$MSVC_DLL"
50192  has_colon=`$ECHO $path | $GREP ^.:`
50193  new_path="$path"
50194  if test "x$has_colon" = x; then
50195    # Not in mixed or Windows style, start by that.
50196    new_path=`cmd //c echo $path`
50197  fi
50198
50199
50200  input_path="$new_path"
50201  # Check if we need to convert this using DOS-style short mode. If the path
50202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50203  # take no chances and rewrite it.
50204  # Note: m4 eats our [], so we need to use [ and ] instead.
50205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50206  if test "x$has_forbidden_chars" != x; then
50207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50209  fi
50210
50211
50212  windows_path="$new_path"
50213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50214    unix_path=`$CYGPATH -u "$windows_path"`
50215    new_path="$unix_path"
50216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50218    new_path="$unix_path"
50219  fi
50220
50221  if test "x$path" != "x$new_path"; then
50222    MSVC_DLL="$new_path"
50223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50224$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50225  fi
50226
50227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50229
50230    else
50231      # We're on a unix platform. Hooray! :)
50232      path="$MSVC_DLL"
50233      has_space=`$ECHO "$path" | $GREP " "`
50234      if test "x$has_space" != x; then
50235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50236$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50238      fi
50239
50240      # Use eval to expand a potential ~
50241      eval path="$path"
50242      if test ! -f "$path" && test ! -d "$path"; then
50243        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50244      fi
50245
50246      if test -d "$path"; then
50247        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50248      else
50249        dir="`$DIRNAME "$path"`"
50250        base="`$BASENAME "$path"`"
50251        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50252      fi
50253    fi
50254  fi
50255
50256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50257$as_echo_n "checking for $DLL_NAME... " >&6; }
50258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50259$as_echo "$MSVC_DLL" >&6; }
50260    else
50261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50262$as_echo "incorrect, ignoring" >&6; }
50263      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50264$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50265    fi
50266  fi
50267
50268    fi
50269  fi
50270
50271  if test "x$MSVC_DLL" = x; then
50272    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50273    # (This was the original behaviour; kept since it might turn something up)
50274    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50275      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50276        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50277	    | $GREP x64 | $HEAD --lines 1`
50278      else
50279        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50280	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50281        if test "x$POSSIBLE_MSVC_DLL" = x; then
50282          # We're grasping at straws now...
50283          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50284	      | $HEAD --lines 1`
50285        fi
50286      fi
50287
50288
50289  DLL_NAME="$DLL_NAME"
50290  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50291  METHOD="search of VCINSTALLDIR"
50292  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50293    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50294$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50295
50296    # Need to check if the found msvcr is correct architecture
50297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50298$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50299    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50301      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50302      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50303      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50304        CORRECT_MSVCR_ARCH="PE32 executable"
50305      else
50306        CORRECT_MSVCR_ARCH="PE32+ executable"
50307      fi
50308    else
50309      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50310        CORRECT_MSVCR_ARCH=386
50311      else
50312        CORRECT_MSVCR_ARCH=x86-64
50313      fi
50314    fi
50315    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50317$as_echo "ok" >&6; }
50318      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50319
50320  # Only process if variable expands to non-empty
50321
50322  if test "x$MSVC_DLL" != x; then
50323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50324
50325  # Input might be given as Windows format, start by converting to
50326  # unix format.
50327  path="$MSVC_DLL"
50328  new_path=`$CYGPATH -u "$path"`
50329
50330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50333  # "foo.exe" is OK but "foo" is an error.
50334  #
50335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50336  # It is also a way to make sure we got the proper file name for the real test later on.
50337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50338  if test "x$test_shortpath" = x; then
50339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50340$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50341    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50342  fi
50343
50344  # Call helper function which possibly converts this using DOS-style short mode.
50345  # If so, the updated path is stored in $new_path.
50346
50347  input_path="$new_path"
50348  # Check if we need to convert this using DOS-style short mode. If the path
50349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50350  # take no chances and rewrite it.
50351  # Note: m4 eats our [], so we need to use [ and ] instead.
50352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50353  if test "x$has_forbidden_chars" != x; then
50354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50358      # Going to short mode and back again did indeed matter. Since short mode is
50359      # case insensitive, let's make it lowercase to improve readability.
50360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50361      # Now convert it back to Unix-style (cygpath)
50362      input_path=`$CYGPATH -u "$shortmode_path"`
50363      new_path="$input_path"
50364    fi
50365  fi
50366
50367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50368  if test "x$test_cygdrive_prefix" = x; then
50369    # As a simple fix, exclude /usr/bin since it's not a real path.
50370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50372      # a path prefixed by /cygdrive for fixpath to work.
50373      new_path="$CYGWIN_ROOT_PATH$input_path"
50374    fi
50375  fi
50376
50377
50378  if test "x$path" != "x$new_path"; then
50379    MSVC_DLL="$new_path"
50380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50381$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50382  fi
50383
50384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50385
50386  path="$MSVC_DLL"
50387  has_colon=`$ECHO $path | $GREP ^.:`
50388  new_path="$path"
50389  if test "x$has_colon" = x; then
50390    # Not in mixed or Windows style, start by that.
50391    new_path=`cmd //c echo $path`
50392  fi
50393
50394
50395  input_path="$new_path"
50396  # Check if we need to convert this using DOS-style short mode. If the path
50397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50398  # take no chances and rewrite it.
50399  # Note: m4 eats our [], so we need to use [ and ] instead.
50400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50401  if test "x$has_forbidden_chars" != x; then
50402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50404  fi
50405
50406
50407  windows_path="$new_path"
50408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50409    unix_path=`$CYGPATH -u "$windows_path"`
50410    new_path="$unix_path"
50411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50413    new_path="$unix_path"
50414  fi
50415
50416  if test "x$path" != "x$new_path"; then
50417    MSVC_DLL="$new_path"
50418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50419$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50420  fi
50421
50422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50424
50425    else
50426      # We're on a unix platform. Hooray! :)
50427      path="$MSVC_DLL"
50428      has_space=`$ECHO "$path" | $GREP " "`
50429      if test "x$has_space" != x; then
50430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50431$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50433      fi
50434
50435      # Use eval to expand a potential ~
50436      eval path="$path"
50437      if test ! -f "$path" && test ! -d "$path"; then
50438        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50439      fi
50440
50441      if test -d "$path"; then
50442        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50443      else
50444        dir="`$DIRNAME "$path"`"
50445        base="`$BASENAME "$path"`"
50446        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50447      fi
50448    fi
50449  fi
50450
50451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50452$as_echo_n "checking for $DLL_NAME... " >&6; }
50453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50454$as_echo "$MSVC_DLL" >&6; }
50455    else
50456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50457$as_echo "incorrect, ignoring" >&6; }
50458      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50459$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50460    fi
50461  fi
50462
50463    fi
50464  fi
50465
50466  if test "x$MSVC_DLL" = x; then
50467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50468$as_echo_n "checking for $DLL_NAME... " >&6; }
50469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50470$as_echo "no" >&6; }
50471    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50472  fi
50473
50474      MSVCP_DLL="$MSVC_DLL"
50475    fi
50476
50477  fi
50478
50479  fi
50480
50481
50482  if test "x$NEEDS_LIB_X11" = xfalse; then
50483    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50484      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50485$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50486    fi
50487    X_CFLAGS=
50488    X_LIBS=
50489  else
50490
50491    if test "x${with_x}" = xno; then
50492      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50493    fi
50494
50495    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50496      # The user has specified a X11 base directory. Use it for includes and
50497      # libraries, unless explicitely overridden.
50498      if test "x$x_includes" = xNONE; then
50499        x_includes="${with_x}/include"
50500      fi
50501      if test "x$x_libraries" = xNONE; then
50502        x_libraries="${with_x}/lib"
50503      fi
50504    else
50505      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50506      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50507      # --x-libraries for the sysroot, if that seems to be correct.
50508      if test "x$SYSROOT" != "x"; then
50509        if test "x$x_includes" = xNONE; then
50510          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50511            x_includes="$SYSROOT/usr/X11R6/include"
50512          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50513            x_includes="$SYSROOT/usr/include"
50514          fi
50515        fi
50516        if test "x$x_libraries" = xNONE; then
50517          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50518            x_libraries="$SYSROOT/usr/X11R6/lib"
50519          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50520            x_libraries="$SYSROOT/usr/lib64"
50521          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50522            x_libraries="$SYSROOT/usr/lib"
50523          fi
50524        fi
50525      fi
50526    fi
50527
50528    # Now let autoconf do it's magic
50529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50530$as_echo_n "checking for X... " >&6; }
50531
50532
50533# Check whether --with-x was given.
50534if test "${with_x+set}" = set; then :
50535  withval=$with_x;
50536fi
50537
50538# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50539if test "x$with_x" = xno; then
50540  # The user explicitly disabled X.
50541  have_x=disabled
50542else
50543  case $x_includes,$x_libraries in #(
50544    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50545    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50546  $as_echo_n "(cached) " >&6
50547else
50548  # One or both of the vars are not set, and there is no cached value.
50549ac_x_includes=no ac_x_libraries=no
50550rm -f -r conftest.dir
50551if mkdir conftest.dir; then
50552  cd conftest.dir
50553  cat >Imakefile <<'_ACEOF'
50554incroot:
50555	@echo incroot='${INCROOT}'
50556usrlibdir:
50557	@echo usrlibdir='${USRLIBDIR}'
50558libdir:
50559	@echo libdir='${LIBDIR}'
50560_ACEOF
50561  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50562    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50563    for ac_var in incroot usrlibdir libdir; do
50564      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50565    done
50566    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50567    for ac_extension in a so sl dylib la dll; do
50568      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50569	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50570	ac_im_usrlibdir=$ac_im_libdir; break
50571      fi
50572    done
50573    # Screen out bogus values from the imake configuration.  They are
50574    # bogus both because they are the default anyway, and because
50575    # using them would break gcc on systems where it needs fixed includes.
50576    case $ac_im_incroot in
50577	/usr/include) ac_x_includes= ;;
50578	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50579    esac
50580    case $ac_im_usrlibdir in
50581	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50582	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50583    esac
50584  fi
50585  cd ..
50586  rm -f -r conftest.dir
50587fi
50588
50589# Standard set of common directories for X headers.
50590# Check X11 before X11Rn because it is often a symlink to the current release.
50591ac_x_header_dirs='
50592/usr/X11/include
50593/usr/X11R7/include
50594/usr/X11R6/include
50595/usr/X11R5/include
50596/usr/X11R4/include
50597
50598/usr/include/X11
50599/usr/include/X11R7
50600/usr/include/X11R6
50601/usr/include/X11R5
50602/usr/include/X11R4
50603
50604/usr/local/X11/include
50605/usr/local/X11R7/include
50606/usr/local/X11R6/include
50607/usr/local/X11R5/include
50608/usr/local/X11R4/include
50609
50610/usr/local/include/X11
50611/usr/local/include/X11R7
50612/usr/local/include/X11R6
50613/usr/local/include/X11R5
50614/usr/local/include/X11R4
50615
50616/usr/X386/include
50617/usr/x386/include
50618/usr/XFree86/include/X11
50619
50620/usr/include
50621/usr/local/include
50622/usr/unsupported/include
50623/usr/athena/include
50624/usr/local/x11r5/include
50625/usr/lpp/Xamples/include
50626
50627/usr/openwin/include
50628/usr/openwin/share/include'
50629
50630if test "$ac_x_includes" = no; then
50631  # Guess where to find include files, by looking for Xlib.h.
50632  # First, try using that file with no special directory specified.
50633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50634/* end confdefs.h.  */
50635#include <X11/Xlib.h>
50636_ACEOF
50637if ac_fn_cxx_try_cpp "$LINENO"; then :
50638  # We can compile using X headers with no special include directory.
50639ac_x_includes=
50640else
50641  for ac_dir in $ac_x_header_dirs; do
50642  if test -r "$ac_dir/X11/Xlib.h"; then
50643    ac_x_includes=$ac_dir
50644    break
50645  fi
50646done
50647fi
50648rm -f conftest.err conftest.i conftest.$ac_ext
50649fi # $ac_x_includes = no
50650
50651if test "$ac_x_libraries" = no; then
50652  # Check for the libraries.
50653  # See if we find them without any special options.
50654  # Don't add to $LIBS permanently.
50655  ac_save_LIBS=$LIBS
50656  LIBS="-lX11 $LIBS"
50657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50658/* end confdefs.h.  */
50659#include <X11/Xlib.h>
50660int
50661main ()
50662{
50663XrmInitialize ()
50664  ;
50665  return 0;
50666}
50667_ACEOF
50668if ac_fn_cxx_try_link "$LINENO"; then :
50669  LIBS=$ac_save_LIBS
50670# We can link X programs with no special library path.
50671ac_x_libraries=
50672else
50673  LIBS=$ac_save_LIBS
50674for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50675do
50676  # Don't even attempt the hair of trying to link an X program!
50677  for ac_extension in a so sl dylib la dll; do
50678    if test -r "$ac_dir/libX11.$ac_extension"; then
50679      ac_x_libraries=$ac_dir
50680      break 2
50681    fi
50682  done
50683done
50684fi
50685rm -f core conftest.err conftest.$ac_objext \
50686    conftest$ac_exeext conftest.$ac_ext
50687fi # $ac_x_libraries = no
50688
50689case $ac_x_includes,$ac_x_libraries in #(
50690  no,* | *,no | *\'*)
50691    # Didn't find X, or a directory has "'" in its name.
50692    ac_cv_have_x="have_x=no";; #(
50693  *)
50694    # Record where we found X for the cache.
50695    ac_cv_have_x="have_x=yes\
50696	ac_x_includes='$ac_x_includes'\
50697	ac_x_libraries='$ac_x_libraries'"
50698esac
50699fi
50700;; #(
50701    *) have_x=yes;;
50702  esac
50703  eval "$ac_cv_have_x"
50704fi # $with_x != no
50705
50706if test "$have_x" != yes; then
50707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50708$as_echo "$have_x" >&6; }
50709  no_x=yes
50710else
50711  # If each of the values was on the command line, it overrides each guess.
50712  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50713  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50714  # Update the cache value to reflect the command line values.
50715  ac_cv_have_x="have_x=yes\
50716	ac_x_includes='$x_includes'\
50717	ac_x_libraries='$x_libraries'"
50718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50719$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50720fi
50721
50722    if test "$no_x" = yes; then
50723  # Not all programs may use this symbol, but it does not hurt to define it.
50724
50725$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50726
50727  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50728else
50729  if test -n "$x_includes"; then
50730    X_CFLAGS="$X_CFLAGS -I$x_includes"
50731  fi
50732
50733  # It would also be nice to do this for all -L options, not just this one.
50734  if test -n "$x_libraries"; then
50735    X_LIBS="$X_LIBS -L$x_libraries"
50736    # For Solaris; some versions of Sun CC require a space after -R and
50737    # others require no space.  Words are not sufficient . . . .
50738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50739$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50740    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50741    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50742    ac_cxx_werror_flag=yes
50743    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50744/* end confdefs.h.  */
50745
50746int
50747main ()
50748{
50749
50750  ;
50751  return 0;
50752}
50753_ACEOF
50754if ac_fn_cxx_try_link "$LINENO"; then :
50755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50756$as_echo "no" >&6; }
50757       X_LIBS="$X_LIBS -R$x_libraries"
50758else
50759  LIBS="$ac_xsave_LIBS -R $x_libraries"
50760       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50761/* end confdefs.h.  */
50762
50763int
50764main ()
50765{
50766
50767  ;
50768  return 0;
50769}
50770_ACEOF
50771if ac_fn_cxx_try_link "$LINENO"; then :
50772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50773$as_echo "yes" >&6; }
50774	  X_LIBS="$X_LIBS -R $x_libraries"
50775else
50776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50777$as_echo "neither works" >&6; }
50778fi
50779rm -f core conftest.err conftest.$ac_objext \
50780    conftest$ac_exeext conftest.$ac_ext
50781fi
50782rm -f core conftest.err conftest.$ac_objext \
50783    conftest$ac_exeext conftest.$ac_ext
50784    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50785    LIBS=$ac_xsave_LIBS
50786  fi
50787
50788  # Check for system-dependent libraries X programs must link with.
50789  # Do this before checking for the system-independent R6 libraries
50790  # (-lICE), since we may need -lsocket or whatever for X linking.
50791
50792  if test "$ISC" = yes; then
50793    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50794  else
50795    # Martyn Johnson says this is needed for Ultrix, if the X
50796    # libraries were built with DECnet support.  And Karl Berry says
50797    # the Alpha needs dnet_stub (dnet does not exist).
50798    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50800/* end confdefs.h.  */
50801
50802/* Override any GCC internal prototype to avoid an error.
50803   Use char because int might match the return type of a GCC
50804   builtin and then its argument prototype would still apply.  */
50805#ifdef __cplusplus
50806extern "C"
50807#endif
50808char XOpenDisplay ();
50809int
50810main ()
50811{
50812return XOpenDisplay ();
50813  ;
50814  return 0;
50815}
50816_ACEOF
50817if ac_fn_cxx_try_link "$LINENO"; then :
50818
50819else
50820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50821$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50822if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50823  $as_echo_n "(cached) " >&6
50824else
50825  ac_check_lib_save_LIBS=$LIBS
50826LIBS="-ldnet  $LIBS"
50827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50828/* end confdefs.h.  */
50829
50830/* Override any GCC internal prototype to avoid an error.
50831   Use char because int might match the return type of a GCC
50832   builtin and then its argument prototype would still apply.  */
50833#ifdef __cplusplus
50834extern "C"
50835#endif
50836char dnet_ntoa ();
50837int
50838main ()
50839{
50840return dnet_ntoa ();
50841  ;
50842  return 0;
50843}
50844_ACEOF
50845if ac_fn_cxx_try_link "$LINENO"; then :
50846  ac_cv_lib_dnet_dnet_ntoa=yes
50847else
50848  ac_cv_lib_dnet_dnet_ntoa=no
50849fi
50850rm -f core conftest.err conftest.$ac_objext \
50851    conftest$ac_exeext conftest.$ac_ext
50852LIBS=$ac_check_lib_save_LIBS
50853fi
50854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50855$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50856if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50857  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50858fi
50859
50860    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50861      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50862$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50863if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50864  $as_echo_n "(cached) " >&6
50865else
50866  ac_check_lib_save_LIBS=$LIBS
50867LIBS="-ldnet_stub  $LIBS"
50868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50869/* end confdefs.h.  */
50870
50871/* Override any GCC internal prototype to avoid an error.
50872   Use char because int might match the return type of a GCC
50873   builtin and then its argument prototype would still apply.  */
50874#ifdef __cplusplus
50875extern "C"
50876#endif
50877char dnet_ntoa ();
50878int
50879main ()
50880{
50881return dnet_ntoa ();
50882  ;
50883  return 0;
50884}
50885_ACEOF
50886if ac_fn_cxx_try_link "$LINENO"; then :
50887  ac_cv_lib_dnet_stub_dnet_ntoa=yes
50888else
50889  ac_cv_lib_dnet_stub_dnet_ntoa=no
50890fi
50891rm -f core conftest.err conftest.$ac_objext \
50892    conftest$ac_exeext conftest.$ac_ext
50893LIBS=$ac_check_lib_save_LIBS
50894fi
50895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50896$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50897if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50898  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50899fi
50900
50901    fi
50902fi
50903rm -f core conftest.err conftest.$ac_objext \
50904    conftest$ac_exeext conftest.$ac_ext
50905    LIBS="$ac_xsave_LIBS"
50906
50907    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50908    # to get the SysV transport functions.
50909    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50910    # needs -lnsl.
50911    # The nsl library prevents programs from opening the X display
50912    # on Irix 5.2, according to T.E. Dickey.
50913    # The functions gethostbyname, getservbyname, and inet_addr are
50914    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50915    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50916if test "x$ac_cv_func_gethostbyname" = xyes; then :
50917
50918fi
50919
50920    if test $ac_cv_func_gethostbyname = no; then
50921      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50922$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50923if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50924  $as_echo_n "(cached) " >&6
50925else
50926  ac_check_lib_save_LIBS=$LIBS
50927LIBS="-lnsl  $LIBS"
50928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50929/* end confdefs.h.  */
50930
50931/* Override any GCC internal prototype to avoid an error.
50932   Use char because int might match the return type of a GCC
50933   builtin and then its argument prototype would still apply.  */
50934#ifdef __cplusplus
50935extern "C"
50936#endif
50937char gethostbyname ();
50938int
50939main ()
50940{
50941return gethostbyname ();
50942  ;
50943  return 0;
50944}
50945_ACEOF
50946if ac_fn_cxx_try_link "$LINENO"; then :
50947  ac_cv_lib_nsl_gethostbyname=yes
50948else
50949  ac_cv_lib_nsl_gethostbyname=no
50950fi
50951rm -f core conftest.err conftest.$ac_objext \
50952    conftest$ac_exeext conftest.$ac_ext
50953LIBS=$ac_check_lib_save_LIBS
50954fi
50955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50956$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50957if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50958  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50959fi
50960
50961      if test $ac_cv_lib_nsl_gethostbyname = no; then
50962	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50963$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50964if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50965  $as_echo_n "(cached) " >&6
50966else
50967  ac_check_lib_save_LIBS=$LIBS
50968LIBS="-lbsd  $LIBS"
50969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50970/* end confdefs.h.  */
50971
50972/* Override any GCC internal prototype to avoid an error.
50973   Use char because int might match the return type of a GCC
50974   builtin and then its argument prototype would still apply.  */
50975#ifdef __cplusplus
50976extern "C"
50977#endif
50978char gethostbyname ();
50979int
50980main ()
50981{
50982return gethostbyname ();
50983  ;
50984  return 0;
50985}
50986_ACEOF
50987if ac_fn_cxx_try_link "$LINENO"; then :
50988  ac_cv_lib_bsd_gethostbyname=yes
50989else
50990  ac_cv_lib_bsd_gethostbyname=no
50991fi
50992rm -f core conftest.err conftest.$ac_objext \
50993    conftest$ac_exeext conftest.$ac_ext
50994LIBS=$ac_check_lib_save_LIBS
50995fi
50996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
50997$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
50998if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
50999  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51000fi
51001
51002      fi
51003    fi
51004
51005    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51006    # socket/setsockopt and other routines are undefined under SCO ODT
51007    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51008    # on later versions), says Simon Leinen: it contains gethostby*
51009    # variants that don't use the name server (or something).  -lsocket
51010    # must be given before -lnsl if both are needed.  We assume that
51011    # if connect needs -lnsl, so does gethostbyname.
51012    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51013if test "x$ac_cv_func_connect" = xyes; then :
51014
51015fi
51016
51017    if test $ac_cv_func_connect = no; then
51018      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51019$as_echo_n "checking for connect in -lsocket... " >&6; }
51020if ${ac_cv_lib_socket_connect+:} false; then :
51021  $as_echo_n "(cached) " >&6
51022else
51023  ac_check_lib_save_LIBS=$LIBS
51024LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51026/* end confdefs.h.  */
51027
51028/* Override any GCC internal prototype to avoid an error.
51029   Use char because int might match the return type of a GCC
51030   builtin and then its argument prototype would still apply.  */
51031#ifdef __cplusplus
51032extern "C"
51033#endif
51034char connect ();
51035int
51036main ()
51037{
51038return connect ();
51039  ;
51040  return 0;
51041}
51042_ACEOF
51043if ac_fn_cxx_try_link "$LINENO"; then :
51044  ac_cv_lib_socket_connect=yes
51045else
51046  ac_cv_lib_socket_connect=no
51047fi
51048rm -f core conftest.err conftest.$ac_objext \
51049    conftest$ac_exeext conftest.$ac_ext
51050LIBS=$ac_check_lib_save_LIBS
51051fi
51052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51053$as_echo "$ac_cv_lib_socket_connect" >&6; }
51054if test "x$ac_cv_lib_socket_connect" = xyes; then :
51055  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51056fi
51057
51058    fi
51059
51060    # Guillermo Gomez says -lposix is necessary on A/UX.
51061    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51062if test "x$ac_cv_func_remove" = xyes; then :
51063
51064fi
51065
51066    if test $ac_cv_func_remove = no; then
51067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51068$as_echo_n "checking for remove in -lposix... " >&6; }
51069if ${ac_cv_lib_posix_remove+:} false; then :
51070  $as_echo_n "(cached) " >&6
51071else
51072  ac_check_lib_save_LIBS=$LIBS
51073LIBS="-lposix  $LIBS"
51074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51075/* end confdefs.h.  */
51076
51077/* Override any GCC internal prototype to avoid an error.
51078   Use char because int might match the return type of a GCC
51079   builtin and then its argument prototype would still apply.  */
51080#ifdef __cplusplus
51081extern "C"
51082#endif
51083char remove ();
51084int
51085main ()
51086{
51087return remove ();
51088  ;
51089  return 0;
51090}
51091_ACEOF
51092if ac_fn_cxx_try_link "$LINENO"; then :
51093  ac_cv_lib_posix_remove=yes
51094else
51095  ac_cv_lib_posix_remove=no
51096fi
51097rm -f core conftest.err conftest.$ac_objext \
51098    conftest$ac_exeext conftest.$ac_ext
51099LIBS=$ac_check_lib_save_LIBS
51100fi
51101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51102$as_echo "$ac_cv_lib_posix_remove" >&6; }
51103if test "x$ac_cv_lib_posix_remove" = xyes; then :
51104  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51105fi
51106
51107    fi
51108
51109    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51110    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51111if test "x$ac_cv_func_shmat" = xyes; then :
51112
51113fi
51114
51115    if test $ac_cv_func_shmat = no; then
51116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51117$as_echo_n "checking for shmat in -lipc... " >&6; }
51118if ${ac_cv_lib_ipc_shmat+:} false; then :
51119  $as_echo_n "(cached) " >&6
51120else
51121  ac_check_lib_save_LIBS=$LIBS
51122LIBS="-lipc  $LIBS"
51123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51124/* end confdefs.h.  */
51125
51126/* Override any GCC internal prototype to avoid an error.
51127   Use char because int might match the return type of a GCC
51128   builtin and then its argument prototype would still apply.  */
51129#ifdef __cplusplus
51130extern "C"
51131#endif
51132char shmat ();
51133int
51134main ()
51135{
51136return shmat ();
51137  ;
51138  return 0;
51139}
51140_ACEOF
51141if ac_fn_cxx_try_link "$LINENO"; then :
51142  ac_cv_lib_ipc_shmat=yes
51143else
51144  ac_cv_lib_ipc_shmat=no
51145fi
51146rm -f core conftest.err conftest.$ac_objext \
51147    conftest$ac_exeext conftest.$ac_ext
51148LIBS=$ac_check_lib_save_LIBS
51149fi
51150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51151$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51152if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51153  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51154fi
51155
51156    fi
51157  fi
51158
51159  # Check for libraries that X11R6 Xt/Xaw programs need.
51160  ac_save_LDFLAGS=$LDFLAGS
51161  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51162  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51163  # check for ICE first), but we must link in the order -lSM -lICE or
51164  # we get undefined symbols.  So assume we have SM if we have ICE.
51165  # These have to be linked with before -lX11, unlike the other
51166  # libraries we check for below, so use a different variable.
51167  # John Interrante, Karl Berry
51168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51169$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51170if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51171  $as_echo_n "(cached) " >&6
51172else
51173  ac_check_lib_save_LIBS=$LIBS
51174LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51176/* end confdefs.h.  */
51177
51178/* Override any GCC internal prototype to avoid an error.
51179   Use char because int might match the return type of a GCC
51180   builtin and then its argument prototype would still apply.  */
51181#ifdef __cplusplus
51182extern "C"
51183#endif
51184char IceConnectionNumber ();
51185int
51186main ()
51187{
51188return IceConnectionNumber ();
51189  ;
51190  return 0;
51191}
51192_ACEOF
51193if ac_fn_cxx_try_link "$LINENO"; then :
51194  ac_cv_lib_ICE_IceConnectionNumber=yes
51195else
51196  ac_cv_lib_ICE_IceConnectionNumber=no
51197fi
51198rm -f core conftest.err conftest.$ac_objext \
51199    conftest$ac_exeext conftest.$ac_ext
51200LIBS=$ac_check_lib_save_LIBS
51201fi
51202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51203$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51204if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51205  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51206fi
51207
51208  LDFLAGS=$ac_save_LDFLAGS
51209
51210fi
51211
51212
51213    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51214    # this doesn't make sense so we remove it.
51215    if test "x$COMPILE_TYPE" = xcross; then
51216      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51217    fi
51218
51219    if test "x$no_x" = xyes; then
51220
51221  # Print a helpful message on how to acquire the necessary build dependency.
51222  # x11 is the help tag: freetype, cups, alsa etc
51223  MISSING_DEPENDENCY=x11
51224
51225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51226    cygwin_help $MISSING_DEPENDENCY
51227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51228    msys_help $MISSING_DEPENDENCY
51229  else
51230    PKGHANDLER_COMMAND=
51231
51232    case $PKGHANDLER in
51233      apt-get)
51234        apt_help     $MISSING_DEPENDENCY ;;
51235      yum)
51236        yum_help     $MISSING_DEPENDENCY ;;
51237      port)
51238        port_help    $MISSING_DEPENDENCY ;;
51239      pkgutil)
51240        pkgutil_help $MISSING_DEPENDENCY ;;
51241      pkgadd)
51242        pkgadd_help  $MISSING_DEPENDENCY ;;
51243    esac
51244
51245    if test "x$PKGHANDLER_COMMAND" != x; then
51246      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51247    fi
51248  fi
51249
51250      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51251    fi
51252
51253    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51254      OPENWIN_HOME="/usr/openwin"
51255      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51256      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51257          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51258          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51259          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51260    fi
51261
51262    ac_ext=c
51263ac_cpp='$CPP $CPPFLAGS'
51264ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51265ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51266ac_compiler_gnu=$ac_cv_c_compiler_gnu
51267
51268    OLD_CFLAGS="$CFLAGS"
51269    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51270
51271    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51272    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51273do :
51274  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51275ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51276          # include <X11/Xlib.h>
51277          # include <X11/Xutil.h>
51278
51279
51280"
51281if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51282  cat >>confdefs.h <<_ACEOF
51283#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51284_ACEOF
51285 X11_HEADERS_OK=yes
51286else
51287  X11_HEADERS_OK=no; break
51288fi
51289
51290done
51291
51292
51293    if test "x$X11_HEADERS_OK" = xno; then
51294
51295  # Print a helpful message on how to acquire the necessary build dependency.
51296  # x11 is the help tag: freetype, cups, alsa etc
51297  MISSING_DEPENDENCY=x11
51298
51299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51300    cygwin_help $MISSING_DEPENDENCY
51301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51302    msys_help $MISSING_DEPENDENCY
51303  else
51304    PKGHANDLER_COMMAND=
51305
51306    case $PKGHANDLER in
51307      apt-get)
51308        apt_help     $MISSING_DEPENDENCY ;;
51309      yum)
51310        yum_help     $MISSING_DEPENDENCY ;;
51311      port)
51312        port_help    $MISSING_DEPENDENCY ;;
51313      pkgutil)
51314        pkgutil_help $MISSING_DEPENDENCY ;;
51315      pkgadd)
51316        pkgadd_help  $MISSING_DEPENDENCY ;;
51317    esac
51318
51319    if test "x$PKGHANDLER_COMMAND" != x; then
51320      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51321    fi
51322  fi
51323
51324      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51325    fi
51326
51327    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51328    # defined in libawt_xawt.
51329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51330$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51331    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51332/* end confdefs.h.  */
51333#include <X11/extensions/Xrender.h>
51334int
51335main ()
51336{
51337XLinearGradient x;
51338  ;
51339  return 0;
51340}
51341_ACEOF
51342if ac_fn_c_try_compile "$LINENO"; then :
51343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51344$as_echo "yes" >&6; }
51345else
51346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51347$as_echo "no" >&6; }
51348         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51349fi
51350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51351
51352    CFLAGS="$OLD_CFLAGS"
51353    ac_ext=cpp
51354ac_cpp='$CXXCPP $CPPFLAGS'
51355ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51356ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51357ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51358
51359  fi # NEEDS_LIB_X11
51360
51361
51362
51363
51364
51365
51366# Check whether --with-cups was given.
51367if test "${with_cups+set}" = set; then :
51368  withval=$with_cups;
51369fi
51370
51371
51372# Check whether --with-cups-include was given.
51373if test "${with_cups_include+set}" = set; then :
51374  withval=$with_cups_include;
51375fi
51376
51377
51378  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51379    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51380        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51381      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51382$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51383    fi
51384    CUPS_CFLAGS=
51385  else
51386    CUPS_FOUND=no
51387
51388    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51389      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51390    fi
51391
51392    if test "x${with_cups}" != x; then
51393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51394$as_echo_n "checking for cups headers... " >&6; }
51395      if test -s "${with_cups}/include/cups/cups.h"; then
51396        CUPS_CFLAGS="-I${with_cups}/include"
51397        CUPS_FOUND=yes
51398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51399$as_echo "$CUPS_FOUND" >&6; }
51400      else
51401        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
51402      fi
51403    fi
51404    if test "x${with_cups_include}" != x; then
51405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51406$as_echo_n "checking for cups headers... " >&6; }
51407      if test -s "${with_cups_include}/cups/cups.h"; then
51408        CUPS_CFLAGS="-I${with_cups_include}"
51409        CUPS_FOUND=yes
51410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51411$as_echo "$CUPS_FOUND" >&6; }
51412      else
51413        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
51414      fi
51415    fi
51416    if test "x$CUPS_FOUND" = xno; then
51417      # Are the cups headers installed in the default /usr/include location?
51418      for ac_header in cups/cups.h cups/ppd.h
51419do :
51420  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51421ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51422if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51423  cat >>confdefs.h <<_ACEOF
51424#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51425_ACEOF
51426
51427          CUPS_FOUND=yes
51428          CUPS_CFLAGS=
51429          DEFAULT_CUPS=yes
51430
51431fi
51432
51433done
51434
51435    fi
51436    if test "x$CUPS_FOUND" = xno; then
51437      # Getting nervous now? Lets poke around for standard Solaris third-party
51438      # package installation locations.
51439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51440$as_echo_n "checking for cups headers... " >&6; }
51441      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51442        # An SFW package seems to be installed!
51443        CUPS_FOUND=yes
51444        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51445      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51446        # A CSW package seems to be installed!
51447        CUPS_FOUND=yes
51448        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51449      fi
51450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51451$as_echo "$CUPS_FOUND" >&6; }
51452    fi
51453    if test "x$CUPS_FOUND" = xno; then
51454
51455  # Print a helpful message on how to acquire the necessary build dependency.
51456  # cups is the help tag: freetype, cups, alsa etc
51457  MISSING_DEPENDENCY=cups
51458
51459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51460    cygwin_help $MISSING_DEPENDENCY
51461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51462    msys_help $MISSING_DEPENDENCY
51463  else
51464    PKGHANDLER_COMMAND=
51465
51466    case $PKGHANDLER in
51467      apt-get)
51468        apt_help     $MISSING_DEPENDENCY ;;
51469      yum)
51470        yum_help     $MISSING_DEPENDENCY ;;
51471      port)
51472        port_help    $MISSING_DEPENDENCY ;;
51473      pkgutil)
51474        pkgutil_help $MISSING_DEPENDENCY ;;
51475      pkgadd)
51476        pkgadd_help  $MISSING_DEPENDENCY ;;
51477    esac
51478
51479    if test "x$PKGHANDLER_COMMAND" != x; then
51480      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51481    fi
51482  fi
51483
51484      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51485    fi
51486  fi
51487
51488
51489
51490
51491
51492# Check whether --with-freetype was given.
51493if test "${with_freetype+set}" = set; then :
51494  withval=$with_freetype;
51495fi
51496
51497
51498# Check whether --with-freetype-include was given.
51499if test "${with_freetype_include+set}" = set; then :
51500  withval=$with_freetype_include;
51501fi
51502
51503
51504# Check whether --with-freetype-lib was given.
51505if test "${with_freetype_lib+set}" = set; then :
51506  withval=$with_freetype_lib;
51507fi
51508
51509
51510# Check whether --with-freetype-src was given.
51511if test "${with_freetype_src+set}" = set; then :
51512  withval=$with_freetype_src;
51513fi
51514
51515  # Check whether --enable-freetype-bundling was given.
51516if test "${enable_freetype_bundling+set}" = set; then :
51517  enableval=$enable_freetype_bundling;
51518fi
51519
51520
51521  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51522  FREETYPE_BASE_NAME=freetype
51523  FREETYPE_CFLAGS=
51524  FREETYPE_LIBS=
51525  FREETYPE_BUNDLE_LIB_PATH=
51526
51527  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51528    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51529        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51530        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51531        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51532      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51533$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51534    fi
51535    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51536      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51537$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51538    fi
51539  else
51540    # freetype is needed to build; go get it!
51541
51542    BUNDLE_FREETYPE="$enable_freetype_bundling"
51543
51544    if  test "x$with_freetype_src" != x; then
51545      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51546        # Try to build freetype if --with-freetype-src was given on Windows
51547
51548  FREETYPE_SRC_PATH="$with_freetype_src"
51549  BUILD_FREETYPE=yes
51550
51551  # Check if the freetype sources are acessible..
51552  if ! test -d $FREETYPE_SRC_PATH; then
51553    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
51554$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51555    BUILD_FREETYPE=no
51556  fi
51557  # ..and contain a vc2010 project file
51558  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51559  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51560    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
51561$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51562    BUILD_FREETYPE=no
51563  fi
51564  # Now check if configure found a version of 'msbuild.exe'
51565  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51566    { $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
51567$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;}
51568    BUILD_FREETYPE=no
51569  fi
51570
51571  # Ready to go..
51572  if test "x$BUILD_FREETYPE" = xyes; then
51573    # msbuild requires trailing slashes for output directories
51574    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51575    freetype_lib_path_unix="$freetype_lib_path"
51576    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51577
51578  unix_path="$vcxproj_path"
51579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51580    windows_path=`$CYGPATH -m "$unix_path"`
51581    vcxproj_path="$windows_path"
51582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51583    windows_path=`cmd //c echo $unix_path`
51584    vcxproj_path="$windows_path"
51585  fi
51586
51587
51588  unix_path="$freetype_lib_path"
51589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51590    windows_path=`$CYGPATH -m "$unix_path"`
51591    freetype_lib_path="$windows_path"
51592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51593    windows_path=`cmd //c echo $unix_path`
51594    freetype_lib_path="$windows_path"
51595  fi
51596
51597
51598  unix_path="$freetype_obj_path"
51599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51600    windows_path=`$CYGPATH -m "$unix_path"`
51601    freetype_obj_path="$windows_path"
51602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51603    windows_path=`cmd //c echo $unix_path`
51604    freetype_obj_path="$windows_path"
51605  fi
51606
51607    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51608      freetype_platform=x64
51609    else
51610      freetype_platform=win32
51611    fi
51612
51613    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51614    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51615    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51616    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51617    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51618$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51619
51620    # First we try to build the freetype.dll
51621    $ECHO -e "@echo off\n"\
51622        "$MSBUILD $vcxproj_path "\
51623        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51624        "/p:Configuration=\"Release Multithreaded\" "\
51625        "/p:Platform=$freetype_platform "\
51626        "/p:ConfigurationType=DynamicLibrary "\
51627        "/p:TargetName=freetype "\
51628        "/p:OutDir=\"$freetype_lib_path\" "\
51629        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51630    cmd /c freetype.bat
51631
51632    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51633      # If that succeeds we also build freetype.lib
51634      $ECHO -e "@echo off\n"\
51635          "$MSBUILD $vcxproj_path "\
51636          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51637          "/p:Configuration=\"Release Multithreaded\" "\
51638          "/p:Platform=$freetype_platform "\
51639          "/p:ConfigurationType=StaticLibrary "\
51640          "/p:TargetName=freetype "\
51641          "/p:OutDir=\"$freetype_lib_path\" "\
51642          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51643      cmd /c freetype.bat
51644
51645      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51646        # Once we build both, lib and dll, set freetype lib and include path appropriately
51647        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51648        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51649        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51650$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51651      else
51652        BUILD_FREETYPE=no
51653      fi
51654    else
51655      BUILD_FREETYPE=no
51656    fi
51657  fi
51658
51659        if test "x$BUILD_FREETYPE" = xyes; then
51660          # Okay, we built it. Check that it works.
51661
51662  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51663  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51664  METHOD="--with-freetype-src"
51665
51666  # Let's start with an optimistic view of the world :-)
51667  FOUND_FREETYPE=yes
51668
51669  # First look for the canonical freetype main include file ft2build.h.
51670  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51671    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51672    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51673    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51674      # Fail.
51675      FOUND_FREETYPE=no
51676    fi
51677  fi
51678
51679  if test "x$FOUND_FREETYPE" = xyes; then
51680    # Include file found, let's continue the sanity check.
51681    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51682$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51683
51684    # Reset to default value
51685    FREETYPE_BASE_NAME=freetype
51686    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51687    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51688      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51689          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51690        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51691        # for the .6 version explicitly.
51692        FREETYPE_BASE_NAME=freetype.6
51693        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51694        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51695$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51696      else
51697        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51698$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51699        FOUND_FREETYPE=no
51700      fi
51701    else
51702      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51703        # On Windows, we will need both .lib and .dll file.
51704        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51705          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51706$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51707          FOUND_FREETYPE=no
51708        fi
51709      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51710          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51711        # Found lib in isa dir, use that instead.
51712        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51713        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51714$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51715      fi
51716    fi
51717  fi
51718
51719  if test "x$FOUND_FREETYPE" = xyes; then
51720
51721  # Only process if variable expands to non-empty
51722
51723  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51725
51726  # Input might be given as Windows format, start by converting to
51727  # unix format.
51728  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51729  new_path=`$CYGPATH -u "$path"`
51730
51731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51734  # "foo.exe" is OK but "foo" is an error.
51735  #
51736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51737  # It is also a way to make sure we got the proper file name for the real test later on.
51738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51739  if test "x$test_shortpath" = x; then
51740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51742    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51743  fi
51744
51745  # Call helper function which possibly converts this using DOS-style short mode.
51746  # If so, the updated path is stored in $new_path.
51747
51748  input_path="$new_path"
51749  # Check if we need to convert this using DOS-style short mode. If the path
51750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51751  # take no chances and rewrite it.
51752  # Note: m4 eats our [], so we need to use [ and ] instead.
51753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51754  if test "x$has_forbidden_chars" != x; then
51755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51759      # Going to short mode and back again did indeed matter. Since short mode is
51760      # case insensitive, let's make it lowercase to improve readability.
51761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51762      # Now convert it back to Unix-style (cygpath)
51763      input_path=`$CYGPATH -u "$shortmode_path"`
51764      new_path="$input_path"
51765    fi
51766  fi
51767
51768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51769  if test "x$test_cygdrive_prefix" = x; then
51770    # As a simple fix, exclude /usr/bin since it's not a real path.
51771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51773      # a path prefixed by /cygdrive for fixpath to work.
51774      new_path="$CYGWIN_ROOT_PATH$input_path"
51775    fi
51776  fi
51777
51778
51779  if test "x$path" != "x$new_path"; then
51780    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51783  fi
51784
51785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51786
51787  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51788  has_colon=`$ECHO $path | $GREP ^.:`
51789  new_path="$path"
51790  if test "x$has_colon" = x; then
51791    # Not in mixed or Windows style, start by that.
51792    new_path=`cmd //c echo $path`
51793  fi
51794
51795
51796  input_path="$new_path"
51797  # Check if we need to convert this using DOS-style short mode. If the path
51798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51799  # take no chances and rewrite it.
51800  # Note: m4 eats our [], so we need to use [ and ] instead.
51801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51802  if test "x$has_forbidden_chars" != x; then
51803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51805  fi
51806
51807
51808  windows_path="$new_path"
51809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51810    unix_path=`$CYGPATH -u "$windows_path"`
51811    new_path="$unix_path"
51812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51814    new_path="$unix_path"
51815  fi
51816
51817  if test "x$path" != "x$new_path"; then
51818    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51820$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51821  fi
51822
51823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51825
51826    else
51827      # We're on a unix platform. Hooray! :)
51828      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51829      has_space=`$ECHO "$path" | $GREP " "`
51830      if test "x$has_space" != x; then
51831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51832$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51833        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51834      fi
51835
51836      # Use eval to expand a potential ~
51837      eval path="$path"
51838      if test ! -f "$path" && test ! -d "$path"; then
51839        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51840      fi
51841
51842      if test -d "$path"; then
51843        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51844      else
51845        dir="`$DIRNAME "$path"`"
51846        base="`$BASENAME "$path"`"
51847        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
51848      fi
51849    fi
51850  fi
51851
51852
51853  # Only process if variable expands to non-empty
51854
51855  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51857
51858  # Input might be given as Windows format, start by converting to
51859  # unix format.
51860  path="$POTENTIAL_FREETYPE_LIB_PATH"
51861  new_path=`$CYGPATH -u "$path"`
51862
51863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51866  # "foo.exe" is OK but "foo" is an error.
51867  #
51868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51869  # It is also a way to make sure we got the proper file name for the real test later on.
51870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51871  if test "x$test_shortpath" = x; then
51872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51874    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51875  fi
51876
51877  # Call helper function which possibly converts this using DOS-style short mode.
51878  # If so, the updated path is stored in $new_path.
51879
51880  input_path="$new_path"
51881  # Check if we need to convert this using DOS-style short mode. If the path
51882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51883  # take no chances and rewrite it.
51884  # Note: m4 eats our [], so we need to use [ and ] instead.
51885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51886  if test "x$has_forbidden_chars" != x; then
51887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51891      # Going to short mode and back again did indeed matter. Since short mode is
51892      # case insensitive, let's make it lowercase to improve readability.
51893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51894      # Now convert it back to Unix-style (cygpath)
51895      input_path=`$CYGPATH -u "$shortmode_path"`
51896      new_path="$input_path"
51897    fi
51898  fi
51899
51900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51901  if test "x$test_cygdrive_prefix" = x; then
51902    # As a simple fix, exclude /usr/bin since it's not a real path.
51903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51905      # a path prefixed by /cygdrive for fixpath to work.
51906      new_path="$CYGWIN_ROOT_PATH$input_path"
51907    fi
51908  fi
51909
51910
51911  if test "x$path" != "x$new_path"; then
51912    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51915  fi
51916
51917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51918
51919  path="$POTENTIAL_FREETYPE_LIB_PATH"
51920  has_colon=`$ECHO $path | $GREP ^.:`
51921  new_path="$path"
51922  if test "x$has_colon" = x; then
51923    # Not in mixed or Windows style, start by that.
51924    new_path=`cmd //c echo $path`
51925  fi
51926
51927
51928  input_path="$new_path"
51929  # Check if we need to convert this using DOS-style short mode. If the path
51930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51931  # take no chances and rewrite it.
51932  # Note: m4 eats our [], so we need to use [ and ] instead.
51933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51934  if test "x$has_forbidden_chars" != x; then
51935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51937  fi
51938
51939
51940  windows_path="$new_path"
51941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51942    unix_path=`$CYGPATH -u "$windows_path"`
51943    new_path="$unix_path"
51944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51946    new_path="$unix_path"
51947  fi
51948
51949  if test "x$path" != "x$new_path"; then
51950    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51953  fi
51954
51955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51957
51958    else
51959      # We're on a unix platform. Hooray! :)
51960      path="$POTENTIAL_FREETYPE_LIB_PATH"
51961      has_space=`$ECHO "$path" | $GREP " "`
51962      if test "x$has_space" != x; then
51963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51966      fi
51967
51968      # Use eval to expand a potential ~
51969      eval path="$path"
51970      if test ! -f "$path" && test ! -d "$path"; then
51971        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51972      fi
51973
51974      if test -d "$path"; then
51975        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51976      else
51977        dir="`$DIRNAME "$path"`"
51978        base="`$BASENAME "$path"`"
51979        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
51980      fi
51981    fi
51982  fi
51983
51984
51985    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51987$as_echo_n "checking for freetype includes... " >&6; }
51988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51989$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51990    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51992$as_echo_n "checking for freetype libraries... " >&6; }
51993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51994$as_echo "$FREETYPE_LIB_PATH" >&6; }
51995  fi
51996
51997          if test "x$FOUND_FREETYPE" != xyes; then
51998            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
51999          fi
52000        else
52001          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52002$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52003          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52004        fi
52005      else
52006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52007$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52008      fi
52009    fi
52010
52011    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52012      # User has specified settings
52013
52014      if test "x$BUNDLE_FREETYPE" = x; then
52015        # If not specified, default is to bundle freetype
52016        BUNDLE_FREETYPE=yes
52017      fi
52018
52019      if test "x$with_freetype" != x; then
52020        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52021        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52022      fi
52023
52024      # Allow --with-freetype-lib and --with-freetype-include to override
52025      if test "x$with_freetype_include" != x; then
52026        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52027      fi
52028      if test "x$with_freetype_lib" != x; then
52029        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52030      fi
52031
52032      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52033        # Okay, we got it. Check that it works.
52034
52035  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52036  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52037  METHOD="--with-freetype"
52038
52039  # Let's start with an optimistic view of the world :-)
52040  FOUND_FREETYPE=yes
52041
52042  # First look for the canonical freetype main include file ft2build.h.
52043  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52044    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52045    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52046    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52047      # Fail.
52048      FOUND_FREETYPE=no
52049    fi
52050  fi
52051
52052  if test "x$FOUND_FREETYPE" = xyes; then
52053    # Include file found, let's continue the sanity check.
52054    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52055$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52056
52057    # Reset to default value
52058    FREETYPE_BASE_NAME=freetype
52059    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52060    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52061      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52062          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52063        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52064        # for the .6 version explicitly.
52065        FREETYPE_BASE_NAME=freetype.6
52066        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52067        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52068$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52069      else
52070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52071$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52072        FOUND_FREETYPE=no
52073      fi
52074    else
52075      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52076        # On Windows, we will need both .lib and .dll file.
52077        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52078          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52080          FOUND_FREETYPE=no
52081        fi
52082      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52083          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52084        # Found lib in isa dir, use that instead.
52085        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52086        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52087$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52088      fi
52089    fi
52090  fi
52091
52092  if test "x$FOUND_FREETYPE" = xyes; then
52093
52094  # Only process if variable expands to non-empty
52095
52096  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52098
52099  # Input might be given as Windows format, start by converting to
52100  # unix format.
52101  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52102  new_path=`$CYGPATH -u "$path"`
52103
52104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52107  # "foo.exe" is OK but "foo" is an error.
52108  #
52109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52110  # It is also a way to make sure we got the proper file name for the real test later on.
52111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52112  if test "x$test_shortpath" = x; then
52113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52115    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52116  fi
52117
52118  # Call helper function which possibly converts this using DOS-style short mode.
52119  # If so, the updated path is stored in $new_path.
52120
52121  input_path="$new_path"
52122  # Check if we need to convert this using DOS-style short mode. If the path
52123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52124  # take no chances and rewrite it.
52125  # Note: m4 eats our [], so we need to use [ and ] instead.
52126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52127  if test "x$has_forbidden_chars" != x; then
52128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52132      # Going to short mode and back again did indeed matter. Since short mode is
52133      # case insensitive, let's make it lowercase to improve readability.
52134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52135      # Now convert it back to Unix-style (cygpath)
52136      input_path=`$CYGPATH -u "$shortmode_path"`
52137      new_path="$input_path"
52138    fi
52139  fi
52140
52141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52142  if test "x$test_cygdrive_prefix" = x; then
52143    # As a simple fix, exclude /usr/bin since it's not a real path.
52144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52146      # a path prefixed by /cygdrive for fixpath to work.
52147      new_path="$CYGWIN_ROOT_PATH$input_path"
52148    fi
52149  fi
52150
52151
52152  if test "x$path" != "x$new_path"; then
52153    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52156  fi
52157
52158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52159
52160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52161  has_colon=`$ECHO $path | $GREP ^.:`
52162  new_path="$path"
52163  if test "x$has_colon" = x; then
52164    # Not in mixed or Windows style, start by that.
52165    new_path=`cmd //c echo $path`
52166  fi
52167
52168
52169  input_path="$new_path"
52170  # Check if we need to convert this using DOS-style short mode. If the path
52171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52172  # take no chances and rewrite it.
52173  # Note: m4 eats our [], so we need to use [ and ] instead.
52174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52175  if test "x$has_forbidden_chars" != x; then
52176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52178  fi
52179
52180
52181  windows_path="$new_path"
52182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52183    unix_path=`$CYGPATH -u "$windows_path"`
52184    new_path="$unix_path"
52185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52187    new_path="$unix_path"
52188  fi
52189
52190  if test "x$path" != "x$new_path"; then
52191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52194  fi
52195
52196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52198
52199    else
52200      # We're on a unix platform. Hooray! :)
52201      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52202      has_space=`$ECHO "$path" | $GREP " "`
52203      if test "x$has_space" != x; then
52204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52207      fi
52208
52209      # Use eval to expand a potential ~
52210      eval path="$path"
52211      if test ! -f "$path" && test ! -d "$path"; then
52212        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52213      fi
52214
52215      if test -d "$path"; then
52216        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52217      else
52218        dir="`$DIRNAME "$path"`"
52219        base="`$BASENAME "$path"`"
52220        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52221      fi
52222    fi
52223  fi
52224
52225
52226  # Only process if variable expands to non-empty
52227
52228  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52230
52231  # Input might be given as Windows format, start by converting to
52232  # unix format.
52233  path="$POTENTIAL_FREETYPE_LIB_PATH"
52234  new_path=`$CYGPATH -u "$path"`
52235
52236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52239  # "foo.exe" is OK but "foo" is an error.
52240  #
52241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52242  # It is also a way to make sure we got the proper file name for the real test later on.
52243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52244  if test "x$test_shortpath" = x; then
52245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52247    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52248  fi
52249
52250  # Call helper function which possibly converts this using DOS-style short mode.
52251  # If so, the updated path is stored in $new_path.
52252
52253  input_path="$new_path"
52254  # Check if we need to convert this using DOS-style short mode. If the path
52255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52256  # take no chances and rewrite it.
52257  # Note: m4 eats our [], so we need to use [ and ] instead.
52258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52259  if test "x$has_forbidden_chars" != x; then
52260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52264      # Going to short mode and back again did indeed matter. Since short mode is
52265      # case insensitive, let's make it lowercase to improve readability.
52266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52267      # Now convert it back to Unix-style (cygpath)
52268      input_path=`$CYGPATH -u "$shortmode_path"`
52269      new_path="$input_path"
52270    fi
52271  fi
52272
52273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52274  if test "x$test_cygdrive_prefix" = x; then
52275    # As a simple fix, exclude /usr/bin since it's not a real path.
52276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52278      # a path prefixed by /cygdrive for fixpath to work.
52279      new_path="$CYGWIN_ROOT_PATH$input_path"
52280    fi
52281  fi
52282
52283
52284  if test "x$path" != "x$new_path"; then
52285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52288  fi
52289
52290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52291
52292  path="$POTENTIAL_FREETYPE_LIB_PATH"
52293  has_colon=`$ECHO $path | $GREP ^.:`
52294  new_path="$path"
52295  if test "x$has_colon" = x; then
52296    # Not in mixed or Windows style, start by that.
52297    new_path=`cmd //c echo $path`
52298  fi
52299
52300
52301  input_path="$new_path"
52302  # Check if we need to convert this using DOS-style short mode. If the path
52303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52304  # take no chances and rewrite it.
52305  # Note: m4 eats our [], so we need to use [ and ] instead.
52306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52307  if test "x$has_forbidden_chars" != x; then
52308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52310  fi
52311
52312
52313  windows_path="$new_path"
52314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52315    unix_path=`$CYGPATH -u "$windows_path"`
52316    new_path="$unix_path"
52317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52319    new_path="$unix_path"
52320  fi
52321
52322  if test "x$path" != "x$new_path"; then
52323    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52326  fi
52327
52328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52330
52331    else
52332      # We're on a unix platform. Hooray! :)
52333      path="$POTENTIAL_FREETYPE_LIB_PATH"
52334      has_space=`$ECHO "$path" | $GREP " "`
52335      if test "x$has_space" != x; then
52336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52339      fi
52340
52341      # Use eval to expand a potential ~
52342      eval path="$path"
52343      if test ! -f "$path" && test ! -d "$path"; then
52344        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52345      fi
52346
52347      if test -d "$path"; then
52348        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52349      else
52350        dir="`$DIRNAME "$path"`"
52351        base="`$BASENAME "$path"`"
52352        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52353      fi
52354    fi
52355  fi
52356
52357
52358    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52360$as_echo_n "checking for freetype includes... " >&6; }
52361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52362$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52363    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52365$as_echo_n "checking for freetype libraries... " >&6; }
52366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52367$as_echo "$FREETYPE_LIB_PATH" >&6; }
52368  fi
52369
52370        if test "x$FOUND_FREETYPE" != xyes; then
52371          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52372        fi
52373      else
52374        # User specified only one of lib or include. This is an error.
52375        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52376          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52377$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52378          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52379        else
52380          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52381$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52382          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52383        fi
52384      fi
52385    else
52386      # User did not specify settings, but we need freetype. Try to locate it.
52387
52388      if test "x$BUNDLE_FREETYPE" = x; then
52389        # If not specified, default is to bundle freetype only on windows
52390        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52391          BUNDLE_FREETYPE=yes
52392        else
52393          BUNDLE_FREETYPE=no
52394        fi
52395      fi
52396
52397      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52398      if test "x$SYSROOT" = x; then
52399        if test "x$FOUND_FREETYPE" != xyes; then
52400          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52401          if test "x$PKG_CONFIG" != x; then
52402
52403pkg_failed=no
52404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52405$as_echo_n "checking for FREETYPE... " >&6; }
52406
52407if test -n "$FREETYPE_CFLAGS"; then
52408    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52409 elif test -n "$PKG_CONFIG"; then
52410    if test -n "$PKG_CONFIG" && \
52411    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52412  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52413  ac_status=$?
52414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52415  test $ac_status = 0; }; then
52416  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52417else
52418  pkg_failed=yes
52419fi
52420 else
52421    pkg_failed=untried
52422fi
52423if test -n "$FREETYPE_LIBS"; then
52424    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52425 elif test -n "$PKG_CONFIG"; then
52426    if test -n "$PKG_CONFIG" && \
52427    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52428  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52429  ac_status=$?
52430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52431  test $ac_status = 0; }; then
52432  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52433else
52434  pkg_failed=yes
52435fi
52436 else
52437    pkg_failed=untried
52438fi
52439
52440
52441
52442if test $pkg_failed = yes; then
52443
52444if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52445        _pkg_short_errors_supported=yes
52446else
52447        _pkg_short_errors_supported=no
52448fi
52449        if test $_pkg_short_errors_supported = yes; then
52450	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52451        else
52452	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52453        fi
52454	# Put the nasty error message in config.log where it belongs
52455	echo "$FREETYPE_PKG_ERRORS" >&5
52456
52457	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52458$as_echo "no" >&6; }
52459                FOUND_FREETYPE=no
52460elif test $pkg_failed = untried; then
52461	FOUND_FREETYPE=no
52462else
52463	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52464	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52466$as_echo "yes" >&6; }
52467	FOUND_FREETYPE=yes
52468fi
52469            if test "x$FOUND_FREETYPE" = xyes; then
52470              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52471              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52472              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52473              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52474                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52475              fi
52476              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52477              if test "x$BUNDLE_FREETYPE" = xyes; then
52478                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52479$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52480                FOUND_FREETYPE=no
52481              else
52482                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52483$as_echo_n "checking for freetype... " >&6; }
52484                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52485$as_echo "yes (using pkg-config)" >&6; }
52486              fi
52487            fi
52488          fi
52489        fi
52490      fi
52491
52492      if test "x$FOUND_FREETYPE" != xyes; then
52493        # Check in well-known locations
52494        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52495          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52496
52497  windows_path="$FREETYPE_BASE_DIR"
52498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52499    unix_path=`$CYGPATH -u "$windows_path"`
52500    FREETYPE_BASE_DIR="$unix_path"
52501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52503    FREETYPE_BASE_DIR="$unix_path"
52504  fi
52505
52506
52507  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52508  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52509  METHOD="well-known location"
52510
52511  # Let's start with an optimistic view of the world :-)
52512  FOUND_FREETYPE=yes
52513
52514  # First look for the canonical freetype main include file ft2build.h.
52515  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52516    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52517    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52518    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52519      # Fail.
52520      FOUND_FREETYPE=no
52521    fi
52522  fi
52523
52524  if test "x$FOUND_FREETYPE" = xyes; then
52525    # Include file found, let's continue the sanity check.
52526    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52527$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52528
52529    # Reset to default value
52530    FREETYPE_BASE_NAME=freetype
52531    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52532    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52533      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52534          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52535        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52536        # for the .6 version explicitly.
52537        FREETYPE_BASE_NAME=freetype.6
52538        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52539        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52540$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52541      else
52542        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52543$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52544        FOUND_FREETYPE=no
52545      fi
52546    else
52547      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52548        # On Windows, we will need both .lib and .dll file.
52549        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52550          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52551$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52552          FOUND_FREETYPE=no
52553        fi
52554      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52555          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52556        # Found lib in isa dir, use that instead.
52557        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52558        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52559$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52560      fi
52561    fi
52562  fi
52563
52564  if test "x$FOUND_FREETYPE" = xyes; then
52565
52566  # Only process if variable expands to non-empty
52567
52568  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52570
52571  # Input might be given as Windows format, start by converting to
52572  # unix format.
52573  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52574  new_path=`$CYGPATH -u "$path"`
52575
52576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52579  # "foo.exe" is OK but "foo" is an error.
52580  #
52581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52582  # It is also a way to make sure we got the proper file name for the real test later on.
52583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52584  if test "x$test_shortpath" = x; then
52585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52586$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52587    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52588  fi
52589
52590  # Call helper function which possibly converts this using DOS-style short mode.
52591  # If so, the updated path is stored in $new_path.
52592
52593  input_path="$new_path"
52594  # Check if we need to convert this using DOS-style short mode. If the path
52595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52596  # take no chances and rewrite it.
52597  # Note: m4 eats our [], so we need to use [ and ] instead.
52598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52599  if test "x$has_forbidden_chars" != x; then
52600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52604      # Going to short mode and back again did indeed matter. Since short mode is
52605      # case insensitive, let's make it lowercase to improve readability.
52606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52607      # Now convert it back to Unix-style (cygpath)
52608      input_path=`$CYGPATH -u "$shortmode_path"`
52609      new_path="$input_path"
52610    fi
52611  fi
52612
52613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52614  if test "x$test_cygdrive_prefix" = x; then
52615    # As a simple fix, exclude /usr/bin since it's not a real path.
52616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52618      # a path prefixed by /cygdrive for fixpath to work.
52619      new_path="$CYGWIN_ROOT_PATH$input_path"
52620    fi
52621  fi
52622
52623
52624  if test "x$path" != "x$new_path"; then
52625    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52627$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52628  fi
52629
52630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52631
52632  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52633  has_colon=`$ECHO $path | $GREP ^.:`
52634  new_path="$path"
52635  if test "x$has_colon" = x; then
52636    # Not in mixed or Windows style, start by that.
52637    new_path=`cmd //c echo $path`
52638  fi
52639
52640
52641  input_path="$new_path"
52642  # Check if we need to convert this using DOS-style short mode. If the path
52643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52644  # take no chances and rewrite it.
52645  # Note: m4 eats our [], so we need to use [ and ] instead.
52646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52647  if test "x$has_forbidden_chars" != x; then
52648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52650  fi
52651
52652
52653  windows_path="$new_path"
52654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52655    unix_path=`$CYGPATH -u "$windows_path"`
52656    new_path="$unix_path"
52657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52659    new_path="$unix_path"
52660  fi
52661
52662  if test "x$path" != "x$new_path"; then
52663    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52665$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52666  fi
52667
52668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52670
52671    else
52672      # We're on a unix platform. Hooray! :)
52673      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52674      has_space=`$ECHO "$path" | $GREP " "`
52675      if test "x$has_space" != x; then
52676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52679      fi
52680
52681      # Use eval to expand a potential ~
52682      eval path="$path"
52683      if test ! -f "$path" && test ! -d "$path"; then
52684        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52685      fi
52686
52687      if test -d "$path"; then
52688        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52689      else
52690        dir="`$DIRNAME "$path"`"
52691        base="`$BASENAME "$path"`"
52692        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52693      fi
52694    fi
52695  fi
52696
52697
52698  # Only process if variable expands to non-empty
52699
52700  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52702
52703  # Input might be given as Windows format, start by converting to
52704  # unix format.
52705  path="$POTENTIAL_FREETYPE_LIB_PATH"
52706  new_path=`$CYGPATH -u "$path"`
52707
52708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52711  # "foo.exe" is OK but "foo" is an error.
52712  #
52713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52714  # It is also a way to make sure we got the proper file name for the real test later on.
52715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52716  if test "x$test_shortpath" = x; then
52717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52719    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52720  fi
52721
52722  # Call helper function which possibly converts this using DOS-style short mode.
52723  # If so, the updated path is stored in $new_path.
52724
52725  input_path="$new_path"
52726  # Check if we need to convert this using DOS-style short mode. If the path
52727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52728  # take no chances and rewrite it.
52729  # Note: m4 eats our [], so we need to use [ and ] instead.
52730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52731  if test "x$has_forbidden_chars" != x; then
52732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52736      # Going to short mode and back again did indeed matter. Since short mode is
52737      # case insensitive, let's make it lowercase to improve readability.
52738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52739      # Now convert it back to Unix-style (cygpath)
52740      input_path=`$CYGPATH -u "$shortmode_path"`
52741      new_path="$input_path"
52742    fi
52743  fi
52744
52745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52746  if test "x$test_cygdrive_prefix" = x; then
52747    # As a simple fix, exclude /usr/bin since it's not a real path.
52748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52750      # a path prefixed by /cygdrive for fixpath to work.
52751      new_path="$CYGWIN_ROOT_PATH$input_path"
52752    fi
52753  fi
52754
52755
52756  if test "x$path" != "x$new_path"; then
52757    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52759$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52760  fi
52761
52762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52763
52764  path="$POTENTIAL_FREETYPE_LIB_PATH"
52765  has_colon=`$ECHO $path | $GREP ^.:`
52766  new_path="$path"
52767  if test "x$has_colon" = x; then
52768    # Not in mixed or Windows style, start by that.
52769    new_path=`cmd //c echo $path`
52770  fi
52771
52772
52773  input_path="$new_path"
52774  # Check if we need to convert this using DOS-style short mode. If the path
52775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52776  # take no chances and rewrite it.
52777  # Note: m4 eats our [], so we need to use [ and ] instead.
52778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52779  if test "x$has_forbidden_chars" != x; then
52780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52782  fi
52783
52784
52785  windows_path="$new_path"
52786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52787    unix_path=`$CYGPATH -u "$windows_path"`
52788    new_path="$unix_path"
52789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52791    new_path="$unix_path"
52792  fi
52793
52794  if test "x$path" != "x$new_path"; then
52795    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52797$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52798  fi
52799
52800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52802
52803    else
52804      # We're on a unix platform. Hooray! :)
52805      path="$POTENTIAL_FREETYPE_LIB_PATH"
52806      has_space=`$ECHO "$path" | $GREP " "`
52807      if test "x$has_space" != x; then
52808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52810        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52811      fi
52812
52813      # Use eval to expand a potential ~
52814      eval path="$path"
52815      if test ! -f "$path" && test ! -d "$path"; then
52816        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52817      fi
52818
52819      if test -d "$path"; then
52820        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52821      else
52822        dir="`$DIRNAME "$path"`"
52823        base="`$BASENAME "$path"`"
52824        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52825      fi
52826    fi
52827  fi
52828
52829
52830    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52831    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52832$as_echo_n "checking for freetype includes... " >&6; }
52833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52834$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52835    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52837$as_echo_n "checking for freetype libraries... " >&6; }
52838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52839$as_echo "$FREETYPE_LIB_PATH" >&6; }
52840  fi
52841
52842          if test "x$FOUND_FREETYPE" != xyes; then
52843            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52844
52845  windows_path="$FREETYPE_BASE_DIR"
52846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52847    unix_path=`$CYGPATH -u "$windows_path"`
52848    FREETYPE_BASE_DIR="$unix_path"
52849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52851    FREETYPE_BASE_DIR="$unix_path"
52852  fi
52853
52854
52855  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52856  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52857  METHOD="well-known location"
52858
52859  # Let's start with an optimistic view of the world :-)
52860  FOUND_FREETYPE=yes
52861
52862  # First look for the canonical freetype main include file ft2build.h.
52863  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52864    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52865    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52866    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52867      # Fail.
52868      FOUND_FREETYPE=no
52869    fi
52870  fi
52871
52872  if test "x$FOUND_FREETYPE" = xyes; then
52873    # Include file found, let's continue the sanity check.
52874    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52875$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52876
52877    # Reset to default value
52878    FREETYPE_BASE_NAME=freetype
52879    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52880    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52881      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52882          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52883        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52884        # for the .6 version explicitly.
52885        FREETYPE_BASE_NAME=freetype.6
52886        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52887        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52888$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52889      else
52890        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52891$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52892        FOUND_FREETYPE=no
52893      fi
52894    else
52895      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52896        # On Windows, we will need both .lib and .dll file.
52897        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52898          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52899$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52900          FOUND_FREETYPE=no
52901        fi
52902      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52903          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52904        # Found lib in isa dir, use that instead.
52905        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52906        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52907$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52908      fi
52909    fi
52910  fi
52911
52912  if test "x$FOUND_FREETYPE" = xyes; then
52913
52914  # Only process if variable expands to non-empty
52915
52916  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52918
52919  # Input might be given as Windows format, start by converting to
52920  # unix format.
52921  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52922  new_path=`$CYGPATH -u "$path"`
52923
52924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52927  # "foo.exe" is OK but "foo" is an error.
52928  #
52929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52930  # It is also a way to make sure we got the proper file name for the real test later on.
52931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52932  if test "x$test_shortpath" = x; then
52933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52935    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52936  fi
52937
52938  # Call helper function which possibly converts this using DOS-style short mode.
52939  # If so, the updated path is stored in $new_path.
52940
52941  input_path="$new_path"
52942  # Check if we need to convert this using DOS-style short mode. If the path
52943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52944  # take no chances and rewrite it.
52945  # Note: m4 eats our [], so we need to use [ and ] instead.
52946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52947  if test "x$has_forbidden_chars" != x; then
52948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52952      # Going to short mode and back again did indeed matter. Since short mode is
52953      # case insensitive, let's make it lowercase to improve readability.
52954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52955      # Now convert it back to Unix-style (cygpath)
52956      input_path=`$CYGPATH -u "$shortmode_path"`
52957      new_path="$input_path"
52958    fi
52959  fi
52960
52961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52962  if test "x$test_cygdrive_prefix" = x; then
52963    # As a simple fix, exclude /usr/bin since it's not a real path.
52964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52966      # a path prefixed by /cygdrive for fixpath to work.
52967      new_path="$CYGWIN_ROOT_PATH$input_path"
52968    fi
52969  fi
52970
52971
52972  if test "x$path" != "x$new_path"; then
52973    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52976  fi
52977
52978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52979
52980  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52981  has_colon=`$ECHO $path | $GREP ^.:`
52982  new_path="$path"
52983  if test "x$has_colon" = x; then
52984    # Not in mixed or Windows style, start by that.
52985    new_path=`cmd //c echo $path`
52986  fi
52987
52988
52989  input_path="$new_path"
52990  # Check if we need to convert this using DOS-style short mode. If the path
52991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52992  # take no chances and rewrite it.
52993  # Note: m4 eats our [], so we need to use [ and ] instead.
52994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52995  if test "x$has_forbidden_chars" != x; then
52996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52998  fi
52999
53000
53001  windows_path="$new_path"
53002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53003    unix_path=`$CYGPATH -u "$windows_path"`
53004    new_path="$unix_path"
53005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53007    new_path="$unix_path"
53008  fi
53009
53010  if test "x$path" != "x$new_path"; then
53011    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53014  fi
53015
53016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53018
53019    else
53020      # We're on a unix platform. Hooray! :)
53021      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53022      has_space=`$ECHO "$path" | $GREP " "`
53023      if test "x$has_space" != x; then
53024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53026        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53027      fi
53028
53029      # Use eval to expand a potential ~
53030      eval path="$path"
53031      if test ! -f "$path" && test ! -d "$path"; then
53032        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53033      fi
53034
53035      if test -d "$path"; then
53036        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53037      else
53038        dir="`$DIRNAME "$path"`"
53039        base="`$BASENAME "$path"`"
53040        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53041      fi
53042    fi
53043  fi
53044
53045
53046  # Only process if variable expands to non-empty
53047
53048  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53050
53051  # Input might be given as Windows format, start by converting to
53052  # unix format.
53053  path="$POTENTIAL_FREETYPE_LIB_PATH"
53054  new_path=`$CYGPATH -u "$path"`
53055
53056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53059  # "foo.exe" is OK but "foo" is an error.
53060  #
53061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53062  # It is also a way to make sure we got the proper file name for the real test later on.
53063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53064  if test "x$test_shortpath" = x; then
53065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53066$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53067    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53068  fi
53069
53070  # Call helper function which possibly converts this using DOS-style short mode.
53071  # If so, the updated path is stored in $new_path.
53072
53073  input_path="$new_path"
53074  # Check if we need to convert this using DOS-style short mode. If the path
53075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53076  # take no chances and rewrite it.
53077  # Note: m4 eats our [], so we need to use [ and ] instead.
53078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53079  if test "x$has_forbidden_chars" != x; then
53080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53084      # Going to short mode and back again did indeed matter. Since short mode is
53085      # case insensitive, let's make it lowercase to improve readability.
53086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53087      # Now convert it back to Unix-style (cygpath)
53088      input_path=`$CYGPATH -u "$shortmode_path"`
53089      new_path="$input_path"
53090    fi
53091  fi
53092
53093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53094  if test "x$test_cygdrive_prefix" = x; then
53095    # As a simple fix, exclude /usr/bin since it's not a real path.
53096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53098      # a path prefixed by /cygdrive for fixpath to work.
53099      new_path="$CYGWIN_ROOT_PATH$input_path"
53100    fi
53101  fi
53102
53103
53104  if test "x$path" != "x$new_path"; then
53105    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53108  fi
53109
53110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53111
53112  path="$POTENTIAL_FREETYPE_LIB_PATH"
53113  has_colon=`$ECHO $path | $GREP ^.:`
53114  new_path="$path"
53115  if test "x$has_colon" = x; then
53116    # Not in mixed or Windows style, start by that.
53117    new_path=`cmd //c echo $path`
53118  fi
53119
53120
53121  input_path="$new_path"
53122  # Check if we need to convert this using DOS-style short mode. If the path
53123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53124  # take no chances and rewrite it.
53125  # Note: m4 eats our [], so we need to use [ and ] instead.
53126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53127  if test "x$has_forbidden_chars" != x; then
53128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53130  fi
53131
53132
53133  windows_path="$new_path"
53134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53135    unix_path=`$CYGPATH -u "$windows_path"`
53136    new_path="$unix_path"
53137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53139    new_path="$unix_path"
53140  fi
53141
53142  if test "x$path" != "x$new_path"; then
53143    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53146  fi
53147
53148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53150
53151    else
53152      # We're on a unix platform. Hooray! :)
53153      path="$POTENTIAL_FREETYPE_LIB_PATH"
53154      has_space=`$ECHO "$path" | $GREP " "`
53155      if test "x$has_space" != x; then
53156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53159      fi
53160
53161      # Use eval to expand a potential ~
53162      eval path="$path"
53163      if test ! -f "$path" && test ! -d "$path"; then
53164        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53165      fi
53166
53167      if test -d "$path"; then
53168        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53169      else
53170        dir="`$DIRNAME "$path"`"
53171        base="`$BASENAME "$path"`"
53172        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53173      fi
53174    fi
53175  fi
53176
53177
53178    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53180$as_echo_n "checking for freetype includes... " >&6; }
53181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53182$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53183    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53185$as_echo_n "checking for freetype libraries... " >&6; }
53186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53187$as_echo "$FREETYPE_LIB_PATH" >&6; }
53188  fi
53189
53190          fi
53191          if test "x$FOUND_FREETYPE" != xyes; then
53192            FREETYPE_BASE_DIR="$HOME/freetype"
53193
53194  windows_path="$FREETYPE_BASE_DIR"
53195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53196    unix_path=`$CYGPATH -u "$windows_path"`
53197    FREETYPE_BASE_DIR="$unix_path"
53198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53200    FREETYPE_BASE_DIR="$unix_path"
53201  fi
53202
53203            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53204
53205  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53206  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53207  METHOD="well-known location"
53208
53209  # Let's start with an optimistic view of the world :-)
53210  FOUND_FREETYPE=yes
53211
53212  # First look for the canonical freetype main include file ft2build.h.
53213  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53214    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53215    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53216    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53217      # Fail.
53218      FOUND_FREETYPE=no
53219    fi
53220  fi
53221
53222  if test "x$FOUND_FREETYPE" = xyes; then
53223    # Include file found, let's continue the sanity check.
53224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53225$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53226
53227    # Reset to default value
53228    FREETYPE_BASE_NAME=freetype
53229    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53230    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53231      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53232          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53233        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53234        # for the .6 version explicitly.
53235        FREETYPE_BASE_NAME=freetype.6
53236        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53237        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53238$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53239      else
53240        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53241$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53242        FOUND_FREETYPE=no
53243      fi
53244    else
53245      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53246        # On Windows, we will need both .lib and .dll file.
53247        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53248          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53249$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53250          FOUND_FREETYPE=no
53251        fi
53252      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53253          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53254        # Found lib in isa dir, use that instead.
53255        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53256        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53257$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53258      fi
53259    fi
53260  fi
53261
53262  if test "x$FOUND_FREETYPE" = xyes; then
53263
53264  # Only process if variable expands to non-empty
53265
53266  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53268
53269  # Input might be given as Windows format, start by converting to
53270  # unix format.
53271  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53272  new_path=`$CYGPATH -u "$path"`
53273
53274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53277  # "foo.exe" is OK but "foo" is an error.
53278  #
53279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53280  # It is also a way to make sure we got the proper file name for the real test later on.
53281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53282  if test "x$test_shortpath" = x; then
53283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53285    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53286  fi
53287
53288  # Call helper function which possibly converts this using DOS-style short mode.
53289  # If so, the updated path is stored in $new_path.
53290
53291  input_path="$new_path"
53292  # Check if we need to convert this using DOS-style short mode. If the path
53293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53294  # take no chances and rewrite it.
53295  # Note: m4 eats our [], so we need to use [ and ] instead.
53296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53297  if test "x$has_forbidden_chars" != x; then
53298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53302      # Going to short mode and back again did indeed matter. Since short mode is
53303      # case insensitive, let's make it lowercase to improve readability.
53304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53305      # Now convert it back to Unix-style (cygpath)
53306      input_path=`$CYGPATH -u "$shortmode_path"`
53307      new_path="$input_path"
53308    fi
53309  fi
53310
53311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53312  if test "x$test_cygdrive_prefix" = x; then
53313    # As a simple fix, exclude /usr/bin since it's not a real path.
53314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53316      # a path prefixed by /cygdrive for fixpath to work.
53317      new_path="$CYGWIN_ROOT_PATH$input_path"
53318    fi
53319  fi
53320
53321
53322  if test "x$path" != "x$new_path"; then
53323    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53326  fi
53327
53328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53329
53330  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53331  has_colon=`$ECHO $path | $GREP ^.:`
53332  new_path="$path"
53333  if test "x$has_colon" = x; then
53334    # Not in mixed or Windows style, start by that.
53335    new_path=`cmd //c echo $path`
53336  fi
53337
53338
53339  input_path="$new_path"
53340  # Check if we need to convert this using DOS-style short mode. If the path
53341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53342  # take no chances and rewrite it.
53343  # Note: m4 eats our [], so we need to use [ and ] instead.
53344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53345  if test "x$has_forbidden_chars" != x; then
53346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53348  fi
53349
53350
53351  windows_path="$new_path"
53352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53353    unix_path=`$CYGPATH -u "$windows_path"`
53354    new_path="$unix_path"
53355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53357    new_path="$unix_path"
53358  fi
53359
53360  if test "x$path" != "x$new_path"; then
53361    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53363$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53364  fi
53365
53366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53368
53369    else
53370      # We're on a unix platform. Hooray! :)
53371      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53372      has_space=`$ECHO "$path" | $GREP " "`
53373      if test "x$has_space" != x; then
53374        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53376        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53377      fi
53378
53379      # Use eval to expand a potential ~
53380      eval path="$path"
53381      if test ! -f "$path" && test ! -d "$path"; then
53382        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53383      fi
53384
53385      if test -d "$path"; then
53386        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53387      else
53388        dir="`$DIRNAME "$path"`"
53389        base="`$BASENAME "$path"`"
53390        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53391      fi
53392    fi
53393  fi
53394
53395
53396  # Only process if variable expands to non-empty
53397
53398  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53400
53401  # Input might be given as Windows format, start by converting to
53402  # unix format.
53403  path="$POTENTIAL_FREETYPE_LIB_PATH"
53404  new_path=`$CYGPATH -u "$path"`
53405
53406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53409  # "foo.exe" is OK but "foo" is an error.
53410  #
53411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53412  # It is also a way to make sure we got the proper file name for the real test later on.
53413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53414  if test "x$test_shortpath" = x; then
53415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53417    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53418  fi
53419
53420  # Call helper function which possibly converts this using DOS-style short mode.
53421  # If so, the updated path is stored in $new_path.
53422
53423  input_path="$new_path"
53424  # Check if we need to convert this using DOS-style short mode. If the path
53425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53426  # take no chances and rewrite it.
53427  # Note: m4 eats our [], so we need to use [ and ] instead.
53428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53429  if test "x$has_forbidden_chars" != x; then
53430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53434      # Going to short mode and back again did indeed matter. Since short mode is
53435      # case insensitive, let's make it lowercase to improve readability.
53436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53437      # Now convert it back to Unix-style (cygpath)
53438      input_path=`$CYGPATH -u "$shortmode_path"`
53439      new_path="$input_path"
53440    fi
53441  fi
53442
53443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53444  if test "x$test_cygdrive_prefix" = x; then
53445    # As a simple fix, exclude /usr/bin since it's not a real path.
53446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53448      # a path prefixed by /cygdrive for fixpath to work.
53449      new_path="$CYGWIN_ROOT_PATH$input_path"
53450    fi
53451  fi
53452
53453
53454  if test "x$path" != "x$new_path"; then
53455    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53457$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53458  fi
53459
53460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53461
53462  path="$POTENTIAL_FREETYPE_LIB_PATH"
53463  has_colon=`$ECHO $path | $GREP ^.:`
53464  new_path="$path"
53465  if test "x$has_colon" = x; then
53466    # Not in mixed or Windows style, start by that.
53467    new_path=`cmd //c echo $path`
53468  fi
53469
53470
53471  input_path="$new_path"
53472  # Check if we need to convert this using DOS-style short mode. If the path
53473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53474  # take no chances and rewrite it.
53475  # Note: m4 eats our [], so we need to use [ and ] instead.
53476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53477  if test "x$has_forbidden_chars" != x; then
53478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53480  fi
53481
53482
53483  windows_path="$new_path"
53484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53485    unix_path=`$CYGPATH -u "$windows_path"`
53486    new_path="$unix_path"
53487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53489    new_path="$unix_path"
53490  fi
53491
53492  if test "x$path" != "x$new_path"; then
53493    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53495$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53496  fi
53497
53498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53500
53501    else
53502      # We're on a unix platform. Hooray! :)
53503      path="$POTENTIAL_FREETYPE_LIB_PATH"
53504      has_space=`$ECHO "$path" | $GREP " "`
53505      if test "x$has_space" != x; then
53506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53507$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53509      fi
53510
53511      # Use eval to expand a potential ~
53512      eval path="$path"
53513      if test ! -f "$path" && test ! -d "$path"; then
53514        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53515      fi
53516
53517      if test -d "$path"; then
53518        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53519      else
53520        dir="`$DIRNAME "$path"`"
53521        base="`$BASENAME "$path"`"
53522        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53523      fi
53524    fi
53525  fi
53526
53527
53528    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53530$as_echo_n "checking for freetype includes... " >&6; }
53531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53532$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53533    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53535$as_echo_n "checking for freetype libraries... " >&6; }
53536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53537$as_echo "$FREETYPE_LIB_PATH" >&6; }
53538  fi
53539
53540            else
53541
53542  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53543  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53544  METHOD="well-known location"
53545
53546  # Let's start with an optimistic view of the world :-)
53547  FOUND_FREETYPE=yes
53548
53549  # First look for the canonical freetype main include file ft2build.h.
53550  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53551    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53552    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53553    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53554      # Fail.
53555      FOUND_FREETYPE=no
53556    fi
53557  fi
53558
53559  if test "x$FOUND_FREETYPE" = xyes; then
53560    # Include file found, let's continue the sanity check.
53561    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53562$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53563
53564    # Reset to default value
53565    FREETYPE_BASE_NAME=freetype
53566    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53567    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53568      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53569          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53570        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53571        # for the .6 version explicitly.
53572        FREETYPE_BASE_NAME=freetype.6
53573        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53574        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53575$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53576      else
53577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53578$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53579        FOUND_FREETYPE=no
53580      fi
53581    else
53582      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53583        # On Windows, we will need both .lib and .dll file.
53584        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53585          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53586$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53587          FOUND_FREETYPE=no
53588        fi
53589      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53590          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53591        # Found lib in isa dir, use that instead.
53592        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53593        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53594$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53595      fi
53596    fi
53597  fi
53598
53599  if test "x$FOUND_FREETYPE" = xyes; then
53600
53601  # Only process if variable expands to non-empty
53602
53603  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53605
53606  # Input might be given as Windows format, start by converting to
53607  # unix format.
53608  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53609  new_path=`$CYGPATH -u "$path"`
53610
53611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53614  # "foo.exe" is OK but "foo" is an error.
53615  #
53616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53617  # It is also a way to make sure we got the proper file name for the real test later on.
53618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53619  if test "x$test_shortpath" = x; then
53620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53621$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53622    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53623  fi
53624
53625  # Call helper function which possibly converts this using DOS-style short mode.
53626  # If so, the updated path is stored in $new_path.
53627
53628  input_path="$new_path"
53629  # Check if we need to convert this using DOS-style short mode. If the path
53630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53631  # take no chances and rewrite it.
53632  # Note: m4 eats our [], so we need to use [ and ] instead.
53633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53634  if test "x$has_forbidden_chars" != x; then
53635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53639      # Going to short mode and back again did indeed matter. Since short mode is
53640      # case insensitive, let's make it lowercase to improve readability.
53641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53642      # Now convert it back to Unix-style (cygpath)
53643      input_path=`$CYGPATH -u "$shortmode_path"`
53644      new_path="$input_path"
53645    fi
53646  fi
53647
53648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53649  if test "x$test_cygdrive_prefix" = x; then
53650    # As a simple fix, exclude /usr/bin since it's not a real path.
53651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53653      # a path prefixed by /cygdrive for fixpath to work.
53654      new_path="$CYGWIN_ROOT_PATH$input_path"
53655    fi
53656  fi
53657
53658
53659  if test "x$path" != "x$new_path"; then
53660    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53663  fi
53664
53665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53666
53667  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53668  has_colon=`$ECHO $path | $GREP ^.:`
53669  new_path="$path"
53670  if test "x$has_colon" = x; then
53671    # Not in mixed or Windows style, start by that.
53672    new_path=`cmd //c echo $path`
53673  fi
53674
53675
53676  input_path="$new_path"
53677  # Check if we need to convert this using DOS-style short mode. If the path
53678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53679  # take no chances and rewrite it.
53680  # Note: m4 eats our [], so we need to use [ and ] instead.
53681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53682  if test "x$has_forbidden_chars" != x; then
53683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53685  fi
53686
53687
53688  windows_path="$new_path"
53689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53690    unix_path=`$CYGPATH -u "$windows_path"`
53691    new_path="$unix_path"
53692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53694    new_path="$unix_path"
53695  fi
53696
53697  if test "x$path" != "x$new_path"; then
53698    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53701  fi
53702
53703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53705
53706    else
53707      # We're on a unix platform. Hooray! :)
53708      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53709      has_space=`$ECHO "$path" | $GREP " "`
53710      if test "x$has_space" != x; then
53711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53712$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53713        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53714      fi
53715
53716      # Use eval to expand a potential ~
53717      eval path="$path"
53718      if test ! -f "$path" && test ! -d "$path"; then
53719        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53720      fi
53721
53722      if test -d "$path"; then
53723        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53724      else
53725        dir="`$DIRNAME "$path"`"
53726        base="`$BASENAME "$path"`"
53727        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53728      fi
53729    fi
53730  fi
53731
53732
53733  # Only process if variable expands to non-empty
53734
53735  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53737
53738  # Input might be given as Windows format, start by converting to
53739  # unix format.
53740  path="$POTENTIAL_FREETYPE_LIB_PATH"
53741  new_path=`$CYGPATH -u "$path"`
53742
53743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53746  # "foo.exe" is OK but "foo" is an error.
53747  #
53748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53749  # It is also a way to make sure we got the proper file name for the real test later on.
53750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53751  if test "x$test_shortpath" = x; then
53752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53753$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53754    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53755  fi
53756
53757  # Call helper function which possibly converts this using DOS-style short mode.
53758  # If so, the updated path is stored in $new_path.
53759
53760  input_path="$new_path"
53761  # Check if we need to convert this using DOS-style short mode. If the path
53762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53763  # take no chances and rewrite it.
53764  # Note: m4 eats our [], so we need to use [ and ] instead.
53765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53766  if test "x$has_forbidden_chars" != x; then
53767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53771      # Going to short mode and back again did indeed matter. Since short mode is
53772      # case insensitive, let's make it lowercase to improve readability.
53773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53774      # Now convert it back to Unix-style (cygpath)
53775      input_path=`$CYGPATH -u "$shortmode_path"`
53776      new_path="$input_path"
53777    fi
53778  fi
53779
53780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53781  if test "x$test_cygdrive_prefix" = x; then
53782    # As a simple fix, exclude /usr/bin since it's not a real path.
53783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53785      # a path prefixed by /cygdrive for fixpath to work.
53786      new_path="$CYGWIN_ROOT_PATH$input_path"
53787    fi
53788  fi
53789
53790
53791  if test "x$path" != "x$new_path"; then
53792    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53795  fi
53796
53797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53798
53799  path="$POTENTIAL_FREETYPE_LIB_PATH"
53800  has_colon=`$ECHO $path | $GREP ^.:`
53801  new_path="$path"
53802  if test "x$has_colon" = x; then
53803    # Not in mixed or Windows style, start by that.
53804    new_path=`cmd //c echo $path`
53805  fi
53806
53807
53808  input_path="$new_path"
53809  # Check if we need to convert this using DOS-style short mode. If the path
53810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53811  # take no chances and rewrite it.
53812  # Note: m4 eats our [], so we need to use [ and ] instead.
53813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53814  if test "x$has_forbidden_chars" != x; then
53815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53817  fi
53818
53819
53820  windows_path="$new_path"
53821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53822    unix_path=`$CYGPATH -u "$windows_path"`
53823    new_path="$unix_path"
53824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53826    new_path="$unix_path"
53827  fi
53828
53829  if test "x$path" != "x$new_path"; then
53830    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53832$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53833  fi
53834
53835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53837
53838    else
53839      # We're on a unix platform. Hooray! :)
53840      path="$POTENTIAL_FREETYPE_LIB_PATH"
53841      has_space=`$ECHO "$path" | $GREP " "`
53842      if test "x$has_space" != x; then
53843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53846      fi
53847
53848      # Use eval to expand a potential ~
53849      eval path="$path"
53850      if test ! -f "$path" && test ! -d "$path"; then
53851        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53852      fi
53853
53854      if test -d "$path"; then
53855        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53856      else
53857        dir="`$DIRNAME "$path"`"
53858        base="`$BASENAME "$path"`"
53859        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53860      fi
53861    fi
53862  fi
53863
53864
53865    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53867$as_echo_n "checking for freetype includes... " >&6; }
53868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53869$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53870    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53872$as_echo_n "checking for freetype libraries... " >&6; }
53873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53874$as_echo "$FREETYPE_LIB_PATH" >&6; }
53875  fi
53876
53877            fi
53878            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
53879                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
53880              # Source is available, as a last resort try to build freetype in default location
53881
53882  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
53883  BUILD_FREETYPE=yes
53884
53885  # Check if the freetype sources are acessible..
53886  if ! test -d $FREETYPE_SRC_PATH; then
53887    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
53888$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
53889    BUILD_FREETYPE=no
53890  fi
53891  # ..and contain a vc2010 project file
53892  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
53893  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
53894    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
53895$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
53896    BUILD_FREETYPE=no
53897  fi
53898  # Now check if configure found a version of 'msbuild.exe'
53899  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
53900    { $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
53901$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;}
53902    BUILD_FREETYPE=no
53903  fi
53904
53905  # Ready to go..
53906  if test "x$BUILD_FREETYPE" = xyes; then
53907    # msbuild requires trailing slashes for output directories
53908    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
53909    freetype_lib_path_unix="$freetype_lib_path"
53910    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
53911
53912  unix_path="$vcxproj_path"
53913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53914    windows_path=`$CYGPATH -m "$unix_path"`
53915    vcxproj_path="$windows_path"
53916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53917    windows_path=`cmd //c echo $unix_path`
53918    vcxproj_path="$windows_path"
53919  fi
53920
53921
53922  unix_path="$freetype_lib_path"
53923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53924    windows_path=`$CYGPATH -m "$unix_path"`
53925    freetype_lib_path="$windows_path"
53926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53927    windows_path=`cmd //c echo $unix_path`
53928    freetype_lib_path="$windows_path"
53929  fi
53930
53931
53932  unix_path="$freetype_obj_path"
53933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53934    windows_path=`$CYGPATH -m "$unix_path"`
53935    freetype_obj_path="$windows_path"
53936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53937    windows_path=`cmd //c echo $unix_path`
53938    freetype_obj_path="$windows_path"
53939  fi
53940
53941    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53942      freetype_platform=x64
53943    else
53944      freetype_platform=win32
53945    fi
53946
53947    # The original freetype project file is for VS 2010 (i.e. 'v100'),
53948    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
53949    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
53950    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
53951    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
53952$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
53953
53954    # First we try to build the freetype.dll
53955    $ECHO -e "@echo off\n"\
53956        "$MSBUILD $vcxproj_path "\
53957        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53958        "/p:Configuration=\"Release Multithreaded\" "\
53959        "/p:Platform=$freetype_platform "\
53960        "/p:ConfigurationType=DynamicLibrary "\
53961        "/p:TargetName=freetype "\
53962        "/p:OutDir=\"$freetype_lib_path\" "\
53963        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
53964    cmd /c freetype.bat
53965
53966    if test -s "$freetype_lib_path_unix/freetype.dll"; then
53967      # If that succeeds we also build freetype.lib
53968      $ECHO -e "@echo off\n"\
53969          "$MSBUILD $vcxproj_path "\
53970          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53971          "/p:Configuration=\"Release Multithreaded\" "\
53972          "/p:Platform=$freetype_platform "\
53973          "/p:ConfigurationType=StaticLibrary "\
53974          "/p:TargetName=freetype "\
53975          "/p:OutDir=\"$freetype_lib_path\" "\
53976          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
53977      cmd /c freetype.bat
53978
53979      if test -s "$freetype_lib_path_unix/freetype.lib"; then
53980        # Once we build both, lib and dll, set freetype lib and include path appropriately
53981        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
53982        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
53983        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
53984$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
53985      else
53986        BUILD_FREETYPE=no
53987      fi
53988    else
53989      BUILD_FREETYPE=no
53990    fi
53991  fi
53992
53993              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53994
53995  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53996  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53997  METHOD="well-known location"
53998
53999  # Let's start with an optimistic view of the world :-)
54000  FOUND_FREETYPE=yes
54001
54002  # First look for the canonical freetype main include file ft2build.h.
54003  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54004    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54005    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54006    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54007      # Fail.
54008      FOUND_FREETYPE=no
54009    fi
54010  fi
54011
54012  if test "x$FOUND_FREETYPE" = xyes; then
54013    # Include file found, let's continue the sanity check.
54014    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54015$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54016
54017    # Reset to default value
54018    FREETYPE_BASE_NAME=freetype
54019    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54020    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54021      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54022          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54023        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54024        # for the .6 version explicitly.
54025        FREETYPE_BASE_NAME=freetype.6
54026        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54027        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54028$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54029      else
54030        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54031$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54032        FOUND_FREETYPE=no
54033      fi
54034    else
54035      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54036        # On Windows, we will need both .lib and .dll file.
54037        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54038          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54039$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54040          FOUND_FREETYPE=no
54041        fi
54042      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54043          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54044        # Found lib in isa dir, use that instead.
54045        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54046        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54047$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54048      fi
54049    fi
54050  fi
54051
54052  if test "x$FOUND_FREETYPE" = xyes; then
54053
54054  # Only process if variable expands to non-empty
54055
54056  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54058
54059  # Input might be given as Windows format, start by converting to
54060  # unix format.
54061  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54062  new_path=`$CYGPATH -u "$path"`
54063
54064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54067  # "foo.exe" is OK but "foo" is an error.
54068  #
54069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54070  # It is also a way to make sure we got the proper file name for the real test later on.
54071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54072  if test "x$test_shortpath" = x; then
54073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54074$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54075    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54076  fi
54077
54078  # Call helper function which possibly converts this using DOS-style short mode.
54079  # If so, the updated path is stored in $new_path.
54080
54081  input_path="$new_path"
54082  # Check if we need to convert this using DOS-style short mode. If the path
54083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54084  # take no chances and rewrite it.
54085  # Note: m4 eats our [], so we need to use [ and ] instead.
54086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54087  if test "x$has_forbidden_chars" != x; then
54088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54092      # Going to short mode and back again did indeed matter. Since short mode is
54093      # case insensitive, let's make it lowercase to improve readability.
54094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54095      # Now convert it back to Unix-style (cygpath)
54096      input_path=`$CYGPATH -u "$shortmode_path"`
54097      new_path="$input_path"
54098    fi
54099  fi
54100
54101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54102  if test "x$test_cygdrive_prefix" = x; then
54103    # As a simple fix, exclude /usr/bin since it's not a real path.
54104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54106      # a path prefixed by /cygdrive for fixpath to work.
54107      new_path="$CYGWIN_ROOT_PATH$input_path"
54108    fi
54109  fi
54110
54111
54112  if test "x$path" != "x$new_path"; then
54113    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54115$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54116  fi
54117
54118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54119
54120  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54121  has_colon=`$ECHO $path | $GREP ^.:`
54122  new_path="$path"
54123  if test "x$has_colon" = x; then
54124    # Not in mixed or Windows style, start by that.
54125    new_path=`cmd //c echo $path`
54126  fi
54127
54128
54129  input_path="$new_path"
54130  # Check if we need to convert this using DOS-style short mode. If the path
54131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54132  # take no chances and rewrite it.
54133  # Note: m4 eats our [], so we need to use [ and ] instead.
54134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54135  if test "x$has_forbidden_chars" != x; then
54136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54138  fi
54139
54140
54141  windows_path="$new_path"
54142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54143    unix_path=`$CYGPATH -u "$windows_path"`
54144    new_path="$unix_path"
54145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54147    new_path="$unix_path"
54148  fi
54149
54150  if test "x$path" != "x$new_path"; then
54151    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54153$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54154  fi
54155
54156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54158
54159    else
54160      # We're on a unix platform. Hooray! :)
54161      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54162      has_space=`$ECHO "$path" | $GREP " "`
54163      if test "x$has_space" != x; then
54164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54165$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54166        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54167      fi
54168
54169      # Use eval to expand a potential ~
54170      eval path="$path"
54171      if test ! -f "$path" && test ! -d "$path"; then
54172        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54173      fi
54174
54175      if test -d "$path"; then
54176        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54177      else
54178        dir="`$DIRNAME "$path"`"
54179        base="`$BASENAME "$path"`"
54180        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54181      fi
54182    fi
54183  fi
54184
54185
54186  # Only process if variable expands to non-empty
54187
54188  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54190
54191  # Input might be given as Windows format, start by converting to
54192  # unix format.
54193  path="$POTENTIAL_FREETYPE_LIB_PATH"
54194  new_path=`$CYGPATH -u "$path"`
54195
54196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54199  # "foo.exe" is OK but "foo" is an error.
54200  #
54201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54202  # It is also a way to make sure we got the proper file name for the real test later on.
54203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54204  if test "x$test_shortpath" = x; then
54205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54207    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54208  fi
54209
54210  # Call helper function which possibly converts this using DOS-style short mode.
54211  # If so, the updated path is stored in $new_path.
54212
54213  input_path="$new_path"
54214  # Check if we need to convert this using DOS-style short mode. If the path
54215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54216  # take no chances and rewrite it.
54217  # Note: m4 eats our [], so we need to use [ and ] instead.
54218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54219  if test "x$has_forbidden_chars" != x; then
54220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54224      # Going to short mode and back again did indeed matter. Since short mode is
54225      # case insensitive, let's make it lowercase to improve readability.
54226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54227      # Now convert it back to Unix-style (cygpath)
54228      input_path=`$CYGPATH -u "$shortmode_path"`
54229      new_path="$input_path"
54230    fi
54231  fi
54232
54233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54234  if test "x$test_cygdrive_prefix" = x; then
54235    # As a simple fix, exclude /usr/bin since it's not a real path.
54236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54238      # a path prefixed by /cygdrive for fixpath to work.
54239      new_path="$CYGWIN_ROOT_PATH$input_path"
54240    fi
54241  fi
54242
54243
54244  if test "x$path" != "x$new_path"; then
54245    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54248  fi
54249
54250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54251
54252  path="$POTENTIAL_FREETYPE_LIB_PATH"
54253  has_colon=`$ECHO $path | $GREP ^.:`
54254  new_path="$path"
54255  if test "x$has_colon" = x; then
54256    # Not in mixed or Windows style, start by that.
54257    new_path=`cmd //c echo $path`
54258  fi
54259
54260
54261  input_path="$new_path"
54262  # Check if we need to convert this using DOS-style short mode. If the path
54263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54264  # take no chances and rewrite it.
54265  # Note: m4 eats our [], so we need to use [ and ] instead.
54266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54267  if test "x$has_forbidden_chars" != x; then
54268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54270  fi
54271
54272
54273  windows_path="$new_path"
54274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54275    unix_path=`$CYGPATH -u "$windows_path"`
54276    new_path="$unix_path"
54277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54279    new_path="$unix_path"
54280  fi
54281
54282  if test "x$path" != "x$new_path"; then
54283    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54286  fi
54287
54288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54290
54291    else
54292      # We're on a unix platform. Hooray! :)
54293      path="$POTENTIAL_FREETYPE_LIB_PATH"
54294      has_space=`$ECHO "$path" | $GREP " "`
54295      if test "x$has_space" != x; then
54296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54298        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54299      fi
54300
54301      # Use eval to expand a potential ~
54302      eval path="$path"
54303      if test ! -f "$path" && test ! -d "$path"; then
54304        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54305      fi
54306
54307      if test -d "$path"; then
54308        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54309      else
54310        dir="`$DIRNAME "$path"`"
54311        base="`$BASENAME "$path"`"
54312        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54313      fi
54314    fi
54315  fi
54316
54317
54318    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54320$as_echo_n "checking for freetype includes... " >&6; }
54321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54322$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54323    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54325$as_echo_n "checking for freetype libraries... " >&6; }
54326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54327$as_echo "$FREETYPE_LIB_PATH" >&6; }
54328  fi
54329
54330              else
54331
54332  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54333  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54334  METHOD="well-known location"
54335
54336  # Let's start with an optimistic view of the world :-)
54337  FOUND_FREETYPE=yes
54338
54339  # First look for the canonical freetype main include file ft2build.h.
54340  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54341    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54342    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54343    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54344      # Fail.
54345      FOUND_FREETYPE=no
54346    fi
54347  fi
54348
54349  if test "x$FOUND_FREETYPE" = xyes; then
54350    # Include file found, let's continue the sanity check.
54351    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54352$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54353
54354    # Reset to default value
54355    FREETYPE_BASE_NAME=freetype
54356    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54357    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54358      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54359          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54360        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54361        # for the .6 version explicitly.
54362        FREETYPE_BASE_NAME=freetype.6
54363        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54364        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54365$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54366      else
54367        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54368$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54369        FOUND_FREETYPE=no
54370      fi
54371    else
54372      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54373        # On Windows, we will need both .lib and .dll file.
54374        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54375          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54376$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54377          FOUND_FREETYPE=no
54378        fi
54379      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54380          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54381        # Found lib in isa dir, use that instead.
54382        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54383        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54384$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54385      fi
54386    fi
54387  fi
54388
54389  if test "x$FOUND_FREETYPE" = xyes; then
54390
54391  # Only process if variable expands to non-empty
54392
54393  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54395
54396  # Input might be given as Windows format, start by converting to
54397  # unix format.
54398  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54399  new_path=`$CYGPATH -u "$path"`
54400
54401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54404  # "foo.exe" is OK but "foo" is an error.
54405  #
54406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54407  # It is also a way to make sure we got the proper file name for the real test later on.
54408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54409  if test "x$test_shortpath" = x; then
54410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54412    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54413  fi
54414
54415  # Call helper function which possibly converts this using DOS-style short mode.
54416  # If so, the updated path is stored in $new_path.
54417
54418  input_path="$new_path"
54419  # Check if we need to convert this using DOS-style short mode. If the path
54420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54421  # take no chances and rewrite it.
54422  # Note: m4 eats our [], so we need to use [ and ] instead.
54423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54424  if test "x$has_forbidden_chars" != x; then
54425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54429      # Going to short mode and back again did indeed matter. Since short mode is
54430      # case insensitive, let's make it lowercase to improve readability.
54431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54432      # Now convert it back to Unix-style (cygpath)
54433      input_path=`$CYGPATH -u "$shortmode_path"`
54434      new_path="$input_path"
54435    fi
54436  fi
54437
54438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54439  if test "x$test_cygdrive_prefix" = x; then
54440    # As a simple fix, exclude /usr/bin since it's not a real path.
54441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54443      # a path prefixed by /cygdrive for fixpath to work.
54444      new_path="$CYGWIN_ROOT_PATH$input_path"
54445    fi
54446  fi
54447
54448
54449  if test "x$path" != "x$new_path"; then
54450    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54452$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54453  fi
54454
54455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54456
54457  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54458  has_colon=`$ECHO $path | $GREP ^.:`
54459  new_path="$path"
54460  if test "x$has_colon" = x; then
54461    # Not in mixed or Windows style, start by that.
54462    new_path=`cmd //c echo $path`
54463  fi
54464
54465
54466  input_path="$new_path"
54467  # Check if we need to convert this using DOS-style short mode. If the path
54468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54469  # take no chances and rewrite it.
54470  # Note: m4 eats our [], so we need to use [ and ] instead.
54471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54472  if test "x$has_forbidden_chars" != x; then
54473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54475  fi
54476
54477
54478  windows_path="$new_path"
54479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54480    unix_path=`$CYGPATH -u "$windows_path"`
54481    new_path="$unix_path"
54482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54484    new_path="$unix_path"
54485  fi
54486
54487  if test "x$path" != "x$new_path"; then
54488    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54490$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54491  fi
54492
54493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54495
54496    else
54497      # We're on a unix platform. Hooray! :)
54498      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54499      has_space=`$ECHO "$path" | $GREP " "`
54500      if test "x$has_space" != x; then
54501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54502$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54504      fi
54505
54506      # Use eval to expand a potential ~
54507      eval path="$path"
54508      if test ! -f "$path" && test ! -d "$path"; then
54509        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54510      fi
54511
54512      if test -d "$path"; then
54513        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54514      else
54515        dir="`$DIRNAME "$path"`"
54516        base="`$BASENAME "$path"`"
54517        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54518      fi
54519    fi
54520  fi
54521
54522
54523  # Only process if variable expands to non-empty
54524
54525  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54527
54528  # Input might be given as Windows format, start by converting to
54529  # unix format.
54530  path="$POTENTIAL_FREETYPE_LIB_PATH"
54531  new_path=`$CYGPATH -u "$path"`
54532
54533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54536  # "foo.exe" is OK but "foo" is an error.
54537  #
54538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54539  # It is also a way to make sure we got the proper file name for the real test later on.
54540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54541  if test "x$test_shortpath" = x; then
54542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54544    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54545  fi
54546
54547  # Call helper function which possibly converts this using DOS-style short mode.
54548  # If so, the updated path is stored in $new_path.
54549
54550  input_path="$new_path"
54551  # Check if we need to convert this using DOS-style short mode. If the path
54552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54553  # take no chances and rewrite it.
54554  # Note: m4 eats our [], so we need to use [ and ] instead.
54555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54556  if test "x$has_forbidden_chars" != x; then
54557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54561      # Going to short mode and back again did indeed matter. Since short mode is
54562      # case insensitive, let's make it lowercase to improve readability.
54563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54564      # Now convert it back to Unix-style (cygpath)
54565      input_path=`$CYGPATH -u "$shortmode_path"`
54566      new_path="$input_path"
54567    fi
54568  fi
54569
54570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54571  if test "x$test_cygdrive_prefix" = x; then
54572    # As a simple fix, exclude /usr/bin since it's not a real path.
54573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54575      # a path prefixed by /cygdrive for fixpath to work.
54576      new_path="$CYGWIN_ROOT_PATH$input_path"
54577    fi
54578  fi
54579
54580
54581  if test "x$path" != "x$new_path"; then
54582    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54585  fi
54586
54587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54588
54589  path="$POTENTIAL_FREETYPE_LIB_PATH"
54590  has_colon=`$ECHO $path | $GREP ^.:`
54591  new_path="$path"
54592  if test "x$has_colon" = x; then
54593    # Not in mixed or Windows style, start by that.
54594    new_path=`cmd //c echo $path`
54595  fi
54596
54597
54598  input_path="$new_path"
54599  # Check if we need to convert this using DOS-style short mode. If the path
54600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54601  # take no chances and rewrite it.
54602  # Note: m4 eats our [], so we need to use [ and ] instead.
54603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54604  if test "x$has_forbidden_chars" != x; then
54605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54607  fi
54608
54609
54610  windows_path="$new_path"
54611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54612    unix_path=`$CYGPATH -u "$windows_path"`
54613    new_path="$unix_path"
54614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54616    new_path="$unix_path"
54617  fi
54618
54619  if test "x$path" != "x$new_path"; then
54620    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54623  fi
54624
54625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54627
54628    else
54629      # We're on a unix platform. Hooray! :)
54630      path="$POTENTIAL_FREETYPE_LIB_PATH"
54631      has_space=`$ECHO "$path" | $GREP " "`
54632      if test "x$has_space" != x; then
54633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54636      fi
54637
54638      # Use eval to expand a potential ~
54639      eval path="$path"
54640      if test ! -f "$path" && test ! -d "$path"; then
54641        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54642      fi
54643
54644      if test -d "$path"; then
54645        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54646      else
54647        dir="`$DIRNAME "$path"`"
54648        base="`$BASENAME "$path"`"
54649        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54650      fi
54651    fi
54652  fi
54653
54654
54655    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54657$as_echo_n "checking for freetype includes... " >&6; }
54658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54659$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54660    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54662$as_echo_n "checking for freetype libraries... " >&6; }
54663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54664$as_echo "$FREETYPE_LIB_PATH" >&6; }
54665  fi
54666
54667              fi
54668            fi
54669          fi
54670        else
54671          FREETYPE_BASE_DIR="$SYSROOT/usr"
54672
54673  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54674  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54675  METHOD="well-known location"
54676
54677  # Let's start with an optimistic view of the world :-)
54678  FOUND_FREETYPE=yes
54679
54680  # First look for the canonical freetype main include file ft2build.h.
54681  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54682    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54683    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54684    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54685      # Fail.
54686      FOUND_FREETYPE=no
54687    fi
54688  fi
54689
54690  if test "x$FOUND_FREETYPE" = xyes; then
54691    # Include file found, let's continue the sanity check.
54692    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54693$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54694
54695    # Reset to default value
54696    FREETYPE_BASE_NAME=freetype
54697    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54698    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54699      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54700          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54701        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54702        # for the .6 version explicitly.
54703        FREETYPE_BASE_NAME=freetype.6
54704        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54705        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54706$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54707      else
54708        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54710        FOUND_FREETYPE=no
54711      fi
54712    else
54713      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54714        # On Windows, we will need both .lib and .dll file.
54715        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54716          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54717$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54718          FOUND_FREETYPE=no
54719        fi
54720      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54721          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54722        # Found lib in isa dir, use that instead.
54723        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54724        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54725$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54726      fi
54727    fi
54728  fi
54729
54730  if test "x$FOUND_FREETYPE" = xyes; then
54731
54732  # Only process if variable expands to non-empty
54733
54734  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54736
54737  # Input might be given as Windows format, start by converting to
54738  # unix format.
54739  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54740  new_path=`$CYGPATH -u "$path"`
54741
54742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54745  # "foo.exe" is OK but "foo" is an error.
54746  #
54747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54748  # It is also a way to make sure we got the proper file name for the real test later on.
54749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54750  if test "x$test_shortpath" = x; then
54751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54753    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54754  fi
54755
54756  # Call helper function which possibly converts this using DOS-style short mode.
54757  # If so, the updated path is stored in $new_path.
54758
54759  input_path="$new_path"
54760  # Check if we need to convert this using DOS-style short mode. If the path
54761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54762  # take no chances and rewrite it.
54763  # Note: m4 eats our [], so we need to use [ and ] instead.
54764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54765  if test "x$has_forbidden_chars" != x; then
54766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54770      # Going to short mode and back again did indeed matter. Since short mode is
54771      # case insensitive, let's make it lowercase to improve readability.
54772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54773      # Now convert it back to Unix-style (cygpath)
54774      input_path=`$CYGPATH -u "$shortmode_path"`
54775      new_path="$input_path"
54776    fi
54777  fi
54778
54779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54780  if test "x$test_cygdrive_prefix" = x; then
54781    # As a simple fix, exclude /usr/bin since it's not a real path.
54782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54784      # a path prefixed by /cygdrive for fixpath to work.
54785      new_path="$CYGWIN_ROOT_PATH$input_path"
54786    fi
54787  fi
54788
54789
54790  if test "x$path" != "x$new_path"; then
54791    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54793$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54794  fi
54795
54796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54797
54798  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54799  has_colon=`$ECHO $path | $GREP ^.:`
54800  new_path="$path"
54801  if test "x$has_colon" = x; then
54802    # Not in mixed or Windows style, start by that.
54803    new_path=`cmd //c echo $path`
54804  fi
54805
54806
54807  input_path="$new_path"
54808  # Check if we need to convert this using DOS-style short mode. If the path
54809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54810  # take no chances and rewrite it.
54811  # Note: m4 eats our [], so we need to use [ and ] instead.
54812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54813  if test "x$has_forbidden_chars" != x; then
54814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54816  fi
54817
54818
54819  windows_path="$new_path"
54820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54821    unix_path=`$CYGPATH -u "$windows_path"`
54822    new_path="$unix_path"
54823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54825    new_path="$unix_path"
54826  fi
54827
54828  if test "x$path" != "x$new_path"; then
54829    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54832  fi
54833
54834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54836
54837    else
54838      # We're on a unix platform. Hooray! :)
54839      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54840      has_space=`$ECHO "$path" | $GREP " "`
54841      if test "x$has_space" != x; then
54842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54844        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54845      fi
54846
54847      # Use eval to expand a potential ~
54848      eval path="$path"
54849      if test ! -f "$path" && test ! -d "$path"; then
54850        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54851      fi
54852
54853      if test -d "$path"; then
54854        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54855      else
54856        dir="`$DIRNAME "$path"`"
54857        base="`$BASENAME "$path"`"
54858        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54859      fi
54860    fi
54861  fi
54862
54863
54864  # Only process if variable expands to non-empty
54865
54866  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54868
54869  # Input might be given as Windows format, start by converting to
54870  # unix format.
54871  path="$POTENTIAL_FREETYPE_LIB_PATH"
54872  new_path=`$CYGPATH -u "$path"`
54873
54874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54877  # "foo.exe" is OK but "foo" is an error.
54878  #
54879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54880  # It is also a way to make sure we got the proper file name for the real test later on.
54881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54882  if test "x$test_shortpath" = x; then
54883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54886  fi
54887
54888  # Call helper function which possibly converts this using DOS-style short mode.
54889  # If so, the updated path is stored in $new_path.
54890
54891  input_path="$new_path"
54892  # Check if we need to convert this using DOS-style short mode. If the path
54893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54894  # take no chances and rewrite it.
54895  # Note: m4 eats our [], so we need to use [ and ] instead.
54896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54897  if test "x$has_forbidden_chars" != x; then
54898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54902      # Going to short mode and back again did indeed matter. Since short mode is
54903      # case insensitive, let's make it lowercase to improve readability.
54904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54905      # Now convert it back to Unix-style (cygpath)
54906      input_path=`$CYGPATH -u "$shortmode_path"`
54907      new_path="$input_path"
54908    fi
54909  fi
54910
54911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54912  if test "x$test_cygdrive_prefix" = x; then
54913    # As a simple fix, exclude /usr/bin since it's not a real path.
54914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54916      # a path prefixed by /cygdrive for fixpath to work.
54917      new_path="$CYGWIN_ROOT_PATH$input_path"
54918    fi
54919  fi
54920
54921
54922  if test "x$path" != "x$new_path"; then
54923    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54926  fi
54927
54928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54929
54930  path="$POTENTIAL_FREETYPE_LIB_PATH"
54931  has_colon=`$ECHO $path | $GREP ^.:`
54932  new_path="$path"
54933  if test "x$has_colon" = x; then
54934    # Not in mixed or Windows style, start by that.
54935    new_path=`cmd //c echo $path`
54936  fi
54937
54938
54939  input_path="$new_path"
54940  # Check if we need to convert this using DOS-style short mode. If the path
54941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54942  # take no chances and rewrite it.
54943  # Note: m4 eats our [], so we need to use [ and ] instead.
54944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54945  if test "x$has_forbidden_chars" != x; then
54946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54948  fi
54949
54950
54951  windows_path="$new_path"
54952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54953    unix_path=`$CYGPATH -u "$windows_path"`
54954    new_path="$unix_path"
54955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54957    new_path="$unix_path"
54958  fi
54959
54960  if test "x$path" != "x$new_path"; then
54961    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54964  fi
54965
54966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54968
54969    else
54970      # We're on a unix platform. Hooray! :)
54971      path="$POTENTIAL_FREETYPE_LIB_PATH"
54972      has_space=`$ECHO "$path" | $GREP " "`
54973      if test "x$has_space" != x; then
54974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54977      fi
54978
54979      # Use eval to expand a potential ~
54980      eval path="$path"
54981      if test ! -f "$path" && test ! -d "$path"; then
54982        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54983      fi
54984
54985      if test -d "$path"; then
54986        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54987      else
54988        dir="`$DIRNAME "$path"`"
54989        base="`$BASENAME "$path"`"
54990        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54991      fi
54992    fi
54993  fi
54994
54995
54996    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54998$as_echo_n "checking for freetype includes... " >&6; }
54999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55000$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55001    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55003$as_echo_n "checking for freetype libraries... " >&6; }
55004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55005$as_echo "$FREETYPE_LIB_PATH" >&6; }
55006  fi
55007
55008
55009          if test "x$FOUND_FREETYPE" != xyes; then
55010            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55011
55012  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55013  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55014  METHOD="well-known location"
55015
55016  # Let's start with an optimistic view of the world :-)
55017  FOUND_FREETYPE=yes
55018
55019  # First look for the canonical freetype main include file ft2build.h.
55020  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55021    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55022    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55023    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55024      # Fail.
55025      FOUND_FREETYPE=no
55026    fi
55027  fi
55028
55029  if test "x$FOUND_FREETYPE" = xyes; then
55030    # Include file found, let's continue the sanity check.
55031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55032$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55033
55034    # Reset to default value
55035    FREETYPE_BASE_NAME=freetype
55036    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55037    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55038      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55039          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55040        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55041        # for the .6 version explicitly.
55042        FREETYPE_BASE_NAME=freetype.6
55043        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55044        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55045$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55046      else
55047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55048$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55049        FOUND_FREETYPE=no
55050      fi
55051    else
55052      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55053        # On Windows, we will need both .lib and .dll file.
55054        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55055          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55056$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55057          FOUND_FREETYPE=no
55058        fi
55059      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55060          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55061        # Found lib in isa dir, use that instead.
55062        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55063        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55064$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55065      fi
55066    fi
55067  fi
55068
55069  if test "x$FOUND_FREETYPE" = xyes; then
55070
55071  # Only process if variable expands to non-empty
55072
55073  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55075
55076  # Input might be given as Windows format, start by converting to
55077  # unix format.
55078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55079  new_path=`$CYGPATH -u "$path"`
55080
55081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55084  # "foo.exe" is OK but "foo" is an error.
55085  #
55086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55087  # It is also a way to make sure we got the proper file name for the real test later on.
55088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55089  if test "x$test_shortpath" = x; then
55090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55093  fi
55094
55095  # Call helper function which possibly converts this using DOS-style short mode.
55096  # If so, the updated path is stored in $new_path.
55097
55098  input_path="$new_path"
55099  # Check if we need to convert this using DOS-style short mode. If the path
55100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55101  # take no chances and rewrite it.
55102  # Note: m4 eats our [], so we need to use [ and ] instead.
55103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55104  if test "x$has_forbidden_chars" != x; then
55105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55109      # Going to short mode and back again did indeed matter. Since short mode is
55110      # case insensitive, let's make it lowercase to improve readability.
55111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55112      # Now convert it back to Unix-style (cygpath)
55113      input_path=`$CYGPATH -u "$shortmode_path"`
55114      new_path="$input_path"
55115    fi
55116  fi
55117
55118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55119  if test "x$test_cygdrive_prefix" = x; then
55120    # As a simple fix, exclude /usr/bin since it's not a real path.
55121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55123      # a path prefixed by /cygdrive for fixpath to work.
55124      new_path="$CYGWIN_ROOT_PATH$input_path"
55125    fi
55126  fi
55127
55128
55129  if test "x$path" != "x$new_path"; then
55130    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55133  fi
55134
55135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55136
55137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55138  has_colon=`$ECHO $path | $GREP ^.:`
55139  new_path="$path"
55140  if test "x$has_colon" = x; then
55141    # Not in mixed or Windows style, start by that.
55142    new_path=`cmd //c echo $path`
55143  fi
55144
55145
55146  input_path="$new_path"
55147  # Check if we need to convert this using DOS-style short mode. If the path
55148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55149  # take no chances and rewrite it.
55150  # Note: m4 eats our [], so we need to use [ and ] instead.
55151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55152  if test "x$has_forbidden_chars" != x; then
55153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55155  fi
55156
55157
55158  windows_path="$new_path"
55159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55160    unix_path=`$CYGPATH -u "$windows_path"`
55161    new_path="$unix_path"
55162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55164    new_path="$unix_path"
55165  fi
55166
55167  if test "x$path" != "x$new_path"; then
55168    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55171  fi
55172
55173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55175
55176    else
55177      # We're on a unix platform. Hooray! :)
55178      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55179      has_space=`$ECHO "$path" | $GREP " "`
55180      if test "x$has_space" != x; then
55181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55184      fi
55185
55186      # Use eval to expand a potential ~
55187      eval path="$path"
55188      if test ! -f "$path" && test ! -d "$path"; then
55189        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55190      fi
55191
55192      if test -d "$path"; then
55193        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55194      else
55195        dir="`$DIRNAME "$path"`"
55196        base="`$BASENAME "$path"`"
55197        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55198      fi
55199    fi
55200  fi
55201
55202
55203  # Only process if variable expands to non-empty
55204
55205  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55207
55208  # Input might be given as Windows format, start by converting to
55209  # unix format.
55210  path="$POTENTIAL_FREETYPE_LIB_PATH"
55211  new_path=`$CYGPATH -u "$path"`
55212
55213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55216  # "foo.exe" is OK but "foo" is an error.
55217  #
55218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55219  # It is also a way to make sure we got the proper file name for the real test later on.
55220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55221  if test "x$test_shortpath" = x; then
55222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55224    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55225  fi
55226
55227  # Call helper function which possibly converts this using DOS-style short mode.
55228  # If so, the updated path is stored in $new_path.
55229
55230  input_path="$new_path"
55231  # Check if we need to convert this using DOS-style short mode. If the path
55232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55233  # take no chances and rewrite it.
55234  # Note: m4 eats our [], so we need to use [ and ] instead.
55235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55236  if test "x$has_forbidden_chars" != x; then
55237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55241      # Going to short mode and back again did indeed matter. Since short mode is
55242      # case insensitive, let's make it lowercase to improve readability.
55243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55244      # Now convert it back to Unix-style (cygpath)
55245      input_path=`$CYGPATH -u "$shortmode_path"`
55246      new_path="$input_path"
55247    fi
55248  fi
55249
55250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55251  if test "x$test_cygdrive_prefix" = x; then
55252    # As a simple fix, exclude /usr/bin since it's not a real path.
55253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55255      # a path prefixed by /cygdrive for fixpath to work.
55256      new_path="$CYGWIN_ROOT_PATH$input_path"
55257    fi
55258  fi
55259
55260
55261  if test "x$path" != "x$new_path"; then
55262    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55265  fi
55266
55267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55268
55269  path="$POTENTIAL_FREETYPE_LIB_PATH"
55270  has_colon=`$ECHO $path | $GREP ^.:`
55271  new_path="$path"
55272  if test "x$has_colon" = x; then
55273    # Not in mixed or Windows style, start by that.
55274    new_path=`cmd //c echo $path`
55275  fi
55276
55277
55278  input_path="$new_path"
55279  # Check if we need to convert this using DOS-style short mode. If the path
55280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55281  # take no chances and rewrite it.
55282  # Note: m4 eats our [], so we need to use [ and ] instead.
55283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55284  if test "x$has_forbidden_chars" != x; then
55285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55287  fi
55288
55289
55290  windows_path="$new_path"
55291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55292    unix_path=`$CYGPATH -u "$windows_path"`
55293    new_path="$unix_path"
55294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55296    new_path="$unix_path"
55297  fi
55298
55299  if test "x$path" != "x$new_path"; then
55300    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55303  fi
55304
55305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55307
55308    else
55309      # We're on a unix platform. Hooray! :)
55310      path="$POTENTIAL_FREETYPE_LIB_PATH"
55311      has_space=`$ECHO "$path" | $GREP " "`
55312      if test "x$has_space" != x; then
55313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55316      fi
55317
55318      # Use eval to expand a potential ~
55319      eval path="$path"
55320      if test ! -f "$path" && test ! -d "$path"; then
55321        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55322      fi
55323
55324      if test -d "$path"; then
55325        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55326      else
55327        dir="`$DIRNAME "$path"`"
55328        base="`$BASENAME "$path"`"
55329        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55330      fi
55331    fi
55332  fi
55333
55334
55335    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55337$as_echo_n "checking for freetype includes... " >&6; }
55338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55339$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55340    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55342$as_echo_n "checking for freetype libraries... " >&6; }
55343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55344$as_echo "$FREETYPE_LIB_PATH" >&6; }
55345  fi
55346
55347          fi
55348
55349          if test "x$FOUND_FREETYPE" != xyes; then
55350            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
55351
55352  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55353  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55354  METHOD="well-known location"
55355
55356  # Let's start with an optimistic view of the world :-)
55357  FOUND_FREETYPE=yes
55358
55359  # First look for the canonical freetype main include file ft2build.h.
55360  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55361    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55362    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55363    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55364      # Fail.
55365      FOUND_FREETYPE=no
55366    fi
55367  fi
55368
55369  if test "x$FOUND_FREETYPE" = xyes; then
55370    # Include file found, let's continue the sanity check.
55371    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55372$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55373
55374    # Reset to default value
55375    FREETYPE_BASE_NAME=freetype
55376    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55377    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55378      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55379          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55380        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55381        # for the .6 version explicitly.
55382        FREETYPE_BASE_NAME=freetype.6
55383        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55384        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55385$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55386      else
55387        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55388$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55389        FOUND_FREETYPE=no
55390      fi
55391    else
55392      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55393        # On Windows, we will need both .lib and .dll file.
55394        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55395          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55396$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55397          FOUND_FREETYPE=no
55398        fi
55399      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55400          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55401        # Found lib in isa dir, use that instead.
55402        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55403        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55404$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55405      fi
55406    fi
55407  fi
55408
55409  if test "x$FOUND_FREETYPE" = xyes; then
55410
55411  # Only process if variable expands to non-empty
55412
55413  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55415
55416  # Input might be given as Windows format, start by converting to
55417  # unix format.
55418  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55419  new_path=`$CYGPATH -u "$path"`
55420
55421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55424  # "foo.exe" is OK but "foo" is an error.
55425  #
55426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55427  # It is also a way to make sure we got the proper file name for the real test later on.
55428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55429  if test "x$test_shortpath" = x; then
55430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55433  fi
55434
55435  # Call helper function which possibly converts this using DOS-style short mode.
55436  # If so, the updated path is stored in $new_path.
55437
55438  input_path="$new_path"
55439  # Check if we need to convert this using DOS-style short mode. If the path
55440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55441  # take no chances and rewrite it.
55442  # Note: m4 eats our [], so we need to use [ and ] instead.
55443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55444  if test "x$has_forbidden_chars" != x; then
55445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55449      # Going to short mode and back again did indeed matter. Since short mode is
55450      # case insensitive, let's make it lowercase to improve readability.
55451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55452      # Now convert it back to Unix-style (cygpath)
55453      input_path=`$CYGPATH -u "$shortmode_path"`
55454      new_path="$input_path"
55455    fi
55456  fi
55457
55458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55459  if test "x$test_cygdrive_prefix" = x; then
55460    # As a simple fix, exclude /usr/bin since it's not a real path.
55461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55463      # a path prefixed by /cygdrive for fixpath to work.
55464      new_path="$CYGWIN_ROOT_PATH$input_path"
55465    fi
55466  fi
55467
55468
55469  if test "x$path" != "x$new_path"; then
55470    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55473  fi
55474
55475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55476
55477  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55478  has_colon=`$ECHO $path | $GREP ^.:`
55479  new_path="$path"
55480  if test "x$has_colon" = x; then
55481    # Not in mixed or Windows style, start by that.
55482    new_path=`cmd //c echo $path`
55483  fi
55484
55485
55486  input_path="$new_path"
55487  # Check if we need to convert this using DOS-style short mode. If the path
55488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55489  # take no chances and rewrite it.
55490  # Note: m4 eats our [], so we need to use [ and ] instead.
55491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55492  if test "x$has_forbidden_chars" != x; then
55493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55495  fi
55496
55497
55498  windows_path="$new_path"
55499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55500    unix_path=`$CYGPATH -u "$windows_path"`
55501    new_path="$unix_path"
55502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55504    new_path="$unix_path"
55505  fi
55506
55507  if test "x$path" != "x$new_path"; then
55508    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55511  fi
55512
55513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55515
55516    else
55517      # We're on a unix platform. Hooray! :)
55518      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55519      has_space=`$ECHO "$path" | $GREP " "`
55520      if test "x$has_space" != x; then
55521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55524      fi
55525
55526      # Use eval to expand a potential ~
55527      eval path="$path"
55528      if test ! -f "$path" && test ! -d "$path"; then
55529        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55530      fi
55531
55532      if test -d "$path"; then
55533        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55534      else
55535        dir="`$DIRNAME "$path"`"
55536        base="`$BASENAME "$path"`"
55537        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55538      fi
55539    fi
55540  fi
55541
55542
55543  # Only process if variable expands to non-empty
55544
55545  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55547
55548  # Input might be given as Windows format, start by converting to
55549  # unix format.
55550  path="$POTENTIAL_FREETYPE_LIB_PATH"
55551  new_path=`$CYGPATH -u "$path"`
55552
55553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55556  # "foo.exe" is OK but "foo" is an error.
55557  #
55558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55559  # It is also a way to make sure we got the proper file name for the real test later on.
55560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55561  if test "x$test_shortpath" = x; then
55562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55564    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55565  fi
55566
55567  # Call helper function which possibly converts this using DOS-style short mode.
55568  # If so, the updated path is stored in $new_path.
55569
55570  input_path="$new_path"
55571  # Check if we need to convert this using DOS-style short mode. If the path
55572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55573  # take no chances and rewrite it.
55574  # Note: m4 eats our [], so we need to use [ and ] instead.
55575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55576  if test "x$has_forbidden_chars" != x; then
55577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55581      # Going to short mode and back again did indeed matter. Since short mode is
55582      # case insensitive, let's make it lowercase to improve readability.
55583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55584      # Now convert it back to Unix-style (cygpath)
55585      input_path=`$CYGPATH -u "$shortmode_path"`
55586      new_path="$input_path"
55587    fi
55588  fi
55589
55590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55591  if test "x$test_cygdrive_prefix" = x; then
55592    # As a simple fix, exclude /usr/bin since it's not a real path.
55593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55595      # a path prefixed by /cygdrive for fixpath to work.
55596      new_path="$CYGWIN_ROOT_PATH$input_path"
55597    fi
55598  fi
55599
55600
55601  if test "x$path" != "x$new_path"; then
55602    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55605  fi
55606
55607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55608
55609  path="$POTENTIAL_FREETYPE_LIB_PATH"
55610  has_colon=`$ECHO $path | $GREP ^.:`
55611  new_path="$path"
55612  if test "x$has_colon" = x; then
55613    # Not in mixed or Windows style, start by that.
55614    new_path=`cmd //c echo $path`
55615  fi
55616
55617
55618  input_path="$new_path"
55619  # Check if we need to convert this using DOS-style short mode. If the path
55620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55621  # take no chances and rewrite it.
55622  # Note: m4 eats our [], so we need to use [ and ] instead.
55623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55624  if test "x$has_forbidden_chars" != x; then
55625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55627  fi
55628
55629
55630  windows_path="$new_path"
55631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55632    unix_path=`$CYGPATH -u "$windows_path"`
55633    new_path="$unix_path"
55634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55636    new_path="$unix_path"
55637  fi
55638
55639  if test "x$path" != "x$new_path"; then
55640    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55642$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55643  fi
55644
55645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55647
55648    else
55649      # We're on a unix platform. Hooray! :)
55650      path="$POTENTIAL_FREETYPE_LIB_PATH"
55651      has_space=`$ECHO "$path" | $GREP " "`
55652      if test "x$has_space" != x; then
55653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55654$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55656      fi
55657
55658      # Use eval to expand a potential ~
55659      eval path="$path"
55660      if test ! -f "$path" && test ! -d "$path"; then
55661        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55662      fi
55663
55664      if test -d "$path"; then
55665        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55666      else
55667        dir="`$DIRNAME "$path"`"
55668        base="`$BASENAME "$path"`"
55669        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55670      fi
55671    fi
55672  fi
55673
55674
55675    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55677$as_echo_n "checking for freetype includes... " >&6; }
55678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55679$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55680    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55682$as_echo_n "checking for freetype libraries... " >&6; }
55683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55684$as_echo "$FREETYPE_LIB_PATH" >&6; }
55685  fi
55686
55687          fi
55688
55689          if test "x$FOUND_FREETYPE" != xyes; then
55690            FREETYPE_BASE_DIR="$SYSROOT/usr"
55691            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55692
55693  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55694  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
55695  METHOD="well-known location"
55696
55697  # Let's start with an optimistic view of the world :-)
55698  FOUND_FREETYPE=yes
55699
55700  # First look for the canonical freetype main include file ft2build.h.
55701  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55702    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55703    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55704    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55705      # Fail.
55706      FOUND_FREETYPE=no
55707    fi
55708  fi
55709
55710  if test "x$FOUND_FREETYPE" = xyes; then
55711    # Include file found, let's continue the sanity check.
55712    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55713$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55714
55715    # Reset to default value
55716    FREETYPE_BASE_NAME=freetype
55717    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55718    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55719      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55720          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55721        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55722        # for the .6 version explicitly.
55723        FREETYPE_BASE_NAME=freetype.6
55724        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55725        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55726$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55727      else
55728        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55729$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55730        FOUND_FREETYPE=no
55731      fi
55732    else
55733      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55734        # On Windows, we will need both .lib and .dll file.
55735        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55736          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55737$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55738          FOUND_FREETYPE=no
55739        fi
55740      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55741          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55742        # Found lib in isa dir, use that instead.
55743        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55744        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55745$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55746      fi
55747    fi
55748  fi
55749
55750  if test "x$FOUND_FREETYPE" = xyes; then
55751
55752  # Only process if variable expands to non-empty
55753
55754  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55756
55757  # Input might be given as Windows format, start by converting to
55758  # unix format.
55759  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55760  new_path=`$CYGPATH -u "$path"`
55761
55762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55765  # "foo.exe" is OK but "foo" is an error.
55766  #
55767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55768  # It is also a way to make sure we got the proper file name for the real test later on.
55769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55770  if test "x$test_shortpath" = x; then
55771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55773    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55774  fi
55775
55776  # Call helper function which possibly converts this using DOS-style short mode.
55777  # If so, the updated path is stored in $new_path.
55778
55779  input_path="$new_path"
55780  # Check if we need to convert this using DOS-style short mode. If the path
55781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55782  # take no chances and rewrite it.
55783  # Note: m4 eats our [], so we need to use [ and ] instead.
55784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55785  if test "x$has_forbidden_chars" != x; then
55786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55790      # Going to short mode and back again did indeed matter. Since short mode is
55791      # case insensitive, let's make it lowercase to improve readability.
55792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55793      # Now convert it back to Unix-style (cygpath)
55794      input_path=`$CYGPATH -u "$shortmode_path"`
55795      new_path="$input_path"
55796    fi
55797  fi
55798
55799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55800  if test "x$test_cygdrive_prefix" = x; then
55801    # As a simple fix, exclude /usr/bin since it's not a real path.
55802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55804      # a path prefixed by /cygdrive for fixpath to work.
55805      new_path="$CYGWIN_ROOT_PATH$input_path"
55806    fi
55807  fi
55808
55809
55810  if test "x$path" != "x$new_path"; then
55811    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55814  fi
55815
55816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55817
55818  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55819  has_colon=`$ECHO $path | $GREP ^.:`
55820  new_path="$path"
55821  if test "x$has_colon" = x; then
55822    # Not in mixed or Windows style, start by that.
55823    new_path=`cmd //c echo $path`
55824  fi
55825
55826
55827  input_path="$new_path"
55828  # Check if we need to convert this using DOS-style short mode. If the path
55829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55830  # take no chances and rewrite it.
55831  # Note: m4 eats our [], so we need to use [ and ] instead.
55832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55833  if test "x$has_forbidden_chars" != x; then
55834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55836  fi
55837
55838
55839  windows_path="$new_path"
55840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55841    unix_path=`$CYGPATH -u "$windows_path"`
55842    new_path="$unix_path"
55843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55845    new_path="$unix_path"
55846  fi
55847
55848  if test "x$path" != "x$new_path"; then
55849    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55852  fi
55853
55854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55856
55857    else
55858      # We're on a unix platform. Hooray! :)
55859      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55860      has_space=`$ECHO "$path" | $GREP " "`
55861      if test "x$has_space" != x; then
55862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55864        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55865      fi
55866
55867      # Use eval to expand a potential ~
55868      eval path="$path"
55869      if test ! -f "$path" && test ! -d "$path"; then
55870        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55871      fi
55872
55873      if test -d "$path"; then
55874        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55875      else
55876        dir="`$DIRNAME "$path"`"
55877        base="`$BASENAME "$path"`"
55878        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55879      fi
55880    fi
55881  fi
55882
55883
55884  # Only process if variable expands to non-empty
55885
55886  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55888
55889  # Input might be given as Windows format, start by converting to
55890  # unix format.
55891  path="$POTENTIAL_FREETYPE_LIB_PATH"
55892  new_path=`$CYGPATH -u "$path"`
55893
55894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55897  # "foo.exe" is OK but "foo" is an error.
55898  #
55899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55900  # It is also a way to make sure we got the proper file name for the real test later on.
55901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55902  if test "x$test_shortpath" = x; then
55903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55904$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55905    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55906  fi
55907
55908  # Call helper function which possibly converts this using DOS-style short mode.
55909  # If so, the updated path is stored in $new_path.
55910
55911  input_path="$new_path"
55912  # Check if we need to convert this using DOS-style short mode. If the path
55913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55914  # take no chances and rewrite it.
55915  # Note: m4 eats our [], so we need to use [ and ] instead.
55916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55917  if test "x$has_forbidden_chars" != x; then
55918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55922      # Going to short mode and back again did indeed matter. Since short mode is
55923      # case insensitive, let's make it lowercase to improve readability.
55924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55925      # Now convert it back to Unix-style (cygpath)
55926      input_path=`$CYGPATH -u "$shortmode_path"`
55927      new_path="$input_path"
55928    fi
55929  fi
55930
55931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55932  if test "x$test_cygdrive_prefix" = x; then
55933    # As a simple fix, exclude /usr/bin since it's not a real path.
55934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55936      # a path prefixed by /cygdrive for fixpath to work.
55937      new_path="$CYGWIN_ROOT_PATH$input_path"
55938    fi
55939  fi
55940
55941
55942  if test "x$path" != "x$new_path"; then
55943    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55946  fi
55947
55948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55949
55950  path="$POTENTIAL_FREETYPE_LIB_PATH"
55951  has_colon=`$ECHO $path | $GREP ^.:`
55952  new_path="$path"
55953  if test "x$has_colon" = x; then
55954    # Not in mixed or Windows style, start by that.
55955    new_path=`cmd //c echo $path`
55956  fi
55957
55958
55959  input_path="$new_path"
55960  # Check if we need to convert this using DOS-style short mode. If the path
55961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55962  # take no chances and rewrite it.
55963  # Note: m4 eats our [], so we need to use [ and ] instead.
55964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55965  if test "x$has_forbidden_chars" != x; then
55966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55968  fi
55969
55970
55971  windows_path="$new_path"
55972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55973    unix_path=`$CYGPATH -u "$windows_path"`
55974    new_path="$unix_path"
55975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55977    new_path="$unix_path"
55978  fi
55979
55980  if test "x$path" != "x$new_path"; then
55981    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55983$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55984  fi
55985
55986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55988
55989    else
55990      # We're on a unix platform. Hooray! :)
55991      path="$POTENTIAL_FREETYPE_LIB_PATH"
55992      has_space=`$ECHO "$path" | $GREP " "`
55993      if test "x$has_space" != x; then
55994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55996        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55997      fi
55998
55999      # Use eval to expand a potential ~
56000      eval path="$path"
56001      if test ! -f "$path" && test ! -d "$path"; then
56002        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56003      fi
56004
56005      if test -d "$path"; then
56006        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56007      else
56008        dir="`$DIRNAME "$path"`"
56009        base="`$BASENAME "$path"`"
56010        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56011      fi
56012    fi
56013  fi
56014
56015
56016    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56018$as_echo_n "checking for freetype includes... " >&6; }
56019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56020$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56021    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56023$as_echo_n "checking for freetype libraries... " >&6; }
56024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56025$as_echo "$FREETYPE_LIB_PATH" >&6; }
56026  fi
56027
56028            else
56029
56030  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56031  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56032  METHOD="well-known location"
56033
56034  # Let's start with an optimistic view of the world :-)
56035  FOUND_FREETYPE=yes
56036
56037  # First look for the canonical freetype main include file ft2build.h.
56038  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56039    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56040    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56041    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56042      # Fail.
56043      FOUND_FREETYPE=no
56044    fi
56045  fi
56046
56047  if test "x$FOUND_FREETYPE" = xyes; then
56048    # Include file found, let's continue the sanity check.
56049    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56050$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56051
56052    # Reset to default value
56053    FREETYPE_BASE_NAME=freetype
56054    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56055    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56056      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56057          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56058        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56059        # for the .6 version explicitly.
56060        FREETYPE_BASE_NAME=freetype.6
56061        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56062        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56063$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56064      else
56065        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56066$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56067        FOUND_FREETYPE=no
56068      fi
56069    else
56070      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56071        # On Windows, we will need both .lib and .dll file.
56072        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56073          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56074$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56075          FOUND_FREETYPE=no
56076        fi
56077      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56078          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56079        # Found lib in isa dir, use that instead.
56080        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56081        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56082$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56083      fi
56084    fi
56085  fi
56086
56087  if test "x$FOUND_FREETYPE" = xyes; then
56088
56089  # Only process if variable expands to non-empty
56090
56091  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56093
56094  # Input might be given as Windows format, start by converting to
56095  # unix format.
56096  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56097  new_path=`$CYGPATH -u "$path"`
56098
56099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56102  # "foo.exe" is OK but "foo" is an error.
56103  #
56104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56105  # It is also a way to make sure we got the proper file name for the real test later on.
56106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56107  if test "x$test_shortpath" = x; then
56108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56110    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56111  fi
56112
56113  # Call helper function which possibly converts this using DOS-style short mode.
56114  # If so, the updated path is stored in $new_path.
56115
56116  input_path="$new_path"
56117  # Check if we need to convert this using DOS-style short mode. If the path
56118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56119  # take no chances and rewrite it.
56120  # Note: m4 eats our [], so we need to use [ and ] instead.
56121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56122  if test "x$has_forbidden_chars" != x; then
56123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56127      # Going to short mode and back again did indeed matter. Since short mode is
56128      # case insensitive, let's make it lowercase to improve readability.
56129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56130      # Now convert it back to Unix-style (cygpath)
56131      input_path=`$CYGPATH -u "$shortmode_path"`
56132      new_path="$input_path"
56133    fi
56134  fi
56135
56136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56137  if test "x$test_cygdrive_prefix" = x; then
56138    # As a simple fix, exclude /usr/bin since it's not a real path.
56139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56141      # a path prefixed by /cygdrive for fixpath to work.
56142      new_path="$CYGWIN_ROOT_PATH$input_path"
56143    fi
56144  fi
56145
56146
56147  if test "x$path" != "x$new_path"; then
56148    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56151  fi
56152
56153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56154
56155  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56156  has_colon=`$ECHO $path | $GREP ^.:`
56157  new_path="$path"
56158  if test "x$has_colon" = x; then
56159    # Not in mixed or Windows style, start by that.
56160    new_path=`cmd //c echo $path`
56161  fi
56162
56163
56164  input_path="$new_path"
56165  # Check if we need to convert this using DOS-style short mode. If the path
56166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56167  # take no chances and rewrite it.
56168  # Note: m4 eats our [], so we need to use [ and ] instead.
56169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56170  if test "x$has_forbidden_chars" != x; then
56171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56173  fi
56174
56175
56176  windows_path="$new_path"
56177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56178    unix_path=`$CYGPATH -u "$windows_path"`
56179    new_path="$unix_path"
56180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56182    new_path="$unix_path"
56183  fi
56184
56185  if test "x$path" != "x$new_path"; then
56186    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56188$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56189  fi
56190
56191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56193
56194    else
56195      # We're on a unix platform. Hooray! :)
56196      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56197      has_space=`$ECHO "$path" | $GREP " "`
56198      if test "x$has_space" != x; then
56199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56200$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56202      fi
56203
56204      # Use eval to expand a potential ~
56205      eval path="$path"
56206      if test ! -f "$path" && test ! -d "$path"; then
56207        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56208      fi
56209
56210      if test -d "$path"; then
56211        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56212      else
56213        dir="`$DIRNAME "$path"`"
56214        base="`$BASENAME "$path"`"
56215        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56216      fi
56217    fi
56218  fi
56219
56220
56221  # Only process if variable expands to non-empty
56222
56223  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56225
56226  # Input might be given as Windows format, start by converting to
56227  # unix format.
56228  path="$POTENTIAL_FREETYPE_LIB_PATH"
56229  new_path=`$CYGPATH -u "$path"`
56230
56231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56234  # "foo.exe" is OK but "foo" is an error.
56235  #
56236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56237  # It is also a way to make sure we got the proper file name for the real test later on.
56238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56239  if test "x$test_shortpath" = x; then
56240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56242    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56243  fi
56244
56245  # Call helper function which possibly converts this using DOS-style short mode.
56246  # If so, the updated path is stored in $new_path.
56247
56248  input_path="$new_path"
56249  # Check if we need to convert this using DOS-style short mode. If the path
56250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56251  # take no chances and rewrite it.
56252  # Note: m4 eats our [], so we need to use [ and ] instead.
56253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56254  if test "x$has_forbidden_chars" != x; then
56255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56259      # Going to short mode and back again did indeed matter. Since short mode is
56260      # case insensitive, let's make it lowercase to improve readability.
56261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56262      # Now convert it back to Unix-style (cygpath)
56263      input_path=`$CYGPATH -u "$shortmode_path"`
56264      new_path="$input_path"
56265    fi
56266  fi
56267
56268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56269  if test "x$test_cygdrive_prefix" = x; then
56270    # As a simple fix, exclude /usr/bin since it's not a real path.
56271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56273      # a path prefixed by /cygdrive for fixpath to work.
56274      new_path="$CYGWIN_ROOT_PATH$input_path"
56275    fi
56276  fi
56277
56278
56279  if test "x$path" != "x$new_path"; then
56280    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56282$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56283  fi
56284
56285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56286
56287  path="$POTENTIAL_FREETYPE_LIB_PATH"
56288  has_colon=`$ECHO $path | $GREP ^.:`
56289  new_path="$path"
56290  if test "x$has_colon" = x; then
56291    # Not in mixed or Windows style, start by that.
56292    new_path=`cmd //c echo $path`
56293  fi
56294
56295
56296  input_path="$new_path"
56297  # Check if we need to convert this using DOS-style short mode. If the path
56298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56299  # take no chances and rewrite it.
56300  # Note: m4 eats our [], so we need to use [ and ] instead.
56301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56302  if test "x$has_forbidden_chars" != x; then
56303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56305  fi
56306
56307
56308  windows_path="$new_path"
56309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56310    unix_path=`$CYGPATH -u "$windows_path"`
56311    new_path="$unix_path"
56312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56314    new_path="$unix_path"
56315  fi
56316
56317  if test "x$path" != "x$new_path"; then
56318    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56320$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56321  fi
56322
56323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56325
56326    else
56327      # We're on a unix platform. Hooray! :)
56328      path="$POTENTIAL_FREETYPE_LIB_PATH"
56329      has_space=`$ECHO "$path" | $GREP " "`
56330      if test "x$has_space" != x; then
56331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56333        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56334      fi
56335
56336      # Use eval to expand a potential ~
56337      eval path="$path"
56338      if test ! -f "$path" && test ! -d "$path"; then
56339        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56340      fi
56341
56342      if test -d "$path"; then
56343        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56344      else
56345        dir="`$DIRNAME "$path"`"
56346        base="`$BASENAME "$path"`"
56347        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56348      fi
56349    fi
56350  fi
56351
56352
56353    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56355$as_echo_n "checking for freetype includes... " >&6; }
56356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56357$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56358    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56360$as_echo_n "checking for freetype libraries... " >&6; }
56361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56362$as_echo "$FREETYPE_LIB_PATH" >&6; }
56363  fi
56364
56365              if test "x$FOUND_FREETYPE" != xyes; then
56366
56367  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56368  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56369  METHOD="well-known location"
56370
56371  # Let's start with an optimistic view of the world :-)
56372  FOUND_FREETYPE=yes
56373
56374  # First look for the canonical freetype main include file ft2build.h.
56375  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56376    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56377    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56378    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56379      # Fail.
56380      FOUND_FREETYPE=no
56381    fi
56382  fi
56383
56384  if test "x$FOUND_FREETYPE" = xyes; then
56385    # Include file found, let's continue the sanity check.
56386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56387$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56388
56389    # Reset to default value
56390    FREETYPE_BASE_NAME=freetype
56391    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56392    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56393      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56394          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56395        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56396        # for the .6 version explicitly.
56397        FREETYPE_BASE_NAME=freetype.6
56398        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56399        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56400$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56401      else
56402        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56403$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56404        FOUND_FREETYPE=no
56405      fi
56406    else
56407      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56408        # On Windows, we will need both .lib and .dll file.
56409        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56410          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56411$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56412          FOUND_FREETYPE=no
56413        fi
56414      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56415          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56416        # Found lib in isa dir, use that instead.
56417        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56418        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56419$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56420      fi
56421    fi
56422  fi
56423
56424  if test "x$FOUND_FREETYPE" = xyes; then
56425
56426  # Only process if variable expands to non-empty
56427
56428  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56430
56431  # Input might be given as Windows format, start by converting to
56432  # unix format.
56433  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56434  new_path=`$CYGPATH -u "$path"`
56435
56436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56439  # "foo.exe" is OK but "foo" is an error.
56440  #
56441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56442  # It is also a way to make sure we got the proper file name for the real test later on.
56443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56444  if test "x$test_shortpath" = x; then
56445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56446$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56447    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56448  fi
56449
56450  # Call helper function which possibly converts this using DOS-style short mode.
56451  # If so, the updated path is stored in $new_path.
56452
56453  input_path="$new_path"
56454  # Check if we need to convert this using DOS-style short mode. If the path
56455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56456  # take no chances and rewrite it.
56457  # Note: m4 eats our [], so we need to use [ and ] instead.
56458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56459  if test "x$has_forbidden_chars" != x; then
56460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56464      # Going to short mode and back again did indeed matter. Since short mode is
56465      # case insensitive, let's make it lowercase to improve readability.
56466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56467      # Now convert it back to Unix-style (cygpath)
56468      input_path=`$CYGPATH -u "$shortmode_path"`
56469      new_path="$input_path"
56470    fi
56471  fi
56472
56473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56474  if test "x$test_cygdrive_prefix" = x; then
56475    # As a simple fix, exclude /usr/bin since it's not a real path.
56476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56478      # a path prefixed by /cygdrive for fixpath to work.
56479      new_path="$CYGWIN_ROOT_PATH$input_path"
56480    fi
56481  fi
56482
56483
56484  if test "x$path" != "x$new_path"; then
56485    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56487$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56488  fi
56489
56490    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56491
56492  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56493  has_colon=`$ECHO $path | $GREP ^.:`
56494  new_path="$path"
56495  if test "x$has_colon" = x; then
56496    # Not in mixed or Windows style, start by that.
56497    new_path=`cmd //c echo $path`
56498  fi
56499
56500
56501  input_path="$new_path"
56502  # Check if we need to convert this using DOS-style short mode. If the path
56503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56504  # take no chances and rewrite it.
56505  # Note: m4 eats our [], so we need to use [ and ] instead.
56506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56507  if test "x$has_forbidden_chars" != x; then
56508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56510  fi
56511
56512
56513  windows_path="$new_path"
56514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56515    unix_path=`$CYGPATH -u "$windows_path"`
56516    new_path="$unix_path"
56517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56519    new_path="$unix_path"
56520  fi
56521
56522  if test "x$path" != "x$new_path"; then
56523    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56525$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56526  fi
56527
56528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56530
56531    else
56532      # We're on a unix platform. Hooray! :)
56533      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56534      has_space=`$ECHO "$path" | $GREP " "`
56535      if test "x$has_space" != x; then
56536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56537$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56538        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56539      fi
56540
56541      # Use eval to expand a potential ~
56542      eval path="$path"
56543      if test ! -f "$path" && test ! -d "$path"; then
56544        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56545      fi
56546
56547      if test -d "$path"; then
56548        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56549      else
56550        dir="`$DIRNAME "$path"`"
56551        base="`$BASENAME "$path"`"
56552        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56553      fi
56554    fi
56555  fi
56556
56557
56558  # Only process if variable expands to non-empty
56559
56560  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56562
56563  # Input might be given as Windows format, start by converting to
56564  # unix format.
56565  path="$POTENTIAL_FREETYPE_LIB_PATH"
56566  new_path=`$CYGPATH -u "$path"`
56567
56568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56571  # "foo.exe" is OK but "foo" is an error.
56572  #
56573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56574  # It is also a way to make sure we got the proper file name for the real test later on.
56575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56576  if test "x$test_shortpath" = x; then
56577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56578$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56579    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56580  fi
56581
56582  # Call helper function which possibly converts this using DOS-style short mode.
56583  # If so, the updated path is stored in $new_path.
56584
56585  input_path="$new_path"
56586  # Check if we need to convert this using DOS-style short mode. If the path
56587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56588  # take no chances and rewrite it.
56589  # Note: m4 eats our [], so we need to use [ and ] instead.
56590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56591  if test "x$has_forbidden_chars" != x; then
56592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56596      # Going to short mode and back again did indeed matter. Since short mode is
56597      # case insensitive, let's make it lowercase to improve readability.
56598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56599      # Now convert it back to Unix-style (cygpath)
56600      input_path=`$CYGPATH -u "$shortmode_path"`
56601      new_path="$input_path"
56602    fi
56603  fi
56604
56605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56606  if test "x$test_cygdrive_prefix" = x; then
56607    # As a simple fix, exclude /usr/bin since it's not a real path.
56608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56610      # a path prefixed by /cygdrive for fixpath to work.
56611      new_path="$CYGWIN_ROOT_PATH$input_path"
56612    fi
56613  fi
56614
56615
56616  if test "x$path" != "x$new_path"; then
56617    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56619$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56620  fi
56621
56622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56623
56624  path="$POTENTIAL_FREETYPE_LIB_PATH"
56625  has_colon=`$ECHO $path | $GREP ^.:`
56626  new_path="$path"
56627  if test "x$has_colon" = x; then
56628    # Not in mixed or Windows style, start by that.
56629    new_path=`cmd //c echo $path`
56630  fi
56631
56632
56633  input_path="$new_path"
56634  # Check if we need to convert this using DOS-style short mode. If the path
56635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56636  # take no chances and rewrite it.
56637  # Note: m4 eats our [], so we need to use [ and ] instead.
56638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56639  if test "x$has_forbidden_chars" != x; then
56640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56642  fi
56643
56644
56645  windows_path="$new_path"
56646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56647    unix_path=`$CYGPATH -u "$windows_path"`
56648    new_path="$unix_path"
56649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56651    new_path="$unix_path"
56652  fi
56653
56654  if test "x$path" != "x$new_path"; then
56655    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56657$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56658  fi
56659
56660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56662
56663    else
56664      # We're on a unix platform. Hooray! :)
56665      path="$POTENTIAL_FREETYPE_LIB_PATH"
56666      has_space=`$ECHO "$path" | $GREP " "`
56667      if test "x$has_space" != x; then
56668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56669$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56671      fi
56672
56673      # Use eval to expand a potential ~
56674      eval path="$path"
56675      if test ! -f "$path" && test ! -d "$path"; then
56676        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56677      fi
56678
56679      if test -d "$path"; then
56680        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56681      else
56682        dir="`$DIRNAME "$path"`"
56683        base="`$BASENAME "$path"`"
56684        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56685      fi
56686    fi
56687  fi
56688
56689
56690    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56692$as_echo_n "checking for freetype includes... " >&6; }
56693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56694$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56695    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56697$as_echo_n "checking for freetype libraries... " >&6; }
56698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56699$as_echo "$FREETYPE_LIB_PATH" >&6; }
56700  fi
56701
56702              fi
56703            fi
56704          fi
56705        fi
56706      fi # end check in well-known locations
56707
56708      if test "x$FOUND_FREETYPE" != xyes; then
56709
56710  # Print a helpful message on how to acquire the necessary build dependency.
56711  # freetype is the help tag: freetype, cups, alsa etc
56712  MISSING_DEPENDENCY=freetype
56713
56714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56715    cygwin_help $MISSING_DEPENDENCY
56716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56717    msys_help $MISSING_DEPENDENCY
56718  else
56719    PKGHANDLER_COMMAND=
56720
56721    case $PKGHANDLER in
56722      apt-get)
56723        apt_help     $MISSING_DEPENDENCY ;;
56724      yum)
56725        yum_help     $MISSING_DEPENDENCY ;;
56726      port)
56727        port_help    $MISSING_DEPENDENCY ;;
56728      pkgutil)
56729        pkgutil_help $MISSING_DEPENDENCY ;;
56730      pkgadd)
56731        pkgadd_help  $MISSING_DEPENDENCY ;;
56732    esac
56733
56734    if test "x$PKGHANDLER_COMMAND" != x; then
56735      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56736    fi
56737  fi
56738
56739        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
56740      fi
56741    fi # end user specified settings
56742
56743    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
56744    if test "x$FREETYPE_CFLAGS" = x; then
56745
56746  # Only process if variable expands to non-empty
56747
56748  if test "x$FREETYPE_INCLUDE_PATH" != x; then
56749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56750
56751  # Input might be given as Windows format, start by converting to
56752  # unix format.
56753  path="$FREETYPE_INCLUDE_PATH"
56754  new_path=`$CYGPATH -u "$path"`
56755
56756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56759  # "foo.exe" is OK but "foo" is an error.
56760  #
56761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56762  # It is also a way to make sure we got the proper file name for the real test later on.
56763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56764  if test "x$test_shortpath" = x; then
56765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56766$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56767    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
56768  fi
56769
56770  # Call helper function which possibly converts this using DOS-style short mode.
56771  # If so, the updated path is stored in $new_path.
56772
56773  input_path="$new_path"
56774  # Check if we need to convert this using DOS-style short mode. If the path
56775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56776  # take no chances and rewrite it.
56777  # Note: m4 eats our [], so we need to use [ and ] instead.
56778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56779  if test "x$has_forbidden_chars" != x; then
56780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56784      # Going to short mode and back again did indeed matter. Since short mode is
56785      # case insensitive, let's make it lowercase to improve readability.
56786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56787      # Now convert it back to Unix-style (cygpath)
56788      input_path=`$CYGPATH -u "$shortmode_path"`
56789      new_path="$input_path"
56790    fi
56791  fi
56792
56793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56794  if test "x$test_cygdrive_prefix" = x; then
56795    # As a simple fix, exclude /usr/bin since it's not a real path.
56796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56798      # a path prefixed by /cygdrive for fixpath to work.
56799      new_path="$CYGWIN_ROOT_PATH$input_path"
56800    fi
56801  fi
56802
56803
56804  if test "x$path" != "x$new_path"; then
56805    FREETYPE_INCLUDE_PATH="$new_path"
56806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56807$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56808  fi
56809
56810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56811
56812  path="$FREETYPE_INCLUDE_PATH"
56813  has_colon=`$ECHO $path | $GREP ^.:`
56814  new_path="$path"
56815  if test "x$has_colon" = x; then
56816    # Not in mixed or Windows style, start by that.
56817    new_path=`cmd //c echo $path`
56818  fi
56819
56820
56821  input_path="$new_path"
56822  # Check if we need to convert this using DOS-style short mode. If the path
56823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56824  # take no chances and rewrite it.
56825  # Note: m4 eats our [], so we need to use [ and ] instead.
56826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56827  if test "x$has_forbidden_chars" != x; then
56828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56830  fi
56831
56832
56833  windows_path="$new_path"
56834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56835    unix_path=`$CYGPATH -u "$windows_path"`
56836    new_path="$unix_path"
56837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56839    new_path="$unix_path"
56840  fi
56841
56842  if test "x$path" != "x$new_path"; then
56843    FREETYPE_INCLUDE_PATH="$new_path"
56844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56845$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56846  fi
56847
56848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56850
56851    else
56852      # We're on a unix platform. Hooray! :)
56853      path="$FREETYPE_INCLUDE_PATH"
56854      has_space=`$ECHO "$path" | $GREP " "`
56855      if test "x$has_space" != x; then
56856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56857$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56858        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56859      fi
56860
56861      # Use eval to expand a potential ~
56862      eval path="$path"
56863      if test ! -f "$path" && test ! -d "$path"; then
56864        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56865      fi
56866
56867      if test -d "$path"; then
56868        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56869      else
56870        dir="`$DIRNAME "$path"`"
56871        base="`$BASENAME "$path"`"
56872        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56873      fi
56874    fi
56875  fi
56876
56877      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
56878        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
56879      else
56880        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
56881      fi
56882    fi
56883
56884    if test "x$FREETYPE_LIBS" = x; then
56885
56886  # Only process if variable expands to non-empty
56887
56888  if test "x$FREETYPE_LIB_PATH" != x; then
56889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56890
56891  # Input might be given as Windows format, start by converting to
56892  # unix format.
56893  path="$FREETYPE_LIB_PATH"
56894  new_path=`$CYGPATH -u "$path"`
56895
56896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56899  # "foo.exe" is OK but "foo" is an error.
56900  #
56901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56902  # It is also a way to make sure we got the proper file name for the real test later on.
56903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56904  if test "x$test_shortpath" = x; then
56905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56906$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56907    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
56908  fi
56909
56910  # Call helper function which possibly converts this using DOS-style short mode.
56911  # If so, the updated path is stored in $new_path.
56912
56913  input_path="$new_path"
56914  # Check if we need to convert this using DOS-style short mode. If the path
56915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56916  # take no chances and rewrite it.
56917  # Note: m4 eats our [], so we need to use [ and ] instead.
56918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56919  if test "x$has_forbidden_chars" != x; then
56920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56924      # Going to short mode and back again did indeed matter. Since short mode is
56925      # case insensitive, let's make it lowercase to improve readability.
56926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56927      # Now convert it back to Unix-style (cygpath)
56928      input_path=`$CYGPATH -u "$shortmode_path"`
56929      new_path="$input_path"
56930    fi
56931  fi
56932
56933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56934  if test "x$test_cygdrive_prefix" = x; then
56935    # As a simple fix, exclude /usr/bin since it's not a real path.
56936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56938      # a path prefixed by /cygdrive for fixpath to work.
56939      new_path="$CYGWIN_ROOT_PATH$input_path"
56940    fi
56941  fi
56942
56943
56944  if test "x$path" != "x$new_path"; then
56945    FREETYPE_LIB_PATH="$new_path"
56946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
56947$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56948  fi
56949
56950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56951
56952  path="$FREETYPE_LIB_PATH"
56953  has_colon=`$ECHO $path | $GREP ^.:`
56954  new_path="$path"
56955  if test "x$has_colon" = x; then
56956    # Not in mixed or Windows style, start by that.
56957    new_path=`cmd //c echo $path`
56958  fi
56959
56960
56961  input_path="$new_path"
56962  # Check if we need to convert this using DOS-style short mode. If the path
56963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56964  # take no chances and rewrite it.
56965  # Note: m4 eats our [], so we need to use [ and ] instead.
56966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56967  if test "x$has_forbidden_chars" != x; then
56968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56970  fi
56971
56972
56973  windows_path="$new_path"
56974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56975    unix_path=`$CYGPATH -u "$windows_path"`
56976    new_path="$unix_path"
56977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56979    new_path="$unix_path"
56980  fi
56981
56982  if test "x$path" != "x$new_path"; then
56983    FREETYPE_LIB_PATH="$new_path"
56984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
56985$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56986  fi
56987
56988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56990
56991    else
56992      # We're on a unix platform. Hooray! :)
56993      path="$FREETYPE_LIB_PATH"
56994      has_space=`$ECHO "$path" | $GREP " "`
56995      if test "x$has_space" != x; then
56996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56997$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56999      fi
57000
57001      # Use eval to expand a potential ~
57002      eval path="$path"
57003      if test ! -f "$path" && test ! -d "$path"; then
57004        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57005      fi
57006
57007      if test -d "$path"; then
57008        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57009      else
57010        dir="`$DIRNAME "$path"`"
57011        base="`$BASENAME "$path"`"
57012        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57013      fi
57014    fi
57015  fi
57016
57017      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57018        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57019      else
57020        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57021      fi
57022    fi
57023
57024    # Try to compile it
57025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57026$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57027    ac_ext=cpp
57028ac_cpp='$CXXCPP $CPPFLAGS'
57029ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57030ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57031ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57032
57033    PREV_CXXCFLAGS="$CXXFLAGS"
57034    PREV_LIBS="$LIBS"
57035    PREV_CXX="$CXX"
57036    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57037    LIBS="$LIBS $FREETYPE_LIBS"
57038    CXX="$FIXPATH $CXX"
57039    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57040/* end confdefs.h.  */
57041
57042          #include<ft2build.h>
57043          #include FT_FREETYPE_H
57044          int main () {
57045            FT_Init_FreeType(NULL);
57046            return 0;
57047          }
57048
57049_ACEOF
57050if ac_fn_cxx_try_link "$LINENO"; then :
57051
57052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57053$as_echo "yes" >&6; }
57054
57055else
57056
57057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57058$as_echo "no" >&6; }
57059          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57060$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57061          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57062$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57063
57064
57065  # Print a helpful message on how to acquire the necessary build dependency.
57066  # freetype is the help tag: freetype, cups, alsa etc
57067  MISSING_DEPENDENCY=freetype
57068
57069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57070    cygwin_help $MISSING_DEPENDENCY
57071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57072    msys_help $MISSING_DEPENDENCY
57073  else
57074    PKGHANDLER_COMMAND=
57075
57076    case $PKGHANDLER in
57077      apt-get)
57078        apt_help     $MISSING_DEPENDENCY ;;
57079      yum)
57080        yum_help     $MISSING_DEPENDENCY ;;
57081      port)
57082        port_help    $MISSING_DEPENDENCY ;;
57083      pkgutil)
57084        pkgutil_help $MISSING_DEPENDENCY ;;
57085      pkgadd)
57086        pkgadd_help  $MISSING_DEPENDENCY ;;
57087    esac
57088
57089    if test "x$PKGHANDLER_COMMAND" != x; then
57090      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57091    fi
57092  fi
57093
57094
57095          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57096
57097
57098fi
57099rm -f core conftest.err conftest.$ac_objext \
57100    conftest$ac_exeext conftest.$ac_ext
57101    CXXCFLAGS="$PREV_CXXFLAGS"
57102    LIBS="$PREV_LIBS"
57103    CXX="$PREV_CXX"
57104    ac_ext=cpp
57105ac_cpp='$CXXCPP $CPPFLAGS'
57106ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57107ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57108ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57109
57110
57111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
57112$as_echo_n "checking if we should bundle freetype... " >&6; }
57113    if test "x$BUNDLE_FREETYPE" = xyes; then
57114      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
57115    fi
57116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
57117$as_echo "$BUNDLE_FREETYPE" >&6; }
57118
57119  fi # end freetype needed
57120
57121
57122
57123
57124
57125
57126
57127# Check whether --with-alsa was given.
57128if test "${with_alsa+set}" = set; then :
57129  withval=$with_alsa;
57130fi
57131
57132
57133# Check whether --with-alsa-include was given.
57134if test "${with_alsa_include+set}" = set; then :
57135  withval=$with_alsa_include;
57136fi
57137
57138
57139# Check whether --with-alsa-lib was given.
57140if test "${with_alsa_lib+set}" = set; then :
57141  withval=$with_alsa_lib;
57142fi
57143
57144
57145  if test "x$NEEDS_LIB_ALSA" = xfalse; then
57146    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
57147        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
57148        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
57149      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
57150$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
57151    fi
57152    ALSA_CFLAGS=
57153    ALSA_LIBS=
57154  else
57155    ALSA_FOUND=no
57156
57157    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
57158      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
57159    fi
57160
57161    if test "x${with_alsa}" != x; then
57162      ALSA_LIBS="-L${with_alsa}/lib -lasound"
57163      ALSA_CFLAGS="-I${with_alsa}/include"
57164      ALSA_FOUND=yes
57165    fi
57166    if test "x${with_alsa_include}" != x; then
57167      ALSA_CFLAGS="-I${with_alsa_include}"
57168      ALSA_FOUND=yes
57169    fi
57170    if test "x${with_alsa_lib}" != x; then
57171      ALSA_LIBS="-L${with_alsa_lib} -lasound"
57172      ALSA_FOUND=yes
57173    fi
57174    # Do not try pkg-config if we have a sysroot set.
57175    if test "x$SYSROOT" = x; then
57176      if test "x$ALSA_FOUND" = xno; then
57177
57178pkg_failed=no
57179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
57180$as_echo_n "checking for ALSA... " >&6; }
57181
57182if test -n "$ALSA_CFLAGS"; then
57183    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
57184 elif test -n "$PKG_CONFIG"; then
57185    if test -n "$PKG_CONFIG" && \
57186    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57187  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57188  ac_status=$?
57189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57190  test $ac_status = 0; }; then
57191  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
57192else
57193  pkg_failed=yes
57194fi
57195 else
57196    pkg_failed=untried
57197fi
57198if test -n "$ALSA_LIBS"; then
57199    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
57200 elif test -n "$PKG_CONFIG"; then
57201    if test -n "$PKG_CONFIG" && \
57202    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57203  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57204  ac_status=$?
57205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57206  test $ac_status = 0; }; then
57207  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
57208else
57209  pkg_failed=yes
57210fi
57211 else
57212    pkg_failed=untried
57213fi
57214
57215
57216
57217if test $pkg_failed = yes; then
57218
57219if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57220        _pkg_short_errors_supported=yes
57221else
57222        _pkg_short_errors_supported=no
57223fi
57224        if test $_pkg_short_errors_supported = yes; then
57225	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
57226        else
57227	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
57228        fi
57229	# Put the nasty error message in config.log where it belongs
57230	echo "$ALSA_PKG_ERRORS" >&5
57231
57232	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57233$as_echo "no" >&6; }
57234                ALSA_FOUND=no
57235elif test $pkg_failed = untried; then
57236	ALSA_FOUND=no
57237else
57238	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
57239	ALSA_LIBS=$pkg_cv_ALSA_LIBS
57240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57241$as_echo "yes" >&6; }
57242	ALSA_FOUND=yes
57243fi
57244      fi
57245    fi
57246    if test "x$ALSA_FOUND" = xno; then
57247      for ac_header in alsa/asoundlib.h
57248do :
57249  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
57250if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
57251  cat >>confdefs.h <<_ACEOF
57252#define HAVE_ALSA_ASOUNDLIB_H 1
57253_ACEOF
57254
57255            ALSA_FOUND=yes
57256            ALSA_CFLAGS=-Iignoreme
57257            ALSA_LIBS=-lasound
57258            DEFAULT_ALSA=yes
57259
57260else
57261  ALSA_FOUND=no
57262
57263fi
57264
57265done
57266
57267    fi
57268    if test "x$ALSA_FOUND" = xno; then
57269
57270  # Print a helpful message on how to acquire the necessary build dependency.
57271  # alsa is the help tag: freetype, cups, alsa etc
57272  MISSING_DEPENDENCY=alsa
57273
57274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57275    cygwin_help $MISSING_DEPENDENCY
57276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57277    msys_help $MISSING_DEPENDENCY
57278  else
57279    PKGHANDLER_COMMAND=
57280
57281    case $PKGHANDLER in
57282      apt-get)
57283        apt_help     $MISSING_DEPENDENCY ;;
57284      yum)
57285        yum_help     $MISSING_DEPENDENCY ;;
57286      port)
57287        port_help    $MISSING_DEPENDENCY ;;
57288      pkgutil)
57289        pkgutil_help $MISSING_DEPENDENCY ;;
57290      pkgadd)
57291        pkgadd_help  $MISSING_DEPENDENCY ;;
57292    esac
57293
57294    if test "x$PKGHANDLER_COMMAND" != x; then
57295      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57296    fi
57297  fi
57298
57299      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
57300    fi
57301  fi
57302
57303
57304
57305
57306
57307
57308# Check whether --with-libffi was given.
57309if test "${with_libffi+set}" = set; then :
57310  withval=$with_libffi;
57311fi
57312
57313
57314# Check whether --with-libffi-include was given.
57315if test "${with_libffi_include+set}" = set; then :
57316  withval=$with_libffi_include;
57317fi
57318
57319
57320# Check whether --with-libffi-lib was given.
57321if test "${with_libffi_lib+set}" = set; then :
57322  withval=$with_libffi_lib;
57323fi
57324
57325
57326  if test "x$NEEDS_LIB_FFI" = xfalse; then
57327    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
57328        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
57329        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
57330      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
57331$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
57332    fi
57333    LIBFFI_CFLAGS=
57334    LIBFFI_LIBS=
57335  else
57336    LIBFFI_FOUND=no
57337
57338    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
57339      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
57340    fi
57341
57342    if test "x${with_libffi}" != x; then
57343      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
57344      LIBFFI_CFLAGS="-I${with_libffi}/include"
57345      LIBFFI_FOUND=yes
57346    fi
57347    if test "x${with_libffi_include}" != x; then
57348      LIBFFI_CFLAGS="-I${with_libffi_include}"
57349      LIBFFI_FOUND=yes
57350    fi
57351    if test "x${with_libffi_lib}" != x; then
57352      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
57353      LIBFFI_FOUND=yes
57354    fi
57355    # Do not try pkg-config if we have a sysroot set.
57356    if test "x$SYSROOT" = x; then
57357      if test "x$LIBFFI_FOUND" = xno; then
57358        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
57359
57360pkg_failed=no
57361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
57362$as_echo_n "checking for LIBFFI... " >&6; }
57363
57364if test -n "$LIBFFI_CFLAGS"; then
57365    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
57366 elif test -n "$PKG_CONFIG"; then
57367    if test -n "$PKG_CONFIG" && \
57368    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57369  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57370  ac_status=$?
57371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57372  test $ac_status = 0; }; then
57373  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
57374else
57375  pkg_failed=yes
57376fi
57377 else
57378    pkg_failed=untried
57379fi
57380if test -n "$LIBFFI_LIBS"; then
57381    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
57382 elif test -n "$PKG_CONFIG"; then
57383    if test -n "$PKG_CONFIG" && \
57384    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57385  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57386  ac_status=$?
57387  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57388  test $ac_status = 0; }; then
57389  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
57390else
57391  pkg_failed=yes
57392fi
57393 else
57394    pkg_failed=untried
57395fi
57396
57397
57398
57399if test $pkg_failed = yes; then
57400
57401if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57402        _pkg_short_errors_supported=yes
57403else
57404        _pkg_short_errors_supported=no
57405fi
57406        if test $_pkg_short_errors_supported = yes; then
57407	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
57408        else
57409	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
57410        fi
57411	# Put the nasty error message in config.log where it belongs
57412	echo "$LIBFFI_PKG_ERRORS" >&5
57413
57414	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57415$as_echo "no" >&6; }
57416                LIBFFI_FOUND=no
57417elif test $pkg_failed = untried; then
57418	LIBFFI_FOUND=no
57419else
57420	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
57421	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
57422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57423$as_echo "yes" >&6; }
57424	LIBFFI_FOUND=yes
57425fi
57426      fi
57427    fi
57428    if test "x$LIBFFI_FOUND" = xno; then
57429      for ac_header in ffi.h
57430do :
57431  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
57432if test "x$ac_cv_header_ffi_h" = xyes; then :
57433  cat >>confdefs.h <<_ACEOF
57434#define HAVE_FFI_H 1
57435_ACEOF
57436
57437            LIBFFI_FOUND=yes
57438            LIBFFI_CFLAGS=
57439            LIBFFI_LIBS=-lffi
57440
57441else
57442  LIBFFI_FOUND=no
57443
57444fi
57445
57446done
57447
57448    fi
57449    if test "x$LIBFFI_FOUND" = xno; then
57450
57451  # Print a helpful message on how to acquire the necessary build dependency.
57452  # ffi is the help tag: freetype, cups, alsa etc
57453  MISSING_DEPENDENCY=ffi
57454
57455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57456    cygwin_help $MISSING_DEPENDENCY
57457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57458    msys_help $MISSING_DEPENDENCY
57459  else
57460    PKGHANDLER_COMMAND=
57461
57462    case $PKGHANDLER in
57463      apt-get)
57464        apt_help     $MISSING_DEPENDENCY ;;
57465      yum)
57466        yum_help     $MISSING_DEPENDENCY ;;
57467      port)
57468        port_help    $MISSING_DEPENDENCY ;;
57469      pkgutil)
57470        pkgutil_help $MISSING_DEPENDENCY ;;
57471      pkgadd)
57472        pkgadd_help  $MISSING_DEPENDENCY ;;
57473    esac
57474
57475    if test "x$PKGHANDLER_COMMAND" != x; then
57476      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57477    fi
57478  fi
57479
57480      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
57481    fi
57482
57483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
57484$as_echo_n "checking if libffi works... " >&6; }
57485    ac_ext=c
57486ac_cpp='$CPP $CPPFLAGS'
57487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57489ac_compiler_gnu=$ac_cv_c_compiler_gnu
57490
57491    OLD_CFLAGS="$CFLAGS"
57492    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
57493    OLD_LIBS="$LIBS"
57494    LIBS="$LIBS $LIBFFI_LIBS"
57495    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57496/* end confdefs.h.  */
57497#include <ffi.h>
57498int
57499main ()
57500{
57501
57502          ffi_call(NULL, NULL, NULL, NULL);
57503          return 0;
57504
57505  ;
57506  return 0;
57507}
57508_ACEOF
57509if ac_fn_c_try_link "$LINENO"; then :
57510  LIBFFI_WORKS=yes
57511else
57512  LIBFFI_WORKS=no
57513
57514fi
57515rm -f core conftest.err conftest.$ac_objext \
57516    conftest$ac_exeext conftest.$ac_ext
57517    CFLAGS="$OLD_CFLAGS"
57518    LIBS="$OLD_LIBS"
57519    ac_ext=cpp
57520ac_cpp='$CXXCPP $CPPFLAGS'
57521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57522ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57524
57525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
57526$as_echo "$LIBFFI_WORKS" >&6; }
57527
57528    if test "x$LIBFFI_WORKS" = xno; then
57529
57530  # Print a helpful message on how to acquire the necessary build dependency.
57531  # ffi is the help tag: freetype, cups, alsa etc
57532  MISSING_DEPENDENCY=ffi
57533
57534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57535    cygwin_help $MISSING_DEPENDENCY
57536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57537    msys_help $MISSING_DEPENDENCY
57538  else
57539    PKGHANDLER_COMMAND=
57540
57541    case $PKGHANDLER in
57542      apt-get)
57543        apt_help     $MISSING_DEPENDENCY ;;
57544      yum)
57545        yum_help     $MISSING_DEPENDENCY ;;
57546      port)
57547        port_help    $MISSING_DEPENDENCY ;;
57548      pkgutil)
57549        pkgutil_help $MISSING_DEPENDENCY ;;
57550      pkgadd)
57551        pkgadd_help  $MISSING_DEPENDENCY ;;
57552    esac
57553
57554    if test "x$PKGHANDLER_COMMAND" != x; then
57555      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57556    fi
57557  fi
57558
57559      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
57560    fi
57561  fi
57562
57563
57564
57565
57566
57567  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
57568    # Extract the first word of "llvm-config", so it can be a program name with args.
57569set dummy llvm-config; ac_word=$2
57570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57571$as_echo_n "checking for $ac_word... " >&6; }
57572if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
57573  $as_echo_n "(cached) " >&6
57574else
57575  if test -n "$LLVM_CONFIG"; then
57576  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
57577else
57578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57579for as_dir in $PATH
57580do
57581  IFS=$as_save_IFS
57582  test -z "$as_dir" && as_dir=.
57583    for ac_exec_ext in '' $ac_executable_extensions; do
57584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57585    ac_cv_prog_LLVM_CONFIG="llvm-config"
57586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57587    break 2
57588  fi
57589done
57590  done
57591IFS=$as_save_IFS
57592
57593fi
57594fi
57595LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
57596if test -n "$LLVM_CONFIG"; then
57597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
57598$as_echo "$LLVM_CONFIG" >&6; }
57599else
57600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57601$as_echo "no" >&6; }
57602fi
57603
57604
57605
57606    if test "x$LLVM_CONFIG" != xllvm-config; then
57607      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
57608    fi
57609
57610    llvm_components="jit mcjit engine nativecodegen native"
57611    unset LLVM_CFLAGS
57612    for flag in $("$LLVM_CONFIG" --cxxflags); do
57613      if echo "${flag}" | grep -q '^-[ID]'; then
57614        if test "${flag}" != "-D_DEBUG" ; then
57615          if test "${LLVM_CFLAGS}" != "" ; then
57616            LLVM_CFLAGS="${LLVM_CFLAGS} "
57617          fi
57618          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
57619        fi
57620      fi
57621    done
57622    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
57623    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
57624
57625    unset LLVM_LDFLAGS
57626    for flag in $("${LLVM_CONFIG}" --ldflags); do
57627      if echo "${flag}" | grep -q '^-L'; then
57628        if test "${LLVM_LDFLAGS}" != ""; then
57629          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
57630        fi
57631        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
57632      fi
57633    done
57634
57635    unset LLVM_LIBS
57636    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
57637      if echo "${flag}" | grep -q '^-l'; then
57638        if test "${LLVM_LIBS}" != ""; then
57639          LLVM_LIBS="${LLVM_LIBS} "
57640        fi
57641        LLVM_LIBS="${LLVM_LIBS}${flag}"
57642      fi
57643    done
57644
57645    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
57646    # always properly detect -ltinfo
57647    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
57648
57649
57650
57651
57652  fi
57653
57654
57655
57656# Check whether --with-libjpeg was given.
57657if test "${with_libjpeg+set}" = set; then :
57658  withval=$with_libjpeg;
57659fi
57660
57661
57662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
57663$as_echo_n "checking for which libjpeg to use... " >&6; }
57664  # default is bundled
57665  DEFAULT_LIBJPEG=bundled
57666  # if user didn't specify, use DEFAULT_LIBJPEG
57667  if test "x${with_libjpeg}" = "x"; then
57668    with_libjpeg=${DEFAULT_LIBJPEG}
57669  fi
57670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
57671$as_echo "${with_libjpeg}" >&6; }
57672
57673  if test "x${with_libjpeg}" = "xbundled"; then
57674    USE_EXTERNAL_LIBJPEG=false
57675  elif test "x${with_libjpeg}" = "xsystem"; then
57676    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
57677if test "x$ac_cv_header_jpeglib_h" = xyes; then :
57678
57679else
57680   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
57681fi
57682
57683
57684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
57685$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
57686if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
57687  $as_echo_n "(cached) " >&6
57688else
57689  ac_check_lib_save_LIBS=$LIBS
57690LIBS="-ljpeg  $LIBS"
57691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57692/* end confdefs.h.  */
57693
57694/* Override any GCC internal prototype to avoid an error.
57695   Use char because int might match the return type of a GCC
57696   builtin and then its argument prototype would still apply.  */
57697#ifdef __cplusplus
57698extern "C"
57699#endif
57700char jpeg_CreateDecompress ();
57701int
57702main ()
57703{
57704return jpeg_CreateDecompress ();
57705  ;
57706  return 0;
57707}
57708_ACEOF
57709if ac_fn_cxx_try_link "$LINENO"; then :
57710  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
57711else
57712  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
57713fi
57714rm -f core conftest.err conftest.$ac_objext \
57715    conftest$ac_exeext conftest.$ac_ext
57716LIBS=$ac_check_lib_save_LIBS
57717fi
57718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
57719$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
57720if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
57721  cat >>confdefs.h <<_ACEOF
57722#define HAVE_LIBJPEG 1
57723_ACEOF
57724
57725  LIBS="-ljpeg $LIBS"
57726
57727else
57728   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
57729fi
57730
57731
57732    USE_EXTERNAL_LIBJPEG=true
57733  else
57734    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
57735  fi
57736
57737
57738
57739
57740
57741# Check whether --with-giflib was given.
57742if test "${with_giflib+set}" = set; then :
57743  withval=$with_giflib;
57744fi
57745
57746
57747  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
57748$as_echo_n "checking for which giflib to use... " >&6; }
57749  # default is bundled
57750  DEFAULT_GIFLIB=bundled
57751  # if user didn't specify, use DEFAULT_GIFLIB
57752  if test "x${with_giflib}" = "x"; then
57753    with_giflib=${DEFAULT_GIFLIB}
57754  fi
57755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
57756$as_echo "${with_giflib}" >&6; }
57757
57758  if test "x${with_giflib}" = "xbundled"; then
57759    USE_EXTERNAL_LIBGIF=false
57760  elif test "x${with_giflib}" = "xsystem"; then
57761    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
57762if test "x$ac_cv_header_gif_lib_h" = xyes; then :
57763
57764else
57765   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
57766fi
57767
57768
57769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
57770$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
57771if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
57772  $as_echo_n "(cached) " >&6
57773else
57774  ac_check_lib_save_LIBS=$LIBS
57775LIBS="-lgif  $LIBS"
57776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57777/* end confdefs.h.  */
57778
57779/* Override any GCC internal prototype to avoid an error.
57780   Use char because int might match the return type of a GCC
57781   builtin and then its argument prototype would still apply.  */
57782#ifdef __cplusplus
57783extern "C"
57784#endif
57785char DGifGetCode ();
57786int
57787main ()
57788{
57789return DGifGetCode ();
57790  ;
57791  return 0;
57792}
57793_ACEOF
57794if ac_fn_cxx_try_link "$LINENO"; then :
57795  ac_cv_lib_gif_DGifGetCode=yes
57796else
57797  ac_cv_lib_gif_DGifGetCode=no
57798fi
57799rm -f core conftest.err conftest.$ac_objext \
57800    conftest$ac_exeext conftest.$ac_ext
57801LIBS=$ac_check_lib_save_LIBS
57802fi
57803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
57804$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
57805if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
57806  cat >>confdefs.h <<_ACEOF
57807#define HAVE_LIBGIF 1
57808_ACEOF
57809
57810  LIBS="-lgif $LIBS"
57811
57812else
57813   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
57814fi
57815
57816
57817    USE_EXTERNAL_LIBGIF=true
57818  else
57819    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
57820  fi
57821
57822
57823
57824
57825
57826# Check whether --with-libpng was given.
57827if test "${with_libpng+set}" = set; then :
57828  withval=$with_libpng;
57829fi
57830
57831
57832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
57833$as_echo_n "checking for which libpng to use... " >&6; }
57834
57835  # default is bundled
57836  DEFAULT_LIBPNG=bundled
57837  # if user didn't specify, use DEFAULT_LIBPNG
57838  if test "x${with_libpng}" = "x"; then
57839      with_libpng=${DEFAULT_LIBPNG}
57840  fi
57841
57842  if test "x${with_libpng}" = "xbundled"; then
57843      USE_EXTERNAL_LIBPNG=false
57844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
57845$as_echo "bundled" >&6; }
57846  elif test "x${with_libpng}" = "xsystem"; then
57847
57848pkg_failed=no
57849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
57850$as_echo_n "checking for PNG... " >&6; }
57851
57852if test -n "$PNG_CFLAGS"; then
57853    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
57854 elif test -n "$PKG_CONFIG"; then
57855    if test -n "$PKG_CONFIG" && \
57856    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
57857  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
57858  ac_status=$?
57859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57860  test $ac_status = 0; }; then
57861  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
57862else
57863  pkg_failed=yes
57864fi
57865 else
57866    pkg_failed=untried
57867fi
57868if test -n "$PNG_LIBS"; then
57869    pkg_cv_PNG_LIBS="$PNG_LIBS"
57870 elif test -n "$PKG_CONFIG"; then
57871    if test -n "$PKG_CONFIG" && \
57872    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
57873  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
57874  ac_status=$?
57875  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57876  test $ac_status = 0; }; then
57877  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
57878else
57879  pkg_failed=yes
57880fi
57881 else
57882    pkg_failed=untried
57883fi
57884
57885
57886
57887if test $pkg_failed = yes; then
57888
57889if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57890        _pkg_short_errors_supported=yes
57891else
57892        _pkg_short_errors_supported=no
57893fi
57894        if test $_pkg_short_errors_supported = yes; then
57895	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
57896        else
57897	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
57898        fi
57899	# Put the nasty error message in config.log where it belongs
57900	echo "$PNG_PKG_ERRORS" >&5
57901
57902	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57903$as_echo "no" >&6; }
57904                 LIBPNG_FOUND=no
57905elif test $pkg_failed = untried; then
57906	 LIBPNG_FOUND=no
57907else
57908	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
57909	PNG_LIBS=$pkg_cv_PNG_LIBS
57910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57911$as_echo "yes" >&6; }
57912	 LIBPNG_FOUND=yes
57913fi
57914      if test "x${LIBPNG_FOUND}" = "xyes"; then
57915          USE_EXTERNAL_LIBPNG=true
57916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
57917$as_echo "system" >&6; }
57918      else
57919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
57920$as_echo "system not found" >&6; }
57921          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
57922      fi
57923  else
57924      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
57925  fi
57926
57927
57928
57929
57930
57931# Check whether --with-zlib was given.
57932if test "${with_zlib+set}" = set; then :
57933  withval=$with_zlib;
57934fi
57935
57936
57937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
57938$as_echo_n "checking for compress in -lz... " >&6; }
57939if ${ac_cv_lib_z_compress+:} false; then :
57940  $as_echo_n "(cached) " >&6
57941else
57942  ac_check_lib_save_LIBS=$LIBS
57943LIBS="-lz  $LIBS"
57944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57945/* end confdefs.h.  */
57946
57947/* Override any GCC internal prototype to avoid an error.
57948   Use char because int might match the return type of a GCC
57949   builtin and then its argument prototype would still apply.  */
57950#ifdef __cplusplus
57951extern "C"
57952#endif
57953char compress ();
57954int
57955main ()
57956{
57957return compress ();
57958  ;
57959  return 0;
57960}
57961_ACEOF
57962if ac_fn_cxx_try_link "$LINENO"; then :
57963  ac_cv_lib_z_compress=yes
57964else
57965  ac_cv_lib_z_compress=no
57966fi
57967rm -f core conftest.err conftest.$ac_objext \
57968    conftest$ac_exeext conftest.$ac_ext
57969LIBS=$ac_check_lib_save_LIBS
57970fi
57971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
57972$as_echo "$ac_cv_lib_z_compress" >&6; }
57973if test "x$ac_cv_lib_z_compress" = xyes; then :
57974   ZLIB_FOUND=yes
57975else
57976   ZLIB_FOUND=no
57977fi
57978
57979
57980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
57981$as_echo_n "checking for which zlib to use... " >&6; }
57982
57983  DEFAULT_ZLIB=bundled
57984  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
57985    # On macosx default is system...on others default is bundled
57986    DEFAULT_ZLIB=system
57987  fi
57988
57989  if test "x${ZLIB_FOUND}" != "xyes"; then
57990    # If we don't find any system...set default to bundled
57991    DEFAULT_ZLIB=bundled
57992  fi
57993
57994  # If user didn't specify, use DEFAULT_ZLIB
57995  if test "x${with_zlib}" = "x"; then
57996    with_zlib=${DEFAULT_ZLIB}
57997  fi
57998
57999  if test "x${with_zlib}" = "xbundled"; then
58000    USE_EXTERNAL_LIBZ=false
58001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58002$as_echo "bundled" >&6; }
58003  elif test "x${with_zlib}" = "xsystem"; then
58004    if test "x${ZLIB_FOUND}" = "xyes"; then
58005      USE_EXTERNAL_LIBZ=true
58006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58007$as_echo "system" >&6; }
58008    else
58009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58010$as_echo "system not found" >&6; }
58011      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58012    fi
58013  else
58014    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58015  fi
58016
58017
58018
58019
58020
58021# Check whether --with-lcms was given.
58022if test "${with_lcms+set}" = set; then :
58023  withval=$with_lcms;
58024fi
58025
58026
58027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58028$as_echo_n "checking for which lcms to use... " >&6; }
58029
58030  DEFAULT_LCMS=bundled
58031  # If user didn't specify, use DEFAULT_LCMS
58032  if test "x${with_lcms}" = "x"; then
58033      with_lcms=${DEFAULT_LCMS}
58034  fi
58035
58036  if test "x${with_lcms}" = "xbundled"; then
58037    USE_EXTERNAL_LCMS=false
58038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58039$as_echo "bundled" >&6; }
58040  elif test "x${with_lcms}" = "xsystem"; then
58041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58042$as_echo "system" >&6; }
58043
58044pkg_failed=no
58045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58046$as_echo_n "checking for LCMS... " >&6; }
58047
58048if test -n "$LCMS_CFLAGS"; then
58049    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58050 elif test -n "$PKG_CONFIG"; then
58051    if test -n "$PKG_CONFIG" && \
58052    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58053  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58054  ac_status=$?
58055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58056  test $ac_status = 0; }; then
58057  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58058else
58059  pkg_failed=yes
58060fi
58061 else
58062    pkg_failed=untried
58063fi
58064if test -n "$LCMS_LIBS"; then
58065    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58066 elif test -n "$PKG_CONFIG"; then
58067    if test -n "$PKG_CONFIG" && \
58068    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58069  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58070  ac_status=$?
58071  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58072  test $ac_status = 0; }; then
58073  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58074else
58075  pkg_failed=yes
58076fi
58077 else
58078    pkg_failed=untried
58079fi
58080
58081
58082
58083if test $pkg_failed = yes; then
58084
58085if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58086        _pkg_short_errors_supported=yes
58087else
58088        _pkg_short_errors_supported=no
58089fi
58090        if test $_pkg_short_errors_supported = yes; then
58091	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58092        else
58093	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58094        fi
58095	# Put the nasty error message in config.log where it belongs
58096	echo "$LCMS_PKG_ERRORS" >&5
58097
58098	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58099$as_echo "no" >&6; }
58100                LCMS_FOUND=no
58101elif test $pkg_failed = untried; then
58102	LCMS_FOUND=no
58103else
58104	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
58105	LCMS_LIBS=$pkg_cv_LCMS_LIBS
58106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58107$as_echo "yes" >&6; }
58108	LCMS_FOUND=yes
58109fi
58110    if test "x${LCMS_FOUND}" = "xyes"; then
58111      USE_EXTERNAL_LCMS=true
58112    else
58113      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
58114    fi
58115  else
58116    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
58117  fi
58118
58119
58120
58121
58122
58123
58124
58125
58126
58127
58128
58129  # Setup libm (the maths library)
58130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
58131$as_echo_n "checking for cos in -lm... " >&6; }
58132if ${ac_cv_lib_m_cos+:} false; then :
58133  $as_echo_n "(cached) " >&6
58134else
58135  ac_check_lib_save_LIBS=$LIBS
58136LIBS="-lm  $LIBS"
58137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58138/* end confdefs.h.  */
58139
58140/* Override any GCC internal prototype to avoid an error.
58141   Use char because int might match the return type of a GCC
58142   builtin and then its argument prototype would still apply.  */
58143#ifdef __cplusplus
58144extern "C"
58145#endif
58146char cos ();
58147int
58148main ()
58149{
58150return cos ();
58151  ;
58152  return 0;
58153}
58154_ACEOF
58155if ac_fn_cxx_try_link "$LINENO"; then :
58156  ac_cv_lib_m_cos=yes
58157else
58158  ac_cv_lib_m_cos=no
58159fi
58160rm -f core conftest.err conftest.$ac_objext \
58161    conftest$ac_exeext conftest.$ac_ext
58162LIBS=$ac_check_lib_save_LIBS
58163fi
58164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
58165$as_echo "$ac_cv_lib_m_cos" >&6; }
58166if test "x$ac_cv_lib_m_cos" = xyes; then :
58167  cat >>confdefs.h <<_ACEOF
58168#define HAVE_LIBM 1
58169_ACEOF
58170
58171  LIBS="-lm $LIBS"
58172
58173else
58174
58175      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
58176$as_echo "$as_me: Maths library was not found" >&6;}
58177
58178fi
58179
58180  LIBM=-lm
58181
58182
58183  # Setup libdl (for dynamic library loading)
58184  save_LIBS="$LIBS"
58185  LIBS=""
58186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
58187$as_echo_n "checking for dlopen in -ldl... " >&6; }
58188if ${ac_cv_lib_dl_dlopen+:} false; then :
58189  $as_echo_n "(cached) " >&6
58190else
58191  ac_check_lib_save_LIBS=$LIBS
58192LIBS="-ldl  $LIBS"
58193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58194/* end confdefs.h.  */
58195
58196/* Override any GCC internal prototype to avoid an error.
58197   Use char because int might match the return type of a GCC
58198   builtin and then its argument prototype would still apply.  */
58199#ifdef __cplusplus
58200extern "C"
58201#endif
58202char dlopen ();
58203int
58204main ()
58205{
58206return dlopen ();
58207  ;
58208  return 0;
58209}
58210_ACEOF
58211if ac_fn_cxx_try_link "$LINENO"; then :
58212  ac_cv_lib_dl_dlopen=yes
58213else
58214  ac_cv_lib_dl_dlopen=no
58215fi
58216rm -f core conftest.err conftest.$ac_objext \
58217    conftest$ac_exeext conftest.$ac_ext
58218LIBS=$ac_check_lib_save_LIBS
58219fi
58220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
58221$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
58222if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
58223  cat >>confdefs.h <<_ACEOF
58224#define HAVE_LIBDL 1
58225_ACEOF
58226
58227  LIBS="-ldl $LIBS"
58228
58229fi
58230
58231  LIBDL="$LIBS"
58232
58233  LIBS="$save_LIBS"
58234
58235  # Deprecated libraries, keep the flags for backwards compatibility
58236  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
58237
58238
58239# Check whether --with-dxsdk was given.
58240if test "${with_dxsdk+set}" = set; then :
58241  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
58242$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
58243fi
58244
58245
58246
58247
58248# Check whether --with-dxsdk-lib was given.
58249if test "${with_dxsdk_lib+set}" = set; then :
58250  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
58251$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
58252fi
58253
58254
58255
58256
58257# Check whether --with-dxsdk-include was given.
58258if test "${with_dxsdk_include+set}" = set; then :
58259  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
58260$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
58261fi
58262
58263
58264  fi
58265
58266  # Control if libzip can use mmap. Available for purposes of overriding.
58267  LIBZIP_CAN_USE_MMAP=true
58268
58269
58270
58271
58272
58273
58274
58275
58276
58277
58278
58279
58280
58281
58282###############################################################################
58283#
58284# We need to do some final tweaking, when everything else is done.
58285#
58286###############################################################################
58287
58288
58289  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
58290
58291
58292
58293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
58294$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
58295
58296  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
58297    ENABLE_INTREE_EC=yes
58298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58299$as_echo "yes" >&6; }
58300  else
58301    ENABLE_INTREE_EC=no
58302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58303$as_echo "no" >&6; }
58304  fi
58305
58306
58307
58308
58309###############################################################################
58310#
58311# Configure parts of the build that only affect the build performance,
58312# not the result.
58313#
58314###############################################################################
58315
58316
58317  # How many cores do we have on this build system?
58318
58319# Check whether --with-num-cores was given.
58320if test "${with_num_cores+set}" = set; then :
58321  withval=$with_num_cores;
58322fi
58323
58324  if test "x$with_num_cores" = x; then
58325    # The number of cores were not specified, try to probe them.
58326
58327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
58328$as_echo_n "checking for number of cores... " >&6; }
58329  NUM_CORES=1
58330  FOUND_CORES=no
58331
58332  if test -f /proc/cpuinfo; then
58333    # Looks like a Linux (or cygwin) system
58334    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
58335    FOUND_CORES=yes
58336  elif test -x /usr/sbin/psrinfo; then
58337    # Looks like a Solaris system
58338    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
58339    FOUND_CORES=yes
58340  elif test -x /usr/sbin/sysctl; then
58341    # Looks like a MacOSX system
58342    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
58343    FOUND_CORES=yes
58344  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
58345    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
58346    FOUND_CORES=yes
58347  elif test -n "$NUMBER_OF_PROCESSORS"; then
58348    # On windows, look in the env
58349    NUM_CORES=$NUMBER_OF_PROCESSORS
58350    FOUND_CORES=yes
58351  fi
58352
58353  if test "x$FOUND_CORES" = xyes; then
58354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
58355$as_echo "$NUM_CORES" >&6; }
58356  else
58357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
58358$as_echo "could not detect number of cores, defaulting to 1" >&6; }
58359    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
58360$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
58361  fi
58362
58363  else
58364    NUM_CORES=$with_num_cores
58365  fi
58366
58367
58368
58369  # How much memory do we have on this build system?
58370
58371# Check whether --with-memory-size was given.
58372if test "${with_memory_size+set}" = set; then :
58373  withval=$with_memory_size;
58374fi
58375
58376  if test "x$with_memory_size" = x; then
58377    # The memory size was not specified, try to probe it.
58378
58379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
58380$as_echo_n "checking for memory size... " >&6; }
58381  # Default to 1024 MB
58382  MEMORY_SIZE=1024
58383  FOUND_MEM=no
58384
58385  if test -f /proc/meminfo; then
58386    # Looks like a Linux (or cygwin) system
58387    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
58388    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
58389    FOUND_MEM=yes
58390  elif test -x /usr/sbin/prtconf; then
58391    # Looks like a Solaris or AIX system
58392    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
58393    FOUND_MEM=yes
58394  elif test -x /usr/sbin/sysctl; then
58395    # Looks like a MacOSX system
58396    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
58397    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58398    FOUND_MEM=yes
58399  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
58400    # Windows, but without cygwin
58401    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
58402    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58403    FOUND_MEM=yes
58404  fi
58405
58406  if test "x$FOUND_MEM" = xyes; then
58407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
58408$as_echo "$MEMORY_SIZE MB" >&6; }
58409  else
58410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
58411$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
58412    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
58413$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
58414  fi
58415
58416  else
58417    MEMORY_SIZE=$with_memory_size
58418  fi
58419
58420
58421
58422  # Provide a decent default number of parallel jobs for make depending on
58423  # number of cores, amount of memory and machine architecture.
58424
58425# Check whether --with-jobs was given.
58426if test "${with_jobs+set}" = set; then :
58427  withval=$with_jobs;
58428fi
58429
58430  if test "x$with_jobs" = x; then
58431    # Number of jobs was not specified, calculate.
58432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
58433$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
58434    # Approximate memory in GB.
58435    memory_gb=`expr $MEMORY_SIZE / 1024`
58436    # Pick the lowest of memory in gb and number of cores.
58437    if test "$memory_gb" -lt "$NUM_CORES"; then
58438      JOBS="$memory_gb"
58439    else
58440      JOBS="$NUM_CORES"
58441    fi
58442    if test "$JOBS" -eq "0"; then
58443      JOBS=1
58444    fi
58445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
58446$as_echo "$JOBS" >&6; }
58447  else
58448    JOBS=$with_jobs
58449  fi
58450
58451
58452
58453  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
58454
58455# Check whether --with-test-jobs was given.
58456if test "${with_test_jobs+set}" = set; then :
58457  withval=$with_test_jobs;
58458fi
58459
58460  if test "x$with_test_jobs" = x; then
58461      TEST_JOBS=0
58462  else
58463      TEST_JOBS=$with_test_jobs
58464  fi
58465
58466
58467
58468# Setup arguments for the boot jdk (after cores and memory have been setup)
58469
58470  ##############################################################################
58471  #
58472  # Specify jvm options for anything that is run with the Boot JDK.
58473  # Not all JVM:s accept the same arguments on the command line.
58474  #
58475
58476# Check whether --with-boot-jdk-jvmargs was given.
58477if test "${with_boot_jdk_jvmargs+set}" = set; then :
58478  withval=$with_boot_jdk_jvmargs;
58479fi
58480
58481
58482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
58483$as_echo_n "checking flags for boot jdk java command ... " >&6; }
58484
58485  # Disable special log output when a debug build is used as Boot JDK...
58486
58487  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
58488  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
58489  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
58490  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58491  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58492  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58493    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
58494    JVM_ARG_OK=true
58495  else
58496    $ECHO "Arg failed:" >&5
58497    $ECHO "$OUTPUT" >&5
58498    JVM_ARG_OK=false
58499  fi
58500
58501
58502  # Apply user provided options.
58503
58504  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
58505  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
58506  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
58507  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58508  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58509  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58510    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
58511    JVM_ARG_OK=true
58512  else
58513    $ECHO "Arg failed:" >&5
58514    $ECHO "$OUTPUT" >&5
58515    JVM_ARG_OK=false
58516  fi
58517
58518
58519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
58520$as_echo "$boot_jdk_jvmargs" >&6; }
58521
58522  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
58523  JAVA_FLAGS=$boot_jdk_jvmargs
58524
58525
58526
58527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
58528$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
58529
58530  # Starting amount of heap memory.
58531
58532  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
58533  $ECHO "Command: $JAVA -Xms64M -version" >&5
58534  OUTPUT=`$JAVA -Xms64M -version 2>&1`
58535  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58536  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58537  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58538    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
58539    JVM_ARG_OK=true
58540  else
58541    $ECHO "Arg failed:" >&5
58542    $ECHO "$OUTPUT" >&5
58543    JVM_ARG_OK=false
58544  fi
58545
58546
58547  # Maximum amount of heap memory.
58548  # Maximum stack size.
58549  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
58550  if test "x$BOOT_JDK_BITS" = "x32"; then
58551    if test "$JVM_MAX_HEAP" -gt "1100"; then
58552      JVM_MAX_HEAP=1100
58553    elif test "$JVM_MAX_HEAP" -lt "512"; then
58554      JVM_MAX_HEAP=512
58555    fi
58556    STACK_SIZE=768
58557  else
58558    # Running a 64 bit JVM allows for and requires a bigger heap
58559    if test "$JVM_MAX_HEAP" -gt "1600"; then
58560      JVM_MAX_HEAP=1600
58561    elif test "$JVM_MAX_HEAP" -lt "512"; then
58562      JVM_MAX_HEAP=512
58563    fi
58564    STACK_SIZE=1536
58565  fi
58566
58567  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
58568  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
58569  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
58570  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58571  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58572  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58573    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
58574    JVM_ARG_OK=true
58575  else
58576    $ECHO "Arg failed:" >&5
58577    $ECHO "$OUTPUT" >&5
58578    JVM_ARG_OK=false
58579  fi
58580
58581
58582  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
58583  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
58584  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
58585  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58586  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58587  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58588    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
58589    JVM_ARG_OK=true
58590  else
58591    $ECHO "Arg failed:" >&5
58592    $ECHO "$OUTPUT" >&5
58593    JVM_ARG_OK=false
58594  fi
58595
58596
58597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
58598$as_echo "$boot_jdk_jvmargs_big" >&6; }
58599
58600  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
58601
58602
58603  # By default, the main javac compilations use big
58604  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
58605
58606
58607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
58608$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
58609
58610  # Use serial gc for small short lived tools if possible
58611
58612  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
58613  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
58614  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
58615  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58616  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58617  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58618    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
58619    JVM_ARG_OK=true
58620  else
58621    $ECHO "Arg failed:" >&5
58622    $ECHO "$OUTPUT" >&5
58623    JVM_ARG_OK=false
58624  fi
58625
58626
58627  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
58628  $ECHO "Command: $JAVA -Xms32M -version" >&5
58629  OUTPUT=`$JAVA -Xms32M -version 2>&1`
58630  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58631  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58632  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58633    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
58634    JVM_ARG_OK=true
58635  else
58636    $ECHO "Arg failed:" >&5
58637    $ECHO "$OUTPUT" >&5
58638    JVM_ARG_OK=false
58639  fi
58640
58641
58642  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
58643  $ECHO "Command: $JAVA -Xmx512M -version" >&5
58644  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
58645  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58646  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58647  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58648    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
58649    JVM_ARG_OK=true
58650  else
58651    $ECHO "Arg failed:" >&5
58652    $ECHO "$OUTPUT" >&5
58653    JVM_ARG_OK=false
58654  fi
58655
58656
58657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
58658$as_echo "$boot_jdk_jvmargs_small" >&6; }
58659
58660  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
58661
58662
58663  JAVA_TOOL_FLAGS_SMALL=""
58664  for f in $JAVA_FLAGS_SMALL; do
58665    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
58666  done
58667
58668
58669
58670# Setup smart javac (after cores and memory have been setup)
58671
58672
58673# Check whether --with-sjavac-server-java was given.
58674if test "${with_sjavac_server_java+set}" = set; then :
58675  withval=$with_sjavac_server_java;
58676fi
58677
58678
58679  if test "x$with_sjavac_server_java" != x; then
58680    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
58681    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
58682    if test "x$FOUND_VERSION" = x; then
58683      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
58684    fi
58685  else
58686    SJAVAC_SERVER_JAVA="$JAVA"
58687  fi
58688
58689
58690  if test "$MEMORY_SIZE" -gt "3000"; then
58691
58692  $ECHO "Check if jvm arg is ok: -d64" >&5
58693  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
58694  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
58695  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58696  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58697  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58698    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
58699    JVM_ARG_OK=true
58700  else
58701    $ECHO "Arg failed:" >&5
58702    $ECHO "$OUTPUT" >&5
58703    JVM_ARG_OK=false
58704  fi
58705
58706    if test "$JVM_ARG_OK" = true; then
58707      JVM_64BIT=true
58708      JVM_ARG_OK=false
58709    fi
58710  fi
58711
58712  MX_VALUE=`expr $MEMORY_SIZE / 2`
58713  if test "$JVM_64BIT" = true; then
58714    # Set ms lower than mx since more than one instance of the server might
58715    # get launched at the same time before they figure out which instance won.
58716    MS_VALUE=512
58717    if test "$MX_VALUE" -gt "2048"; then
58718      MX_VALUE=2048
58719    fi
58720  else
58721    MS_VALUE=256
58722    if test "$MX_VALUE" -gt "1500"; then
58723      MX_VALUE=1500
58724    fi
58725  fi
58726  if test "$MX_VALUE" -lt "512"; then
58727    MX_VALUE=512
58728  fi
58729
58730  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
58731  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
58732  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
58733  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58734  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58735  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58736    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
58737    JVM_ARG_OK=true
58738  else
58739    $ECHO "Arg failed:" >&5
58740    $ECHO "$OUTPUT" >&5
58741    JVM_ARG_OK=false
58742  fi
58743
58744
58745
58746  # Check whether --enable-sjavac was given.
58747if test "${enable_sjavac+set}" = set; then :
58748  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
58749else
58750  ENABLE_SJAVAC="no"
58751fi
58752
58753  if test "x$JVM_ARG_OK" = "xfalse"; then
58754    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
58755$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
58756    ENABLE_SJAVAC="no"
58757  fi
58758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
58759$as_echo_n "checking whether to use sjavac... " >&6; }
58760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
58761$as_echo "$ENABLE_SJAVAC" >&6; }
58762
58763
58764  # Check whether --enable-javac-server was given.
58765if test "${enable_javac_server+set}" = set; then :
58766  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
58767else
58768  ENABLE_JAVAC_SERVER="yes"
58769fi
58770
58771  if test "x$JVM_ARG_OK" = "xfalse"; then
58772    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
58773$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
58774    ENABLE_JAVAC_SERVER="no"
58775  fi
58776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
58777$as_echo_n "checking whether to use javac server... " >&6; }
58778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
58779$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
58780
58781
58782  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
58783    # When using a server javac, the small client instances do not need much
58784    # resources.
58785    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
58786  fi
58787
58788
58789# Setup use of icecc if requested
58790
58791  # Check whether --enable-icecc was given.
58792if test "${enable_icecc+set}" = set; then :
58793  enableval=$enable_icecc;
58794fi
58795
58796
58797  if test "x${enable_icecc}" = "xyes"; then
58798
58799
58800
58801  # Publish this variable in the help.
58802
58803
58804  if [ -z "${ICECC_CMD+x}" ]; then
58805    # The variable is not set by user, try to locate tool using the code snippet
58806    for ac_prog in icecc
58807do
58808  # Extract the first word of "$ac_prog", so it can be a program name with args.
58809set dummy $ac_prog; ac_word=$2
58810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58811$as_echo_n "checking for $ac_word... " >&6; }
58812if ${ac_cv_path_ICECC_CMD+:} false; then :
58813  $as_echo_n "(cached) " >&6
58814else
58815  case $ICECC_CMD in
58816  [\\/]* | ?:[\\/]*)
58817  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
58818  ;;
58819  *)
58820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58821for as_dir in $PATH
58822do
58823  IFS=$as_save_IFS
58824  test -z "$as_dir" && as_dir=.
58825    for ac_exec_ext in '' $ac_executable_extensions; do
58826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58827    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
58828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58829    break 2
58830  fi
58831done
58832  done
58833IFS=$as_save_IFS
58834
58835  ;;
58836esac
58837fi
58838ICECC_CMD=$ac_cv_path_ICECC_CMD
58839if test -n "$ICECC_CMD"; then
58840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
58841$as_echo "$ICECC_CMD" >&6; }
58842else
58843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58844$as_echo "no" >&6; }
58845fi
58846
58847
58848  test -n "$ICECC_CMD" && break
58849done
58850
58851  else
58852    # The variable is set, but is it from the command line or the environment?
58853
58854    # Try to remove the string !ICECC_CMD! from our list.
58855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
58856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
58857      # If it failed, the variable was not from the command line. Ignore it,
58858      # but warn the user (except for BASH, which is always set by the calling BASH).
58859      if test "xICECC_CMD" != xBASH; then
58860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
58861$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
58862      fi
58863      # Try to locate tool using the code snippet
58864      for ac_prog in icecc
58865do
58866  # Extract the first word of "$ac_prog", so it can be a program name with args.
58867set dummy $ac_prog; ac_word=$2
58868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58869$as_echo_n "checking for $ac_word... " >&6; }
58870if ${ac_cv_path_ICECC_CMD+:} false; then :
58871  $as_echo_n "(cached) " >&6
58872else
58873  case $ICECC_CMD in
58874  [\\/]* | ?:[\\/]*)
58875  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
58876  ;;
58877  *)
58878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58879for as_dir in $PATH
58880do
58881  IFS=$as_save_IFS
58882  test -z "$as_dir" && as_dir=.
58883    for ac_exec_ext in '' $ac_executable_extensions; do
58884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58885    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
58886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58887    break 2
58888  fi
58889done
58890  done
58891IFS=$as_save_IFS
58892
58893  ;;
58894esac
58895fi
58896ICECC_CMD=$ac_cv_path_ICECC_CMD
58897if test -n "$ICECC_CMD"; then
58898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
58899$as_echo "$ICECC_CMD" >&6; }
58900else
58901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58902$as_echo "no" >&6; }
58903fi
58904
58905
58906  test -n "$ICECC_CMD" && break
58907done
58908
58909    else
58910      # If it succeeded, then it was overridden by the user. We will use it
58911      # for the tool.
58912
58913      # First remove it from the list of overridden variables, so we can test
58914      # for unknown variables in the end.
58915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
58916
58917      # Check if we try to supply an empty value
58918      if test "x$ICECC_CMD" = x; then
58919        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
58920$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
58921        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
58922$as_echo_n "checking for ICECC_CMD... " >&6; }
58923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
58924$as_echo "disabled" >&6; }
58925      else
58926        # Check if the provided tool contains a complete path.
58927        tool_specified="$ICECC_CMD"
58928        tool_basename="${tool_specified##*/}"
58929        if test "x$tool_basename" = "x$tool_specified"; then
58930          # A command without a complete path is provided, search $PATH.
58931          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
58932$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
58933          # Extract the first word of "$tool_basename", so it can be a program name with args.
58934set dummy $tool_basename; ac_word=$2
58935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58936$as_echo_n "checking for $ac_word... " >&6; }
58937if ${ac_cv_path_ICECC_CMD+:} false; then :
58938  $as_echo_n "(cached) " >&6
58939else
58940  case $ICECC_CMD in
58941  [\\/]* | ?:[\\/]*)
58942  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
58943  ;;
58944  *)
58945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58946for as_dir in $PATH
58947do
58948  IFS=$as_save_IFS
58949  test -z "$as_dir" && as_dir=.
58950    for ac_exec_ext in '' $ac_executable_extensions; do
58951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58952    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
58953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58954    break 2
58955  fi
58956done
58957  done
58958IFS=$as_save_IFS
58959
58960  ;;
58961esac
58962fi
58963ICECC_CMD=$ac_cv_path_ICECC_CMD
58964if test -n "$ICECC_CMD"; then
58965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
58966$as_echo "$ICECC_CMD" >&6; }
58967else
58968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58969$as_echo "no" >&6; }
58970fi
58971
58972
58973          if test "x$ICECC_CMD" = x; then
58974            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58975          fi
58976        else
58977          # Otherwise we believe it is a complete path. Use it as it is.
58978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
58979$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
58980          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
58981$as_echo_n "checking for ICECC_CMD... " >&6; }
58982          if test ! -x "$tool_specified"; then
58983            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58984$as_echo "not found" >&6; }
58985            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
58986          fi
58987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58988$as_echo "$tool_specified" >&6; }
58989        fi
58990      fi
58991    fi
58992
58993  fi
58994
58995
58996
58997  if test "x$ICECC_CMD" = x; then
58998    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
58999  fi
59000
59001
59002    old_path="$PATH"
59003
59004    # Look for icecc-create-env in some known places
59005    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59006
59007
59008
59009  # Publish this variable in the help.
59010
59011
59012  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59013    # The variable is not set by user, try to locate tool using the code snippet
59014    for ac_prog in icecc-create-env
59015do
59016  # Extract the first word of "$ac_prog", so it can be a program name with args.
59017set dummy $ac_prog; ac_word=$2
59018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59019$as_echo_n "checking for $ac_word... " >&6; }
59020if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59021  $as_echo_n "(cached) " >&6
59022else
59023  case $ICECC_CREATE_ENV in
59024  [\\/]* | ?:[\\/]*)
59025  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59026  ;;
59027  *)
59028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59029for as_dir in $PATH
59030do
59031  IFS=$as_save_IFS
59032  test -z "$as_dir" && as_dir=.
59033    for ac_exec_ext in '' $ac_executable_extensions; do
59034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59035    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59037    break 2
59038  fi
59039done
59040  done
59041IFS=$as_save_IFS
59042
59043  ;;
59044esac
59045fi
59046ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59047if test -n "$ICECC_CREATE_ENV"; then
59048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59049$as_echo "$ICECC_CREATE_ENV" >&6; }
59050else
59051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59052$as_echo "no" >&6; }
59053fi
59054
59055
59056  test -n "$ICECC_CREATE_ENV" && break
59057done
59058
59059  else
59060    # The variable is set, but is it from the command line or the environment?
59061
59062    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59065      # If it failed, the variable was not from the command line. Ignore it,
59066      # but warn the user (except for BASH, which is always set by the calling BASH).
59067      if test "xICECC_CREATE_ENV" != xBASH; then
59068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59069$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59070      fi
59071      # Try to locate tool using the code snippet
59072      for ac_prog in icecc-create-env
59073do
59074  # Extract the first word of "$ac_prog", so it can be a program name with args.
59075set dummy $ac_prog; ac_word=$2
59076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59077$as_echo_n "checking for $ac_word... " >&6; }
59078if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59079  $as_echo_n "(cached) " >&6
59080else
59081  case $ICECC_CREATE_ENV in
59082  [\\/]* | ?:[\\/]*)
59083  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59084  ;;
59085  *)
59086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59087for as_dir in $PATH
59088do
59089  IFS=$as_save_IFS
59090  test -z "$as_dir" && as_dir=.
59091    for ac_exec_ext in '' $ac_executable_extensions; do
59092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59093    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59095    break 2
59096  fi
59097done
59098  done
59099IFS=$as_save_IFS
59100
59101  ;;
59102esac
59103fi
59104ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59105if test -n "$ICECC_CREATE_ENV"; then
59106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59107$as_echo "$ICECC_CREATE_ENV" >&6; }
59108else
59109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59110$as_echo "no" >&6; }
59111fi
59112
59113
59114  test -n "$ICECC_CREATE_ENV" && break
59115done
59116
59117    else
59118      # If it succeeded, then it was overridden by the user. We will use it
59119      # for the tool.
59120
59121      # First remove it from the list of overridden variables, so we can test
59122      # for unknown variables in the end.
59123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59124
59125      # Check if we try to supply an empty value
59126      if test "x$ICECC_CREATE_ENV" = x; then
59127        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
59128$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
59129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59130$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59132$as_echo "disabled" >&6; }
59133      else
59134        # Check if the provided tool contains a complete path.
59135        tool_specified="$ICECC_CREATE_ENV"
59136        tool_basename="${tool_specified##*/}"
59137        if test "x$tool_basename" = "x$tool_specified"; then
59138          # A command without a complete path is provided, search $PATH.
59139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
59140$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
59141          # Extract the first word of "$tool_basename", so it can be a program name with args.
59142set dummy $tool_basename; ac_word=$2
59143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59144$as_echo_n "checking for $ac_word... " >&6; }
59145if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59146  $as_echo_n "(cached) " >&6
59147else
59148  case $ICECC_CREATE_ENV in
59149  [\\/]* | ?:[\\/]*)
59150  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59151  ;;
59152  *)
59153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59154for as_dir in $PATH
59155do
59156  IFS=$as_save_IFS
59157  test -z "$as_dir" && as_dir=.
59158    for ac_exec_ext in '' $ac_executable_extensions; do
59159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59160    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59162    break 2
59163  fi
59164done
59165  done
59166IFS=$as_save_IFS
59167
59168  ;;
59169esac
59170fi
59171ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59172if test -n "$ICECC_CREATE_ENV"; then
59173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59174$as_echo "$ICECC_CREATE_ENV" >&6; }
59175else
59176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59177$as_echo "no" >&6; }
59178fi
59179
59180
59181          if test "x$ICECC_CREATE_ENV" = x; then
59182            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59183          fi
59184        else
59185          # Otherwise we believe it is a complete path. Use it as it is.
59186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
59187$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
59188          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59189$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59190          if test ! -x "$tool_specified"; then
59191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59192$as_echo "not found" >&6; }
59193            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
59194          fi
59195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59196$as_echo "$tool_specified" >&6; }
59197        fi
59198      fi
59199    fi
59200
59201  fi
59202
59203
59204
59205  if test "x$ICECC_CREATE_ENV" = x; then
59206    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
59207  fi
59208
59209
59210    # Use icecc-create-env to create a minimal compilation environment that can
59211    # be sent to the other hosts in the icecream cluster.
59212    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
59213    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
59214    # Older versions of icecc does not have the --gcc parameter
59215    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
59216      icecc_gcc_arg="--gcc"
59217    fi
59218    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
59219
59220  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59221      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
59222          ${icecc_create_env_log} 2>&1
59223  if test "$?" != "0"; then
59224    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59225$as_echo "$as_me: icecc-create-env output:" >&6;}
59226    cat \
59227          ${icecc_create_env_log}
59228    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59229  fi
59230
59231    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
59232      # For clang, the icecc compilerwrapper is needed. It usually resides next
59233      # to icecc-create-env.
59234
59235
59236
59237  # Publish this variable in the help.
59238
59239
59240  if [ -z "${ICECC_WRAPPER+x}" ]; then
59241    # The variable is not set by user, try to locate tool using the code snippet
59242    for ac_prog in compilerwrapper
59243do
59244  # Extract the first word of "$ac_prog", so it can be a program name with args.
59245set dummy $ac_prog; ac_word=$2
59246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59247$as_echo_n "checking for $ac_word... " >&6; }
59248if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59249  $as_echo_n "(cached) " >&6
59250else
59251  case $ICECC_WRAPPER in
59252  [\\/]* | ?:[\\/]*)
59253  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59254  ;;
59255  *)
59256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59257for as_dir in $PATH
59258do
59259  IFS=$as_save_IFS
59260  test -z "$as_dir" && as_dir=.
59261    for ac_exec_ext in '' $ac_executable_extensions; do
59262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59263    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59265    break 2
59266  fi
59267done
59268  done
59269IFS=$as_save_IFS
59270
59271  ;;
59272esac
59273fi
59274ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59275if test -n "$ICECC_WRAPPER"; then
59276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59277$as_echo "$ICECC_WRAPPER" >&6; }
59278else
59279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59280$as_echo "no" >&6; }
59281fi
59282
59283
59284  test -n "$ICECC_WRAPPER" && break
59285done
59286
59287  else
59288    # The variable is set, but is it from the command line or the environment?
59289
59290    # Try to remove the string !ICECC_WRAPPER! from our list.
59291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
59292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59293      # If it failed, the variable was not from the command line. Ignore it,
59294      # but warn the user (except for BASH, which is always set by the calling BASH).
59295      if test "xICECC_WRAPPER" != xBASH; then
59296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
59297$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
59298      fi
59299      # Try to locate tool using the code snippet
59300      for ac_prog in compilerwrapper
59301do
59302  # Extract the first word of "$ac_prog", so it can be a program name with args.
59303set dummy $ac_prog; ac_word=$2
59304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59305$as_echo_n "checking for $ac_word... " >&6; }
59306if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59307  $as_echo_n "(cached) " >&6
59308else
59309  case $ICECC_WRAPPER in
59310  [\\/]* | ?:[\\/]*)
59311  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59312  ;;
59313  *)
59314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59315for as_dir in $PATH
59316do
59317  IFS=$as_save_IFS
59318  test -z "$as_dir" && as_dir=.
59319    for ac_exec_ext in '' $ac_executable_extensions; do
59320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59321    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59323    break 2
59324  fi
59325done
59326  done
59327IFS=$as_save_IFS
59328
59329  ;;
59330esac
59331fi
59332ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59333if test -n "$ICECC_WRAPPER"; then
59334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59335$as_echo "$ICECC_WRAPPER" >&6; }
59336else
59337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59338$as_echo "no" >&6; }
59339fi
59340
59341
59342  test -n "$ICECC_WRAPPER" && break
59343done
59344
59345    else
59346      # If it succeeded, then it was overridden by the user. We will use it
59347      # for the tool.
59348
59349      # First remove it from the list of overridden variables, so we can test
59350      # for unknown variables in the end.
59351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59352
59353      # Check if we try to supply an empty value
59354      if test "x$ICECC_WRAPPER" = x; then
59355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
59356$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
59357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59358$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59360$as_echo "disabled" >&6; }
59361      else
59362        # Check if the provided tool contains a complete path.
59363        tool_specified="$ICECC_WRAPPER"
59364        tool_basename="${tool_specified##*/}"
59365        if test "x$tool_basename" = "x$tool_specified"; then
59366          # A command without a complete path is provided, search $PATH.
59367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
59368$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
59369          # Extract the first word of "$tool_basename", so it can be a program name with args.
59370set dummy $tool_basename; ac_word=$2
59371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59372$as_echo_n "checking for $ac_word... " >&6; }
59373if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59374  $as_echo_n "(cached) " >&6
59375else
59376  case $ICECC_WRAPPER in
59377  [\\/]* | ?:[\\/]*)
59378  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59379  ;;
59380  *)
59381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59382for as_dir in $PATH
59383do
59384  IFS=$as_save_IFS
59385  test -z "$as_dir" && as_dir=.
59386    for ac_exec_ext in '' $ac_executable_extensions; do
59387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59388    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59390    break 2
59391  fi
59392done
59393  done
59394IFS=$as_save_IFS
59395
59396  ;;
59397esac
59398fi
59399ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59400if test -n "$ICECC_WRAPPER"; then
59401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59402$as_echo "$ICECC_WRAPPER" >&6; }
59403else
59404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59405$as_echo "no" >&6; }
59406fi
59407
59408
59409          if test "x$ICECC_WRAPPER" = x; then
59410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59411          fi
59412        else
59413          # Otherwise we believe it is a complete path. Use it as it is.
59414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
59415$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
59416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59417$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59418          if test ! -x "$tool_specified"; then
59419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59420$as_echo "not found" >&6; }
59421            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
59422          fi
59423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59424$as_echo "$tool_specified" >&6; }
59425        fi
59426      fi
59427    fi
59428
59429  fi
59430
59431
59432
59433  if test "x$ICECC_WRAPPER" = x; then
59434    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
59435  fi
59436
59437
59438
59439  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59440      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1
59441  if test "$?" != "0"; then
59442    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59443$as_echo "$as_me: icecc-create-env output:" >&6;}
59444    cat ${icecc_create_env_log}
59445    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59446  fi
59447
59448    else
59449      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
59450    fi
59451    PATH="$old_path"
59452    # The bundle with the compiler gets a name based on checksums. Parse log file
59453    # to find it.
59454    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59455    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59456    if test ! -f ${ICECC_ENV_BUNDLE}; then
59457      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59458    fi
59459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
59460$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
59461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59462$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59463    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
59464
59465    if test "x${COMPILE_TYPE}" = "xcross"; then
59466      # If cross compiling, create a separate env package for the build compiler
59467      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
59468      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
59469      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
59470
59471  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59472      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
59473            ${icecc_create_env_log_build} 2>&1
59474  if test "$?" != "0"; then
59475    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59476$as_echo "$as_me: icecc-create-env output:" >&6;}
59477    cat \
59478            ${icecc_create_env_log_build}
59479    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59480  fi
59481
59482      elif test "x${BUILD_CC##*/}" = "xclang"; then
59483
59484  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59485      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1
59486  if test "$?" != "0"; then
59487    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59488$as_echo "$as_me: icecc-create-env output:" >&6;}
59489    cat ${icecc_create_env_log_build}
59490    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59491  fi
59492
59493      else
59494        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
59495      fi
59496      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
59497      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59498      if test ! -f ${ICECC_ENV_BUNDLE}; then
59499        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59500      fi
59501      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
59502$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
59503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59504$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59505      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
59506          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
59507    else
59508      BUILD_ICECC="${ICECC}"
59509    fi
59510
59511
59512  fi
59513
59514
59515# Can the C/C++ compiler use precompiled headers?
59516
59517
59518  ###############################################################################
59519  #
59520  # Can the C/C++ compiler use precompiled headers?
59521  #
59522  # Check whether --enable-precompiled-headers was given.
59523if test "${enable_precompiled_headers+set}" = set; then :
59524  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
59525else
59526  ENABLE_PRECOMPH=yes
59527fi
59528
59529
59530  USE_PRECOMPILED_HEADER=1
59531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
59532$as_echo_n "checking If precompiled header is enabled... " >&6; }
59533  if test "x$ENABLE_PRECOMPH" = xno; then
59534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
59535$as_echo "no, forced" >&6; }
59536    USE_PRECOMPILED_HEADER=0
59537  elif test "x$ICECC" != "x"; then
59538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
59539$as_echo "no, does not work effectively with icecc" >&6; }
59540    USE_PRECOMPILED_HEADER=0
59541  else
59542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59543$as_echo "yes" >&6; }
59544  fi
59545
59546  if test "x$ENABLE_PRECOMPH" = xyes; then
59547    # Check that the compiler actually supports precomp headers.
59548    if test "x$TOOLCHAIN_TYPE" = xgcc; then
59549      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
59550$as_echo_n "checking that precompiled headers work... " >&6; }
59551      echo "int alfa();" > conftest.h
59552      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
59553      if test ! -f conftest.hpp.gch; then
59554        USE_PRECOMPILED_HEADER=0
59555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59556$as_echo "no" >&6; }
59557      else
59558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59559$as_echo "yes" >&6; }
59560      fi
59561      rm -f conftest.h conftest.hpp.gch
59562    fi
59563  fi
59564
59565
59566
59567
59568# Setup use of ccache, if available
59569
59570  # Check whether --enable-ccache was given.
59571if test "${enable_ccache+set}" = set; then :
59572  enableval=$enable_ccache;
59573fi
59574
59575
59576  CCACHE=
59577  CCACHE_STATUS=
59578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
59579$as_echo_n "checking is ccache enabled... " >&6; }
59580  if test "x$enable_ccache" = xyes; then
59581    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
59582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59583$as_echo "yes" >&6; }
59584      OLD_PATH="$PATH"
59585      if test "x$TOOLCHAIN_PATH" != x; then
59586        PATH=$TOOLCHAIN_PATH:$PATH
59587      fi
59588
59589
59590
59591  # Publish this variable in the help.
59592
59593
59594  if [ -z "${CCACHE+x}" ]; then
59595    # The variable is not set by user, try to locate tool using the code snippet
59596    for ac_prog in ccache
59597do
59598  # Extract the first word of "$ac_prog", so it can be a program name with args.
59599set dummy $ac_prog; ac_word=$2
59600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59601$as_echo_n "checking for $ac_word... " >&6; }
59602if ${ac_cv_path_CCACHE+:} false; then :
59603  $as_echo_n "(cached) " >&6
59604else
59605  case $CCACHE in
59606  [\\/]* | ?:[\\/]*)
59607  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59608  ;;
59609  *)
59610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59611for as_dir in $PATH
59612do
59613  IFS=$as_save_IFS
59614  test -z "$as_dir" && as_dir=.
59615    for ac_exec_ext in '' $ac_executable_extensions; do
59616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59617    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59619    break 2
59620  fi
59621done
59622  done
59623IFS=$as_save_IFS
59624
59625  ;;
59626esac
59627fi
59628CCACHE=$ac_cv_path_CCACHE
59629if test -n "$CCACHE"; then
59630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59631$as_echo "$CCACHE" >&6; }
59632else
59633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59634$as_echo "no" >&6; }
59635fi
59636
59637
59638  test -n "$CCACHE" && break
59639done
59640
59641  else
59642    # The variable is set, but is it from the command line or the environment?
59643
59644    # Try to remove the string !CCACHE! from our list.
59645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
59646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59647      # If it failed, the variable was not from the command line. Ignore it,
59648      # but warn the user (except for BASH, which is always set by the calling BASH).
59649      if test "xCCACHE" != xBASH; then
59650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
59651$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
59652      fi
59653      # Try to locate tool using the code snippet
59654      for ac_prog in ccache
59655do
59656  # Extract the first word of "$ac_prog", so it can be a program name with args.
59657set dummy $ac_prog; ac_word=$2
59658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59659$as_echo_n "checking for $ac_word... " >&6; }
59660if ${ac_cv_path_CCACHE+:} false; then :
59661  $as_echo_n "(cached) " >&6
59662else
59663  case $CCACHE in
59664  [\\/]* | ?:[\\/]*)
59665  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59666  ;;
59667  *)
59668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59669for as_dir in $PATH
59670do
59671  IFS=$as_save_IFS
59672  test -z "$as_dir" && as_dir=.
59673    for ac_exec_ext in '' $ac_executable_extensions; do
59674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59675    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59677    break 2
59678  fi
59679done
59680  done
59681IFS=$as_save_IFS
59682
59683  ;;
59684esac
59685fi
59686CCACHE=$ac_cv_path_CCACHE
59687if test -n "$CCACHE"; then
59688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59689$as_echo "$CCACHE" >&6; }
59690else
59691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59692$as_echo "no" >&6; }
59693fi
59694
59695
59696  test -n "$CCACHE" && break
59697done
59698
59699    else
59700      # If it succeeded, then it was overridden by the user. We will use it
59701      # for the tool.
59702
59703      # First remove it from the list of overridden variables, so we can test
59704      # for unknown variables in the end.
59705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59706
59707      # Check if we try to supply an empty value
59708      if test "x$CCACHE" = x; then
59709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
59710$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
59711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
59712$as_echo_n "checking for CCACHE... " >&6; }
59713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59714$as_echo "disabled" >&6; }
59715      else
59716        # Check if the provided tool contains a complete path.
59717        tool_specified="$CCACHE"
59718        tool_basename="${tool_specified##*/}"
59719        if test "x$tool_basename" = "x$tool_specified"; then
59720          # A command without a complete path is provided, search $PATH.
59721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
59722$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
59723          # Extract the first word of "$tool_basename", so it can be a program name with args.
59724set dummy $tool_basename; ac_word=$2
59725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59726$as_echo_n "checking for $ac_word... " >&6; }
59727if ${ac_cv_path_CCACHE+:} false; then :
59728  $as_echo_n "(cached) " >&6
59729else
59730  case $CCACHE in
59731  [\\/]* | ?:[\\/]*)
59732  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59733  ;;
59734  *)
59735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59736for as_dir in $PATH
59737do
59738  IFS=$as_save_IFS
59739  test -z "$as_dir" && as_dir=.
59740    for ac_exec_ext in '' $ac_executable_extensions; do
59741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59742    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59744    break 2
59745  fi
59746done
59747  done
59748IFS=$as_save_IFS
59749
59750  ;;
59751esac
59752fi
59753CCACHE=$ac_cv_path_CCACHE
59754if test -n "$CCACHE"; then
59755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59756$as_echo "$CCACHE" >&6; }
59757else
59758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59759$as_echo "no" >&6; }
59760fi
59761
59762
59763          if test "x$CCACHE" = x; then
59764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59765          fi
59766        else
59767          # Otherwise we believe it is a complete path. Use it as it is.
59768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
59769$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
59770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
59771$as_echo_n "checking for CCACHE... " >&6; }
59772          if test ! -x "$tool_specified"; then
59773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59774$as_echo "not found" >&6; }
59775            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
59776          fi
59777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59778$as_echo "$tool_specified" >&6; }
59779        fi
59780      fi
59781    fi
59782
59783  fi
59784
59785
59786
59787  if test "x$CCACHE" = x; then
59788    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
59789  fi
59790
59791
59792      PATH="$OLD_PATH"
59793      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
59794      CCACHE_STATUS="Active ($CCACHE_VERSION)"
59795    else
59796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59797$as_echo "no" >&6; }
59798      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
59799$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
59800    fi
59801  elif test "x$enable_ccache" = xno; then
59802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
59803$as_echo "no, explicitly disabled" >&6; }
59804    CCACHE_STATUS="Disabled"
59805  elif test "x$enable_ccache" = x; then
59806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59807$as_echo "no" >&6; }
59808  else
59809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
59810$as_echo "unknown" >&6; }
59811    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
59812  fi
59813
59814
59815
59816# Check whether --with-ccache-dir was given.
59817if test "${with_ccache_dir+set}" = set; then :
59818  withval=$with_ccache_dir;
59819fi
59820
59821
59822  if test "x$with_ccache_dir" != x; then
59823    # When using a non home ccache directory, assume the use is to share ccache files
59824    # with other users. Thus change the umask.
59825    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
59826    if test "x$CCACHE" = x; then
59827      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
59828$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
59829    fi
59830  fi
59831
59832  if test "x$CCACHE" != x; then
59833
59834  if test "x$CCACHE" != x; then
59835    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
59836      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
59837          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
59838      if test "x$HAS_BAD_CCACHE" != "x"; then
59839        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
59840      fi
59841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
59842$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
59843      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
59844      PUSHED_FLAGS="$CXXFLAGS"
59845      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
59846      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59847/* end confdefs.h.  */
59848
59849int
59850main ()
59851{
59852
59853  ;
59854  return 0;
59855}
59856_ACEOF
59857if ac_fn_cxx_try_compile "$LINENO"; then :
59858  CC_KNOWS_CCACHE_TRICK=yes
59859else
59860  CC_KNOWS_CCACHE_TRICK=no
59861fi
59862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59863      CXXFLAGS="$PUSHED_FLAGS"
59864      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
59865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59866$as_echo "yes" >&6; }
59867        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
59868
59869        CCACHE_SLOPPINESS=pch_defines,time_macros
59870      else
59871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59872$as_echo "no" >&6; }
59873        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
59874      fi
59875    fi
59876
59877    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
59878        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
59879
59880    if test "x$SET_CCACHE_DIR" != x; then
59881      mkdir -p $CCACHE_DIR > /dev/null 2>&1
59882      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
59883    fi
59884  fi
59885
59886  fi
59887
59888
59889###############################################################################
59890#
59891# And now the finish...
59892#
59893###############################################################################
59894
59895# Check for some common pitfalls
59896
59897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59898    file_to_test="$SRC_ROOT/LICENSE"
59899    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
59900      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
59901    fi
59902  fi
59903
59904
59905  # Did user specify any unknown variables?
59906
59907  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
59908    # Replace the separating ! with spaces before presenting for end user.
59909    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
59910    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
59911$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
59912  fi
59913
59914
59915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
59916$as_echo_n "checking if build directory is on local disk... " >&6; }
59917
59918  # df -l lists only local disks; if the given directory is not found then
59919  # a non-zero exit code is given
59920  if test "x$DF" = x; then
59921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59922      # msys does not have df; use Windows "net use" instead.
59923      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
59924      if test "x$IS_NETWORK_DISK" = x; then
59925        OUTPUT_DIR_IS_LOCAL="yes"
59926      else
59927        OUTPUT_DIR_IS_LOCAL="no"
59928      fi
59929    else
59930      # No df here, say it's local
59931      OUTPUT_DIR_IS_LOCAL="yes"
59932    fi
59933  else
59934    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
59935      OUTPUT_DIR_IS_LOCAL="yes"
59936    else
59937      OUTPUT_DIR_IS_LOCAL="no"
59938    fi
59939  fi
59940
59941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
59942$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
59943
59944
59945
59946  # Check if the user has any old-style ALT_ variables set.
59947  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
59948
59949  # Before generating output files, test if they exist. If they do, this is a reconfigure.
59950  # Since we can't properly handle the dependencies for this, warn the user about the situation
59951  if test -e $OUTPUT_ROOT/spec.gmk; then
59952    IS_RECONFIGURE=yes
59953  else
59954    IS_RECONFIGURE=no
59955  fi
59956
59957
59958# At the end, call the custom hook. (Dummy macro if no custom sources available)
59959
59960
59961# We're messing a bit with internal autoconf variables to put the config.status
59962# in the output directory instead of the current directory.
59963CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
59964
59965# Create the actual output files. Now the main work of configure is done.
59966cat >confcache <<\_ACEOF
59967# This file is a shell script that caches the results of configure
59968# tests run on this system so they can be shared between configure
59969# scripts and configure runs, see configure's option --config-cache.
59970# It is not useful on other systems.  If it contains results you don't
59971# want to keep, you may remove or edit it.
59972#
59973# config.status only pays attention to the cache file if you give it
59974# the --recheck option to rerun configure.
59975#
59976# `ac_cv_env_foo' variables (set or unset) will be overridden when
59977# loading this file, other *unset* `ac_cv_foo' will be assigned the
59978# following values.
59979
59980_ACEOF
59981
59982# The following way of writing the cache mishandles newlines in values,
59983# but we know of no workaround that is simple, portable, and efficient.
59984# So, we kill variables containing newlines.
59985# Ultrix sh set writes to stderr and can't be redirected directly,
59986# and sets the high bit in the cache file unless we assign to the vars.
59987(
59988  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
59989    eval ac_val=\$$ac_var
59990    case $ac_val in #(
59991    *${as_nl}*)
59992      case $ac_var in #(
59993      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
59994$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
59995      esac
59996      case $ac_var in #(
59997      _ | IFS | as_nl) ;; #(
59998      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
59999      *) { eval $ac_var=; unset $ac_var;} ;;
60000      esac ;;
60001    esac
60002  done
60003
60004  (set) 2>&1 |
60005    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60006    *${as_nl}ac_space=\ *)
60007      # `set' does not quote correctly, so add quotes: double-quote
60008      # substitution turns \\\\ into \\, and sed turns \\ into \.
60009      sed -n \
60010	"s/'/'\\\\''/g;
60011	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60012      ;; #(
60013    *)
60014      # `set' quotes correctly as required by POSIX, so do not add quotes.
60015      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60016      ;;
60017    esac |
60018    sort
60019) |
60020  sed '
60021     /^ac_cv_env_/b end
60022     t clear
60023     :clear
60024     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60025     t end
60026     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60027     :end' >>confcache
60028if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60029  if test -w "$cache_file"; then
60030    if test "x$cache_file" != "x/dev/null"; then
60031      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60032$as_echo "$as_me: updating cache $cache_file" >&6;}
60033      if test ! -f "$cache_file" || test -h "$cache_file"; then
60034	cat confcache >"$cache_file"
60035      else
60036        case $cache_file in #(
60037        */* | ?:*)
60038	  mv -f confcache "$cache_file"$$ &&
60039	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60040        *)
60041	  mv -f confcache "$cache_file" ;;
60042	esac
60043      fi
60044    fi
60045  else
60046    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60047$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60048  fi
60049fi
60050rm -f confcache
60051
60052test "x$prefix" = xNONE && prefix=$ac_default_prefix
60053# Let make expand exec_prefix.
60054test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60055
60056# Transform confdefs.h into DEFS.
60057# Protect against shell expansion while executing Makefile rules.
60058# Protect against Makefile macro expansion.
60059#
60060# If the first sed substitution is executed (which looks for macros that
60061# take arguments), then branch to the quote section.  Otherwise,
60062# look for a macro that doesn't take arguments.
60063ac_script='
60064:mline
60065/\\$/{
60066 N
60067 s,\\\n,,
60068 b mline
60069}
60070t clear
60071:clear
60072s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60073t quote
60074s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60075t quote
60076b any
60077:quote
60078s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60079s/\[/\\&/g
60080s/\]/\\&/g
60081s/\$/$$/g
60082H
60083:any
60084${
60085	g
60086	s/^\n//
60087	s/\n/ /g
60088	p
60089}
60090'
60091DEFS=`sed -n "$ac_script" confdefs.h`
60092
60093
60094ac_libobjs=
60095ac_ltlibobjs=
60096U=
60097for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60098  # 1. Remove the extension, and $U if already installed.
60099  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60100  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60101  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60102  #    will be set to the directory where LIBOBJS objects are built.
60103  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60104  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
60105done
60106LIBOBJS=$ac_libobjs
60107
60108LTLIBOBJS=$ac_ltlibobjs
60109
60110
60111
60112: "${CONFIG_STATUS=./config.status}"
60113ac_write_fail=0
60114ac_clean_files_save=$ac_clean_files
60115ac_clean_files="$ac_clean_files $CONFIG_STATUS"
60116{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
60117$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
60118as_write_fail=0
60119cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
60120#! $SHELL
60121# Generated by $as_me.
60122# Run this file to recreate the current configuration.
60123# Compiler output produced by configure, useful for debugging
60124# configure, is in config.log if it exists.
60125
60126debug=false
60127ac_cs_recheck=false
60128ac_cs_silent=false
60129
60130SHELL=\${CONFIG_SHELL-$SHELL}
60131export SHELL
60132_ASEOF
60133cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
60134## -------------------- ##
60135## M4sh Initialization. ##
60136## -------------------- ##
60137
60138# Be more Bourne compatible
60139DUALCASE=1; export DUALCASE # for MKS sh
60140if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
60141  emulate sh
60142  NULLCMD=:
60143  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
60144  # is contrary to our usage.  Disable this feature.
60145  alias -g '${1+"$@"}'='"$@"'
60146  setopt NO_GLOB_SUBST
60147else
60148  case `(set -o) 2>/dev/null` in #(
60149  *posix*) :
60150    set -o posix ;; #(
60151  *) :
60152     ;;
60153esac
60154fi
60155
60156
60157as_nl='
60158'
60159export as_nl
60160# Printing a long string crashes Solaris 7 /usr/bin/printf.
60161as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
60162as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
60163as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
60164# Prefer a ksh shell builtin over an external printf program on Solaris,
60165# but without wasting forks for bash or zsh.
60166if test -z "$BASH_VERSION$ZSH_VERSION" \
60167    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
60168  as_echo='print -r --'
60169  as_echo_n='print -rn --'
60170elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
60171  as_echo='printf %s\n'
60172  as_echo_n='printf %s'
60173else
60174  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60175    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
60176    as_echo_n='/usr/ucb/echo -n'
60177  else
60178    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60179    as_echo_n_body='eval
60180      arg=$1;
60181      case $arg in #(
60182      *"$as_nl"*)
60183	expr "X$arg" : "X\\(.*\\)$as_nl";
60184	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60185      esac;
60186      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
60187    '
60188    export as_echo_n_body
60189    as_echo_n='sh -c $as_echo_n_body as_echo'
60190  fi
60191  export as_echo_body
60192  as_echo='sh -c $as_echo_body as_echo'
60193fi
60194
60195# The user is always right.
60196if test "${PATH_SEPARATOR+set}" != set; then
60197  PATH_SEPARATOR=:
60198  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60199    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60200      PATH_SEPARATOR=';'
60201  }
60202fi
60203
60204
60205# IFS
60206# We need space, tab and new line, in precisely that order.  Quoting is
60207# there to prevent editors from complaining about space-tab.
60208# (If _AS_PATH_WALK were called with IFS unset, it would disable word
60209# splitting by setting IFS to empty value.)
60210IFS=" ""	$as_nl"
60211
60212# Find who we are.  Look in the path if we contain no directory separator.
60213as_myself=
60214case $0 in #((
60215  *[\\/]* ) as_myself=$0 ;;
60216  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60217for as_dir in $PATH
60218do
60219  IFS=$as_save_IFS
60220  test -z "$as_dir" && as_dir=.
60221    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
60222  done
60223IFS=$as_save_IFS
60224
60225     ;;
60226esac
60227# We did not find ourselves, most probably we were run as `sh COMMAND'
60228# in which case we are not to be found in the path.
60229if test "x$as_myself" = x; then
60230  as_myself=$0
60231fi
60232if test ! -f "$as_myself"; then
60233  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60234  exit 1
60235fi
60236
60237# Unset variables that we do not need and which cause bugs (e.g. in
60238# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
60239# suppresses any "Segmentation fault" message there.  '((' could
60240# trigger a bug in pdksh 5.2.14.
60241for as_var in BASH_ENV ENV MAIL MAILPATH
60242do eval test x\${$as_var+set} = xset \
60243  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60244done
60245PS1='$ '
60246PS2='> '
60247PS4='+ '
60248
60249# NLS nuisances.
60250LC_ALL=C
60251export LC_ALL
60252LANGUAGE=C
60253export LANGUAGE
60254
60255# CDPATH.
60256(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60257
60258
60259# as_fn_error STATUS ERROR [LINENO LOG_FD]
60260# ----------------------------------------
60261# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60262# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60263# script with STATUS, using 1 if that was 0.
60264as_fn_error ()
60265{
60266  as_status=$1; test $as_status -eq 0 && as_status=1
60267  if test "$4"; then
60268    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60269    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60270  fi
60271  $as_echo "$as_me: error: $2" >&2
60272  as_fn_exit $as_status
60273} # as_fn_error
60274
60275
60276# as_fn_set_status STATUS
60277# -----------------------
60278# Set $? to STATUS, without forking.
60279as_fn_set_status ()
60280{
60281  return $1
60282} # as_fn_set_status
60283
60284# as_fn_exit STATUS
60285# -----------------
60286# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60287as_fn_exit ()
60288{
60289  set +e
60290  as_fn_set_status $1
60291  exit $1
60292} # as_fn_exit
60293
60294# as_fn_unset VAR
60295# ---------------
60296# Portably unset VAR.
60297as_fn_unset ()
60298{
60299  { eval $1=; unset $1;}
60300}
60301as_unset=as_fn_unset
60302# as_fn_append VAR VALUE
60303# ----------------------
60304# Append the text in VALUE to the end of the definition contained in VAR. Take
60305# advantage of any shell optimizations that allow amortized linear growth over
60306# repeated appends, instead of the typical quadratic growth present in naive
60307# implementations.
60308if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
60309  eval 'as_fn_append ()
60310  {
60311    eval $1+=\$2
60312  }'
60313else
60314  as_fn_append ()
60315  {
60316    eval $1=\$$1\$2
60317  }
60318fi # as_fn_append
60319
60320# as_fn_arith ARG...
60321# ------------------
60322# Perform arithmetic evaluation on the ARGs, and store the result in the
60323# global $as_val. Take advantage of shells that can avoid forks. The arguments
60324# must be portable across $(()) and expr.
60325if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
60326  eval 'as_fn_arith ()
60327  {
60328    as_val=$(( $* ))
60329  }'
60330else
60331  as_fn_arith ()
60332  {
60333    as_val=`expr "$@" || test $? -eq 1`
60334  }
60335fi # as_fn_arith
60336
60337
60338if expr a : '\(a\)' >/dev/null 2>&1 &&
60339   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60340  as_expr=expr
60341else
60342  as_expr=false
60343fi
60344
60345if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60346  as_basename=basename
60347else
60348  as_basename=false
60349fi
60350
60351if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60352  as_dirname=dirname
60353else
60354  as_dirname=false
60355fi
60356
60357as_me=`$as_basename -- "$0" ||
60358$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60359	 X"$0" : 'X\(//\)$' \| \
60360	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60361$as_echo X/"$0" |
60362    sed '/^.*\/\([^/][^/]*\)\/*$/{
60363	    s//\1/
60364	    q
60365	  }
60366	  /^X\/\(\/\/\)$/{
60367	    s//\1/
60368	    q
60369	  }
60370	  /^X\/\(\/\).*/{
60371	    s//\1/
60372	    q
60373	  }
60374	  s/.*/./; q'`
60375
60376# Avoid depending upon Character Ranges.
60377as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60378as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60379as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60380as_cr_digits='0123456789'
60381as_cr_alnum=$as_cr_Letters$as_cr_digits
60382
60383ECHO_C= ECHO_N= ECHO_T=
60384case `echo -n x` in #(((((
60385-n*)
60386  case `echo 'xy\c'` in
60387  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60388  xy)  ECHO_C='\c';;
60389  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60390       ECHO_T='	';;
60391  esac;;
60392*)
60393  ECHO_N='-n';;
60394esac
60395
60396rm -f conf$$ conf$$.exe conf$$.file
60397if test -d conf$$.dir; then
60398  rm -f conf$$.dir/conf$$.file
60399else
60400  rm -f conf$$.dir
60401  mkdir conf$$.dir 2>/dev/null
60402fi
60403if (echo >conf$$.file) 2>/dev/null; then
60404  if ln -s conf$$.file conf$$ 2>/dev/null; then
60405    as_ln_s='ln -s'
60406    # ... but there are two gotchas:
60407    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60408    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60409    # In both cases, we have to default to `cp -pR'.
60410    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60411      as_ln_s='cp -pR'
60412  elif ln conf$$.file conf$$ 2>/dev/null; then
60413    as_ln_s=ln
60414  else
60415    as_ln_s='cp -pR'
60416  fi
60417else
60418  as_ln_s='cp -pR'
60419fi
60420rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60421rmdir conf$$.dir 2>/dev/null
60422
60423
60424# as_fn_mkdir_p
60425# -------------
60426# Create "$as_dir" as a directory, including parents if necessary.
60427as_fn_mkdir_p ()
60428{
60429
60430  case $as_dir in #(
60431  -*) as_dir=./$as_dir;;
60432  esac
60433  test -d "$as_dir" || eval $as_mkdir_p || {
60434    as_dirs=
60435    while :; do
60436      case $as_dir in #(
60437      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60438      *) as_qdir=$as_dir;;
60439      esac
60440      as_dirs="'$as_qdir' $as_dirs"
60441      as_dir=`$as_dirname -- "$as_dir" ||
60442$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60443	 X"$as_dir" : 'X\(//\)[^/]' \| \
60444	 X"$as_dir" : 'X\(//\)$' \| \
60445	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60446$as_echo X"$as_dir" |
60447    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60448	    s//\1/
60449	    q
60450	  }
60451	  /^X\(\/\/\)[^/].*/{
60452	    s//\1/
60453	    q
60454	  }
60455	  /^X\(\/\/\)$/{
60456	    s//\1/
60457	    q
60458	  }
60459	  /^X\(\/\).*/{
60460	    s//\1/
60461	    q
60462	  }
60463	  s/.*/./; q'`
60464      test -d "$as_dir" && break
60465    done
60466    test -z "$as_dirs" || eval "mkdir $as_dirs"
60467  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
60468
60469
60470} # as_fn_mkdir_p
60471if mkdir -p . 2>/dev/null; then
60472  as_mkdir_p='mkdir -p "$as_dir"'
60473else
60474  test -d ./-p && rmdir ./-p
60475  as_mkdir_p=false
60476fi
60477
60478
60479# as_fn_executable_p FILE
60480# -----------------------
60481# Test if FILE is an executable regular file.
60482as_fn_executable_p ()
60483{
60484  test -f "$1" && test -x "$1"
60485} # as_fn_executable_p
60486as_test_x='test -x'
60487as_executable_p=as_fn_executable_p
60488
60489# Sed expression to map a string onto a valid CPP name.
60490as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
60491
60492# Sed expression to map a string onto a valid variable name.
60493as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
60494
60495
60496exec 6>&1
60497## ----------------------------------- ##
60498## Main body of $CONFIG_STATUS script. ##
60499## ----------------------------------- ##
60500_ASEOF
60501test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
60502
60503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60504# Save the log message, to keep $0 and so on meaningful, and to
60505# report actual input values of CONFIG_FILES etc. instead of their
60506# values after options handling.
60507ac_log="
60508This file was extended by OpenJDK $as_me jdk9, which was
60509generated by GNU Autoconf 2.69.  Invocation command line was
60510
60511  CONFIG_FILES    = $CONFIG_FILES
60512  CONFIG_HEADERS  = $CONFIG_HEADERS
60513  CONFIG_LINKS    = $CONFIG_LINKS
60514  CONFIG_COMMANDS = $CONFIG_COMMANDS
60515  $ $0 $@
60516
60517on `(hostname || uname -n) 2>/dev/null | sed 1q`
60518"
60519
60520_ACEOF
60521
60522case $ac_config_files in *"
60523"*) set x $ac_config_files; shift; ac_config_files=$*;;
60524esac
60525
60526
60527
60528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60529# Files that config.status was made for.
60530config_files="$ac_config_files"
60531
60532_ACEOF
60533
60534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60535ac_cs_usage="\
60536\`$as_me' instantiates files and other configuration actions
60537from templates according to the current configuration.  Unless the files
60538and actions are specified as TAGs, all are instantiated by default.
60539
60540Usage: $0 [OPTION]... [TAG]...
60541
60542  -h, --help       print this help, then exit
60543  -V, --version    print version number and configuration settings, then exit
60544      --config     print configuration, then exit
60545  -q, --quiet, --silent
60546                   do not print progress messages
60547  -d, --debug      don't remove temporary files
60548      --recheck    update $as_me by reconfiguring in the same conditions
60549      --file=FILE[:TEMPLATE]
60550                   instantiate the configuration file FILE
60551
60552Configuration files:
60553$config_files
60554
60555Report bugs to <build-dev@openjdk.java.net>.
60556OpenJDK home page: <http://openjdk.java.net>."
60557
60558_ACEOF
60559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60560ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
60561ac_cs_version="\\
60562OpenJDK config.status jdk9
60563configured by $0, generated by GNU Autoconf 2.69,
60564  with options \\"\$ac_cs_config\\"
60565
60566Copyright (C) 2012 Free Software Foundation, Inc.
60567This config.status script is free software; the Free Software Foundation
60568gives unlimited permission to copy, distribute and modify it."
60569
60570ac_pwd='$ac_pwd'
60571srcdir='$srcdir'
60572AWK='$AWK'
60573test -n "\$AWK" || AWK=awk
60574_ACEOF
60575
60576cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60577# The default lists apply if the user does not specify any file.
60578ac_need_defaults=:
60579while test $# != 0
60580do
60581  case $1 in
60582  --*=?*)
60583    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60584    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
60585    ac_shift=:
60586    ;;
60587  --*=)
60588    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60589    ac_optarg=
60590    ac_shift=:
60591    ;;
60592  *)
60593    ac_option=$1
60594    ac_optarg=$2
60595    ac_shift=shift
60596    ;;
60597  esac
60598
60599  case $ac_option in
60600  # Handling of the options.
60601  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
60602    ac_cs_recheck=: ;;
60603  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
60604    $as_echo "$ac_cs_version"; exit ;;
60605  --config | --confi | --conf | --con | --co | --c )
60606    $as_echo "$ac_cs_config"; exit ;;
60607  --debug | --debu | --deb | --de | --d | -d )
60608    debug=: ;;
60609  --file | --fil | --fi | --f )
60610    $ac_shift
60611    case $ac_optarg in
60612    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
60613    '') as_fn_error $? "missing file argument" ;;
60614    esac
60615    as_fn_append CONFIG_FILES " '$ac_optarg'"
60616    ac_need_defaults=false;;
60617  --he | --h |  --help | --hel | -h )
60618    $as_echo "$ac_cs_usage"; exit ;;
60619  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
60620  | -silent | --silent | --silen | --sile | --sil | --si | --s)
60621    ac_cs_silent=: ;;
60622
60623  # This is an error.
60624  -*) as_fn_error $? "unrecognized option: \`$1'
60625Try \`$0 --help' for more information." ;;
60626
60627  *) as_fn_append ac_config_targets " $1"
60628     ac_need_defaults=false ;;
60629
60630  esac
60631  shift
60632done
60633
60634ac_configure_extra_args=
60635
60636if $ac_cs_silent; then
60637  exec 6>/dev/null
60638  ac_configure_extra_args="$ac_configure_extra_args --silent"
60639fi
60640
60641_ACEOF
60642cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60643if \$ac_cs_recheck; then
60644  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
60645  shift
60646  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
60647  CONFIG_SHELL='$SHELL'
60648  export CONFIG_SHELL
60649  exec "\$@"
60650fi
60651
60652_ACEOF
60653cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60654exec 5>>config.log
60655{
60656  echo
60657  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
60658## Running $as_me. ##
60659_ASBOX
60660  $as_echo "$ac_log"
60661} >&5
60662
60663_ACEOF
60664cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60665_ACEOF
60666
60667cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60668
60669# Handling of arguments.
60670for ac_config_target in $ac_config_targets
60671do
60672  case $ac_config_target in
60673    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
60674    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
60675    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
60676    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
60677    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
60678
60679  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
60680  esac
60681done
60682
60683
60684# If the user did not use the arguments to specify the items to instantiate,
60685# then the envvar interface is used.  Set only those that are not.
60686# We use the long form for the default assignment because of an extremely
60687# bizarre bug on SunOS 4.1.3.
60688if $ac_need_defaults; then
60689  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
60690fi
60691
60692# Have a temporary directory for convenience.  Make it in the build tree
60693# simply because there is no reason against having it here, and in addition,
60694# creating and moving files from /tmp can sometimes cause problems.
60695# Hook for its removal unless debugging.
60696# Note that there is a small window in which the directory will not be cleaned:
60697# after its creation but before its name has been assigned to `$tmp'.
60698$debug ||
60699{
60700  tmp= ac_tmp=
60701  trap 'exit_status=$?
60702  : "${ac_tmp:=$tmp}"
60703  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
60704' 0
60705  trap 'as_fn_exit 1' 1 2 13 15
60706}
60707# Create a (secure) tmp directory for tmp files.
60708
60709{
60710  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
60711  test -d "$tmp"
60712}  ||
60713{
60714  tmp=./conf$$-$RANDOM
60715  (umask 077 && mkdir "$tmp")
60716} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
60717ac_tmp=$tmp
60718
60719# Set up the scripts for CONFIG_FILES section.
60720# No need to generate them if there are no CONFIG_FILES.
60721# This happens for instance with `./config.status config.h'.
60722if test -n "$CONFIG_FILES"; then
60723
60724
60725ac_cr=`echo X | tr X '\015'`
60726# On cygwin, bash can eat \r inside `` if the user requested igncr.
60727# But we know of no other shell where ac_cr would be empty at this
60728# point, so we can use a bashism as a fallback.
60729if test "x$ac_cr" = x; then
60730  eval ac_cr=\$\'\\r\'
60731fi
60732ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
60733if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
60734  ac_cs_awk_cr='\\r'
60735else
60736  ac_cs_awk_cr=$ac_cr
60737fi
60738
60739echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
60740_ACEOF
60741
60742
60743{
60744  echo "cat >conf$$subs.awk <<_ACEOF" &&
60745  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
60746  echo "_ACEOF"
60747} >conf$$subs.sh ||
60748  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60749ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
60750ac_delim='%!_!# '
60751for ac_last_try in false false false false false :; do
60752  . ./conf$$subs.sh ||
60753    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60754
60755  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
60756  if test $ac_delim_n = $ac_delim_num; then
60757    break
60758  elif $ac_last_try; then
60759    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60760  else
60761    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
60762  fi
60763done
60764rm -f conf$$subs.sh
60765
60766cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60767cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
60768_ACEOF
60769sed -n '
60770h
60771s/^/S["/; s/!.*/"]=/
60772p
60773g
60774s/^[^!]*!//
60775:repl
60776t repl
60777s/'"$ac_delim"'$//
60778t delim
60779:nl
60780h
60781s/\(.\{148\}\)..*/\1/
60782t more1
60783s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
60784p
60785n
60786b repl
60787:more1
60788s/["\\]/\\&/g; s/^/"/; s/$/"\\/
60789p
60790g
60791s/.\{148\}//
60792t nl
60793:delim
60794h
60795s/\(.\{148\}\)..*/\1/
60796t more2
60797s/["\\]/\\&/g; s/^/"/; s/$/"/
60798p
60799b
60800:more2
60801s/["\\]/\\&/g; s/^/"/; s/$/"\\/
60802p
60803g
60804s/.\{148\}//
60805t delim
60806' <conf$$subs.awk | sed '
60807/^[^""]/{
60808  N
60809  s/\n//
60810}
60811' >>$CONFIG_STATUS || ac_write_fail=1
60812rm -f conf$$subs.awk
60813cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60814_ACAWK
60815cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
60816  for (key in S) S_is_set[key] = 1
60817  FS = ""
60818
60819}
60820{
60821  line = $ 0
60822  nfields = split(line, field, "@")
60823  substed = 0
60824  len = length(field[1])
60825  for (i = 2; i < nfields; i++) {
60826    key = field[i]
60827    keylen = length(key)
60828    if (S_is_set[key]) {
60829      value = S[key]
60830      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
60831      len += length(value) + length(field[++i])
60832      substed = 1
60833    } else
60834      len += 1 + keylen
60835  }
60836
60837  print line
60838}
60839
60840_ACAWK
60841_ACEOF
60842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60843if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
60844  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
60845else
60846  cat
60847fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
60848  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
60849_ACEOF
60850
60851# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
60852# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
60853# trailing colons and then remove the whole line if VPATH becomes empty
60854# (actually we leave an empty line to preserve line numbers).
60855if test "x$srcdir" = x.; then
60856  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
60857h
60858s///
60859s/^/:/
60860s/[	 ]*$/:/
60861s/:\$(srcdir):/:/g
60862s/:\${srcdir}:/:/g
60863s/:@srcdir@:/:/g
60864s/^:*//
60865s/:*$//
60866x
60867s/\(=[	 ]*\).*/\1/
60868G
60869s/\n//
60870s/^[^=]*=[	 ]*$//
60871}'
60872fi
60873
60874cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60875fi # test -n "$CONFIG_FILES"
60876
60877
60878eval set X "  :F $CONFIG_FILES      "
60879shift
60880for ac_tag
60881do
60882  case $ac_tag in
60883  :[FHLC]) ac_mode=$ac_tag; continue;;
60884  esac
60885  case $ac_mode$ac_tag in
60886  :[FHL]*:*);;
60887  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
60888  :[FH]-) ac_tag=-:-;;
60889  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
60890  esac
60891  ac_save_IFS=$IFS
60892  IFS=:
60893  set x $ac_tag
60894  IFS=$ac_save_IFS
60895  shift
60896  ac_file=$1
60897  shift
60898
60899  case $ac_mode in
60900  :L) ac_source=$1;;
60901  :[FH])
60902    ac_file_inputs=
60903    for ac_f
60904    do
60905      case $ac_f in
60906      -) ac_f="$ac_tmp/stdin";;
60907      *) # Look for the file first in the build tree, then in the source tree
60908	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
60909	 # because $ac_f cannot contain `:'.
60910	 test -f "$ac_f" ||
60911	   case $ac_f in
60912	   [\\/$]*) false;;
60913	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
60914	   esac ||
60915	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
60916      esac
60917      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
60918      as_fn_append ac_file_inputs " '$ac_f'"
60919    done
60920
60921    # Let's still pretend it is `configure' which instantiates (i.e., don't
60922    # use $as_me), people would be surprised to read:
60923    #    /* config.h.  Generated by config.status.  */
60924    configure_input='Generated from '`
60925	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
60926	`' by configure.'
60927    if test x"$ac_file" != x-; then
60928      configure_input="$ac_file.  $configure_input"
60929      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
60930$as_echo "$as_me: creating $ac_file" >&6;}
60931    fi
60932    # Neutralize special characters interpreted by sed in replacement strings.
60933    case $configure_input in #(
60934    *\&* | *\|* | *\\* )
60935       ac_sed_conf_input=`$as_echo "$configure_input" |
60936       sed 's/[\\\\&|]/\\\\&/g'`;; #(
60937    *) ac_sed_conf_input=$configure_input;;
60938    esac
60939
60940    case $ac_tag in
60941    *:-:* | *:-) cat >"$ac_tmp/stdin" \
60942      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
60943    esac
60944    ;;
60945  esac
60946
60947  ac_dir=`$as_dirname -- "$ac_file" ||
60948$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60949	 X"$ac_file" : 'X\(//\)[^/]' \| \
60950	 X"$ac_file" : 'X\(//\)$' \| \
60951	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
60952$as_echo X"$ac_file" |
60953    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60954	    s//\1/
60955	    q
60956	  }
60957	  /^X\(\/\/\)[^/].*/{
60958	    s//\1/
60959	    q
60960	  }
60961	  /^X\(\/\/\)$/{
60962	    s//\1/
60963	    q
60964	  }
60965	  /^X\(\/\).*/{
60966	    s//\1/
60967	    q
60968	  }
60969	  s/.*/./; q'`
60970  as_dir="$ac_dir"; as_fn_mkdir_p
60971  ac_builddir=.
60972
60973case "$ac_dir" in
60974.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
60975*)
60976  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
60977  # A ".." for each directory in $ac_dir_suffix.
60978  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
60979  case $ac_top_builddir_sub in
60980  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
60981  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
60982  esac ;;
60983esac
60984ac_abs_top_builddir=$ac_pwd
60985ac_abs_builddir=$ac_pwd$ac_dir_suffix
60986# for backward compatibility:
60987ac_top_builddir=$ac_top_build_prefix
60988
60989case $srcdir in
60990  .)  # We are building in place.
60991    ac_srcdir=.
60992    ac_top_srcdir=$ac_top_builddir_sub
60993    ac_abs_top_srcdir=$ac_pwd ;;
60994  [\\/]* | ?:[\\/]* )  # Absolute name.
60995    ac_srcdir=$srcdir$ac_dir_suffix;
60996    ac_top_srcdir=$srcdir
60997    ac_abs_top_srcdir=$srcdir ;;
60998  *) # Relative name.
60999    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61000    ac_top_srcdir=$ac_top_build_prefix$srcdir
61001    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61002esac
61003ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61004
61005
61006  case $ac_mode in
61007  :F)
61008  #
61009  # CONFIG_FILE
61010  #
61011
61012_ACEOF
61013
61014cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61015# If the template does not know about datarootdir, expand it.
61016# FIXME: This hack should be removed a few years after 2.60.
61017ac_datarootdir_hack=; ac_datarootdir_seen=
61018ac_sed_dataroot='
61019/datarootdir/ {
61020  p
61021  q
61022}
61023/@datadir@/p
61024/@docdir@/p
61025/@infodir@/p
61026/@localedir@/p
61027/@mandir@/p'
61028case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61029*datarootdir*) ac_datarootdir_seen=yes;;
61030*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61031  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61032$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61033_ACEOF
61034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61035  ac_datarootdir_hack='
61036  s&@datadir@&$datadir&g
61037  s&@docdir@&$docdir&g
61038  s&@infodir@&$infodir&g
61039  s&@localedir@&$localedir&g
61040  s&@mandir@&$mandir&g
61041  s&\\\${datarootdir}&$datarootdir&g' ;;
61042esac
61043_ACEOF
61044
61045# Neutralize VPATH when `$srcdir' = `.'.
61046# Shell code in configure.ac might set extrasub.
61047# FIXME: do we really want to maintain this feature?
61048cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61049ac_sed_extra="$ac_vpsub
61050$extrasub
61051_ACEOF
61052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61053:t
61054/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61055s|@configure_input@|$ac_sed_conf_input|;t t
61056s&@top_builddir@&$ac_top_builddir_sub&;t t
61057s&@top_build_prefix@&$ac_top_build_prefix&;t t
61058s&@srcdir@&$ac_srcdir&;t t
61059s&@abs_srcdir@&$ac_abs_srcdir&;t t
61060s&@top_srcdir@&$ac_top_srcdir&;t t
61061s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61062s&@builddir@&$ac_builddir&;t t
61063s&@abs_builddir@&$ac_abs_builddir&;t t
61064s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61065$ac_datarootdir_hack
61066"
61067eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61068  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61069
61070test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61071  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61072  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61073      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61074  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61075which seems to be undefined.  Please make sure it is defined" >&5
61076$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61077which seems to be undefined.  Please make sure it is defined" >&2;}
61078
61079  rm -f "$ac_tmp/stdin"
61080  case $ac_file in
61081  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61082  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61083  esac \
61084  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61085 ;;
61086
61087
61088
61089  esac
61090
61091done # for ac_tag
61092
61093
61094as_fn_exit 0
61095_ACEOF
61096ac_clean_files=$ac_clean_files_save
61097
61098test $ac_write_fail = 0 ||
61099  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61100
61101
61102# configure is writing to config.log, and then calls config.status.
61103# config.status does its own redirection, appending to config.log.
61104# Unfortunately, on DOS this fails, as config.log is still kept open
61105# by configure, so config.status won't be able to write to it; its
61106# output is simply discarded.  So we exec the FD to /dev/null,
61107# effectively closing config.log, so it can be properly (re)opened and
61108# appended to by config.status.  When coming back to configure, we
61109# need to make the FD available again.
61110if test "$no_create" != yes; then
61111  ac_cs_success=:
61112  ac_config_status_args=
61113  test "$silent" = yes &&
61114    ac_config_status_args="$ac_config_status_args --quiet"
61115  exec 5>/dev/null
61116  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61117  exec 5>>config.log
61118  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61119  # would make configure fail if this is the last instruction.
61120  $ac_cs_success || as_fn_exit 1
61121fi
61122if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61123  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61124$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61125fi
61126
61127
61128# After AC_OUTPUT, we need to do final work
61129
61130
61131  # Try to move config.log (generated by autoconf) to the configure-support directory.
61132  if test -e ./config.log; then
61133    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
61134  fi
61135
61136  # Rotate our log file (configure.log)
61137  if test -e "$OUTPUT_ROOT/configure.log.old"; then
61138    $RM -f "$OUTPUT_ROOT/configure.log.old"
61139  fi
61140  if test -e "$OUTPUT_ROOT/configure.log"; then
61141    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
61142  fi
61143
61144  # Move configure.log from current directory to the build output root
61145  if test -e ./configure.log; then
61146    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
61147  fi
61148
61149  # Make the compare script executable
61150  $CHMOD +x $OUTPUT_ROOT/compare.sh
61151
61152
61153# Finally output some useful information to the user
61154
61155  # Finally output some useful information to the user
61156
61157  printf "\n"
61158  printf "====================================================\n"
61159  if test "x$no_create" != "xyes"; then
61160    if test "x$IS_RECONFIGURE" != "xyes"; then
61161      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
61162    else
61163      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
61164    fi
61165  else
61166    if test "x$IS_RECONFIGURE" != "xyes"; then
61167      printf "A configuration has been successfully checked but not created\n"
61168    else
61169      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
61170    fi
61171  fi
61172  if test "x$CONFIGURE_COMMAND_LINE" != x; then
61173    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
61174  else
61175    printf "using default settings.\n"
61176  fi
61177
61178  printf "\n"
61179  printf "Configuration summary:\n"
61180  printf "* Debug level:    $DEBUG_LEVEL\n"
61181  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
61182  printf "* JDK variant:    $JDK_VARIANT\n"
61183  printf "* JVM variants:   $with_jvm_variants\n"
61184  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
61185  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
61186
61187  printf "\n"
61188  printf "Tools summary:\n"
61189  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
61190    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
61191  fi
61192  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
61193  if test "x$TOOLCHAIN_VERSION" != "x"; then
61194    print_version=" $TOOLCHAIN_VERSION"
61195  fi
61196  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
61197  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
61198  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
61199
61200  printf "\n"
61201  printf "Build performance summary:\n"
61202  printf "* Cores to use:   $JOBS\n"
61203  printf "* Memory limit:   $MEMORY_SIZE MB\n"
61204  if test "x$CCACHE_STATUS" != "x"; then
61205    printf "* ccache status:  $CCACHE_STATUS\n"
61206  fi
61207  printf "\n"
61208
61209  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
61210    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
61211    printf "will result in longer build times.\n"
61212    printf "\n"
61213  fi
61214
61215  if test "x$FOUND_ALT_VARIABLES" != "x"; then
61216    printf "WARNING: You have old-style ALT_ environment variables set.\n"
61217    printf "These are not respected, and will be ignored. It is recommended\n"
61218    printf "that you clean your environment. The following variables are set:\n"
61219    printf "$FOUND_ALT_VARIABLES\n"
61220    printf "\n"
61221  fi
61222
61223  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
61224    printf "WARNING: Your build output directory is not on a local disk.\n"
61225    printf "This will severely degrade build performance!\n"
61226    printf "It is recommended that you create an output directory on a local disk,\n"
61227    printf "and run the configure script again from that directory.\n"
61228    printf "\n"
61229  fi
61230
61231  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
61232    printf "WARNING: The result of this configuration has overridden an older\n"
61233    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
61234    printf "proper build. Failure to do so might result in strange build problems.\n"
61235    printf "\n"
61236  fi
61237
61238  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
61239    printf "WARNING: The result of this configuration was not saved.\n"
61240    printf "You should run without '--no-create | -n' to create the configuration.\n"
61241    printf "\n"
61242  fi
61243
61244
61245
61246  # Locate config.log.
61247  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
61248    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
61249  elif test -e "./config.log"; then
61250    CONFIG_LOG_PATH="."
61251  fi
61252
61253  if test -e "$CONFIG_LOG_PATH/config.log"; then
61254    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
61255    if test $? -eq 0; then
61256      printf "The following warnings were produced. Repeated here for convenience:\n"
61257      # We must quote sed expression (using []) to stop m4 from eating the [].
61258      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
61259      printf "\n"
61260    fi
61261  fi
61262
61263